We are trying to copy data from s3 (parquet files) to redshift.
Here are the respective details.
Athena DDL:
CREATE EXTERNAL tablename(
`id` int,
`col1` int,
`col2` date,
`col3` string,
`col4` decimal(10,2),
binarycol binary);
Redshift DDL:
CREATE TABLE IF NOT EXISTS redshiftschema.tablename(
id int,
col1 int,
col2 date,
col3 varchar(512),
col4 decimal(10,2),
binarycol varbyte);
And the copy command is:
COPY <tgt_schema>.tablename FROM 's3://<path>/<tablename>.manifest' iam_role 'redshift-role' FORMAT AS PARQUET manifest;
The above works well with all other tables except when we have a binary column I believe in the athena table. In that case we get following error:
Redshift COPY error: "Assert code: 1000 context: Reached unreachable code - Invalid type: 6551 query"
Could anyone please guide with the issue we are facing?