I am trying to load a CSV file into Snowflake. The sample format of the input csv table in s3 location is as follows (with 2 columns: ID, Location_count): Input csv table
I need to transform it in the below format:(with 3 columns:ID, Location, Count) Output csv table
However when I am trying to load the input file using the following query after creating database, external stage and file format, it returns LOAD_FAILED
create or replace table table_name ( id integer, Location_count variant );
select parse_json(Location_count) as c;
list @stage_name; copy into table_name from @stage_name file_format = 'fileformatname' on_error = 'continue';