将GeoJSON数据从S3复制到Redshift [英] Copying GeoJSON data from S3 to Redshift
问题描述
我有一个空间数据.它是 GeoJSON
格式.我想将此数据从 S3
复制到 Redshift
中.因此,能否请您帮我创建表并将数据复制到表中.我想知道 copy
命令.
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.
推荐答案
Redshift的 COPY
命令当前支持从(十六进制) WKB
/ EWKB
格式.我们当前目前不支持从 GeoJSON
进行提取. https://docs.aws.amazon.com/redshift/Latest/dg/geospatial-overview.html
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
或者,您可以将 WKT
格式的数据作为 VARCHAR(MAX)
提取,然后使用 ST_GeomFromText()
函数.使用此方法,几何的 WKT
描述限制为最大64KB VARCHAR
大小.
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.
更多信息: https://docs.aws.amazon.com/redshift/latest/dg/spatial-limitations.html
这篇关于将GeoJSON数据从S3复制到Redshift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!