error_on_column_count_mismatch=false : Number of columns in file does not match that of the corresponding table use file format option error_on_column_count_mismatch=false to ignore this error File

Error: Number of columns in file does not match that of the corresponding table  use file format option error_on_column_count_mismatch=false to ignore this error File 

this error normally occurs when number of columns in staged file and table are not match, I would give you an example to check this and a solution, that can work for you  😊


if you check the file format you choose and your staged file, you format and data is looking like the below images, as I do have the first column with blank value and somewhere I do have data there


if you uncheck the error_on_column_count_mismatch to false, you can better about this


now try to execute the select query on stage file.


I am using a Table stage and you can see on above screen, columns data are not coming as per table column so you do need to create one more column in table to insert it correctly.

It is very necessary to design the model properly, otherwise a mistake can cost you, however it is good that get and put don't take any cost in snowflake, so it would be better if you drop the table and design it again and load the data into it.

if I use named stage in snowflake I would not face that issue. 



happy learning 😊


Vidit - A data scientist in snowflake, apache kafka 





Comments

Popular posts from this blog

Snowflake Automation using SnowSql CLI || Create Azure Devops CI CD using Snowsql CLI

Practice Set 1: Snowpro Certification Practice Set with more than 250 Unique Questions