Skip to content

Conversation

mzumi
Copy link
Contributor

@mzumi mzumi commented Jul 12, 2023

I got an error that is as follows in v.0.5.1.

Error: java.lang.RuntimeException: net.snowflake.client.jdbc.SnowflakeSQLException: SQLコンパイルエラー:
無効なパラメーター「EMPTY_FIELD_AS_NULL」

EMPTY_FIELD_AS_NULL option has been added in v0.5.1, but it seems that syntax is wrong when you use EMPTY_FIELD_AS_NULL = false option.

SQL below is generated when you make EMPTY_FIELD_AS_NULL false.

COPY INTO
  <table_name> 
FROM 
  <stage_file_name> 
FILE_FORMAT = ( TYPE = CSV FIELD_DELIMITER = '<delimiter>' ) EMPTY_FIELD_AS_NULL = FALSE

But acconding to reference, I think SQL should be fixed as follows:

COPY INTO
  <table_name> 
FROM 
  <stage_file_name> 
FILE_FORMAT = ( TYPE = CSV FIELD_DELIMITER = '<delimiter>' EMPTY_FIELD_AS_NULL = FALSE ) 

@mzumi mzumi self-assigned this Jul 12, 2023
@mzumi mzumi requested review from u110 and d-hrs July 12, 2023 07:56
Copy link
Contributor

@u110 u110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!
LGTM!

@mzumi mzumi merged commit 41e976a into main Jul 12, 2023
@mzumi mzumi deleted the fix_empty_field_as_null branch July 12, 2023 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants