I got this link from snowflake site "https://youtu.be/H0sbMDqdYQ8" ,were they are trying load from json file with copy command ,where the table has 4 column of the 2 are variant.i am trying the same ,but when try load the json file with copy command with file format as JSON ,its throws error "SQL compilation error: JSON/XML/AVRO 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." how to load a json file into a table which has more than one column.my requirement is same as the above youtube link ...
Asked
Active
Viewed 4,483 times
0
-
The video doesn't specify the file format that is being used. Have you tried doing what the error message tells you to do? If a file is multiple columns of JSON data, then it must be contained as a CSV file. You are using a JSON format in your copy command. – Mike Walton Jul 04 '20 at 21:01
-
Since in the video he has shown the JSON file and its not a CSV file.That where i got a doubt how he is loading JSON file into muliple columns of a table. – Lesly Premsingh C Jul 05 '20 at 04:53
-
Hi All, Got the below example from snowflake site "https://docs.snowflake.com/en/user-guide/data-load-transform.html" under the section "Load semi-structured Data into Separate Columns" and able to load multiple column of a table. – Lesly Premsingh C Jul 05 '20 at 09:50
1 Answers
1
In the example from Snowflake's docs, data-load-transform check out the section Load semi-structured Data into Separate Columns and you'll be able to load multiple columns of a table.

Phani Rithvij
- 4,030
- 3
- 25
- 60

Angelica Coleman
- 11
- 1
-
Hi, welcome to Stackoverflow. If linking to the docs please add the URLs to be clickable as links by using `[short-text](url-with-http|https)` this is called markdown and you can learn it [here](https://guides.github.com/features/mastering-markdown/). Or use CTRL+L after selecting some part of the text – Phani Rithvij Jul 07 '20 at 03:02