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
Looking at query logs in Snowflake, the provider is wrapping the file format name in parentheses and Snowflake interprets this as a list of length one, which is actually a syntax error. CREATE STAGE "EXAMPLE_DB"."EXAMPLE_SCHEMA"."EXAMPLE_STAGE" URL = 's3://BUCKET/' FILE_FORMAT = (DEFAULT_FILE_FORMAT)
Would you like to implement a fix?
Yeah, I'll take it 😎
The text was updated successfully, but these errors were encountered:
Hi @boseoladipo 👋 According to a note, file format should not be specified in creating stages.
We use old query builders for building queries to Snowflake. This resource will be reworked before v1. We'll examine resource fields and investigate this COPY INTO solution.
Terraform CLI Version
1.9.4
Terraform Provider Version
0.94.1
Terraform Configuration
Category
category:resource
Object type(s)
resource:stage
Expected Behavior
I should be able to create a stage object with a file format.
Actual Behavior
The terraform apply command fails with the error
SQL compilation error: File format 'TOK_CONSTANT_LIST' does not exist or not authorized.
Steps to Reproduce
resource "snowflake_file_format" "default" {
name = "EXAMPLE_FILE_FORMAT"
database = "EXAMPLE_DB"
schema = "EXAMPLE_SCHEMA"
format_type = "PARQUET"
compression = "AUTO"
}
resource "snowflake_stage" "default" {
name = "EXAMPLE_STAGE"
url = "s3://EXAMPLE-BUCKET/"
database = "EXAMPLE_DB"
schema = "EXAMPLE_SCHEMA"
file_format = snowflake_file_format.default.name
}
Run terraform apply using the above configuration
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
Looking at query logs in Snowflake, the provider is wrapping the file format name in parentheses and Snowflake interprets this as a list of length one, which is actually a syntax error.
CREATE STAGE "EXAMPLE_DB"."EXAMPLE_SCHEMA"."EXAMPLE_STAGE" URL = 's3://BUCKET/' FILE_FORMAT = (DEFAULT_FILE_FORMAT)
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: