You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it appears this is due to a timing thing, if an S3 bucket doesn't exist when a stage + file_format + external table get created, it will store a null region.
When terraform removes the external table, it might concurrently drop the file format first, which means the external table is not dropped, however, it shows as successfully dropped in the GUI. But the external table still exists with an error saying 'Missing file format'.
Fix was to manually drop the external table, and redeploy everything post the S3 bucket bring created.
Terraform CLI Version
1.9.4
Terraform Provider Version
0.94.1
Terraform Configuration
Category
category:resource
Object type(s)
resource:external_table
Expected Behavior
It should successfully create an external table using a stage and SNS resource reference.
Actual Behavior
The external table gets created successfully, however, the following error is returned to Terraform, so it does not get added to the state file.
Error: sql: Scan error on column index 13, name "region": converting NULL to string is unsupported
On a subsequent run on terraform, the following error returns showing the external table exists.
Error: 002002 (42710): SQL compilation error: Object 'STAGING.RAW.SYNC_EXT' already exists.
I believe there might be a mismatch in the column mapping for state when it runs a check of the external table post create.
SHOW EXTERNAL TABLES LIKE 'SYNC_EXT' IN SCHEMA STAGING.RAW;
'region' is the 14 columns (13th columns if starting from 0)
Steps to Reproduce
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
Seems similar to an existing error for internal stages: #129
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: