[Bug]: NULL_IF in file format shows as null in terraform state when set to empty string in Snowflake #3325
Labels
bug
Used to mark issues with provider's incorrect behavior
resource:file_format
Issue connected to the snowflake_file_format resource
Terraform CLI Version
5.79.0
Terraform Provider Version
0.99.0
Company Name
National Debt Relief
Terraform Configuration
Category
category:resource
Object type(s)
FILE FORMAT
Expected Behavior
I expect the null_if to replace empty strings in my s3 files with NULL. This is how it behaves when I create the file format myself in Snowflake:
alter file format xxx.xxx.COPY_INTO_FORMAT set NULL_IF = ('')
Actual Behavior
I set the nullif to an empty string in terraform (null_if = ["''"]) and it wasn't actually replacing empty strings with NULL when I load from s3. I then ran the above alter command in snowflake and now I get the terraform state mismatch shown in the terraform configuration snippet. Terraform is interpreting alter file format xxx.xxx.COPY_INTO_FORMAT set NULL_IF = ('') as null, and I can't set the terraform configuration to null.
Steps to Reproduce
Create a file format in snowflake with the parameter NULL_IF = ('').
See that you can't get terraform to match, because it interprets this parameter as null from snowflake.
How much impact is this issue causing?
Low
Logs
No response
Additional Information
No response
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: