'Cannot insert Array in Snowflake

I have a CSV file with the following data:

  eno |           phonelist           |  shots

  "1" | "['1112223333','6195551234']" | "[[11,12]]"

The DDL statement I have used to create table in snowflake is as follows:

CREATE TABLE ArrayTable (eno INTEGER, phonelist array,shots array);

I need to insert the data from the CSV into the Snowflake table and the method I have used is:

create or replace stage ArrayTable_stage file_format = (TYPE=CSV)

put file://ArrayTable @ArrayTable_stage auto_compress=true

copy into ArrayTable from @ArrayTable_stage/ArrayTable.gz 
    file_format = (TYPE=CSV FIELD_DELIMITER='|' FIELD_OPTIONALLY_ENCLOSED_BY='\"\')

But when I try to run the code, I get the error:

Copy to table failed: 100069 (22P02): Error parsing JSON: ('1112223333','6195551234')

How to resolve this?



Sources

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

Source: Stack Overflow

Solution Source