在雪花中自动为外部表创建DDL(来自S3)
我在parquet fomrat中的S3存储桶中有数据。我正在雪花上创建一个表格,以从S3表中读取数据,因为我将其读为外部表。
我创建了一个外部表,
create or replace external table CB_Aasa
(
uuid varchar(80) as ($1:uuid::varchar ),
name varchar(80) as ($1:name::varchar ),
DATE_LOADED datetime as ( $1:DATE_LOADED::datetime ),
SOURCE varchar(60) as ( $1:SOURCE::varchar ),
filename VARCHAR(2000)as METADATA$FILENAME,
date_part varchar(20) as substr(METADATA$FILENAME,25,10)
)
partition by (date_part)
with location [email protected]_STAGE/crun/acq
file_format = $parquet_file_format
aws_sns_topic=$sns_topic
auto_refresh = true ;
因为创建此DDL更容易?
谢谢, xi
I have data in s3 bucket in parquet fomrat. I am creating a table in snowflake to read data from the S3 table , as I am reading them as external tables.
I created an external table as
create or replace external table CB_Aasa
(
uuid varchar(80) as ($1:uuid::varchar ),
name varchar(80) as ($1:name::varchar ),
DATE_LOADED datetime as ( $1:DATE_LOADED::datetime ),
SOURCE varchar(60) as ( $1:SOURCE::varchar ),
filename VARCHAR(2000)as METADATA$FILENAME,
date_part varchar(20) as substr(METADATA$FILENAME,25,10)
)
partition by (date_part)
with location [email protected]_STAGE/crun/acq
file_format = $parquet_file_format
aws_sns_topic=$sns_topic
auto_refresh = true ;
What is the easier for creating this DDL?
Thanks,
Xi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论