'How to load data into snowflake table from json.gz file

I would like to insert records from my json.gz file into snowflake table. I created this steps:


CREATE FILE FORMAT test_gz TYPE = JSON

                     
create stage my_test_stage

  storage_integration = MY_S3

  url = 's3://mybucket/'

  file_format = test_gz;

 



  copy into test_table

  from @my_test_stage

I have an error: JSON file can produce one and only one column of type variant or object or array. I also tried to change file format to gzip but it's not working.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source