0
votes

I have a spatial data. It is GeoJSON format. I want to copy this data into Redshift from S3. So can you please help me to create table and copy the data into table. I want to know copy command.

1

1 Answers

0
votes

Redshift's COPY command currently supports ingestion of geometries from (hexadecimal) WKB/EWKB format only. We currently do not support ingestion from GeoJSON. https://docs.aws.amazon.com/redshift/latest/dg/geospatial-overview.html

Alternatively, you can ingest the data in WKT format as VARCHAR(MAX) and then convert to GEOMETRY using the ST_GeomFromText() function. Using this method the WKT description of a geometry is limited to the 64KB max VARCHAR size.

More info: https://docs.aws.amazon.com/redshift/latest/dg/spatial-limitations.html