I am trying to load data from parquet file in AWS S3 into snowflake table. But getting the below error. Could you please help.
SQL compilation error: PARQUET 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.
Parquet file schema
|-- uuid: string (nullable = true)
|-- event_timestamp: timestamp (nullable = true)
|-- params: array (nullable = true)
| |-- element: struct (containsNull = true)
| | |-- id: string (nullable = true)
| | |-- name: string (nullable = true)
| | |-- type: string (nullable = true)
| | |-- value: string (nullable = true)
Here is the sample data. uuid,event_timestamp,params 3f230ea5-dd52-4cf9-bdde-b79201eb1001,2020-05-10 17:06:21.524,[{id=501, type=custom, name=filtering, value=true}, {id=502, type=custom, name=select, value=false}]
snowflake table
create or replace table temp_log (
uuid string,
event_timestamp timestamp,
params array);
I am using the below copy command to load data
copy into temp_log
from '<<s3 path>>'
pattern = '*.parquet'
storage_integration = <<integration object>
file_format = (
type = parquet
compression = snappy
)
;