Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

upload json into a snowflake table

I created an empty table in Snowflake.

enter image description here

I want to upload a json file into this table now. One possibility would be to add the entire json’s value into the first row of the first column. However, when I upload the file from my computer, and select JSON as the type, I get this error

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Unable to copy files into table.
SQL compilation error: JSON file format can produce one and only one column of type variant or object or array. Use CSV file format if you want to load more than one column.

What am I doing wrong? Am I supposed to use another file type instead?

>Solution :

Your column type is VARCHAR, as the error suggests, it needs to be of type variant or object or array if you want to load everything into one column from the JSON file.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading