Hello,
I got the following error when using the option to 'Delete Data & Append' in a Snowflake database:
Error: Output Data (49): The COPY failed with error: Number of columns in file (46) does not match that of the corresponding table (47), use file format option error_on_column_count_mismatch=false to ignore this error
If you would like to continue loading when an error is encountered, use other values such as 'SKIP_FILE' or 'CONTINUE' for the ON_ERROR option. For more information on loading options, please run 'info loading_data' in a SQL client.
As suggested in the message, I then tried to include the syntax ON_ERROR=CONTINUE but maybe I am not writing it correctly?
I also tried with error_on_column_count_mismatch=false but got the same error.
Is anyone able to verify I am using the correct syntax?
Many thanks in advance!!
Solved! Go to Solution.
Hi @nataliamiteva ,
this appears to be a naming issue in that you haven't mapped the table names in the output script. Specifically you're missing a column from your output which is required when updating an existing record.
This ultimately prevents the SQL script from being written even if you're trying to override the error.
Try including all columns, even if they're utterly unimportant.
M.
Thanks for the quick response @mceleavey!
I identified the column I was missing and created it with a formula tool, assigning NULL values in there. Got rid of the pre SQL statement and that worked.
I was having a bad Alteryx day ..