简体   繁体   English

用Impala写入S3实木复合地板

[英]Write to S3 parquet with Impala

I would like to write an entire table to s3a in parquet format. 我想以镶木地板格式将整个表写入s3a。 Let's call the table abc_schem.thattable. 我们将其称为表abc_schem.thattable。 I would like to use an Impala query to SELECT * WHERE to_date(create_time) = 'YYYY-MM-DD' 我想使用Impala查询来选择* WHERE to_date(create_time)='YYYY-MM-DD'

What is the exact syntax for this to write to Parquet S3? 写入Parquet S3的确切语法是什么?

You can create an external table in a specific location and insert into it assuming s3 system is already configured 您可以在特定位置创建一个外部表,并在已配置s3系统的情况下将其插入到该表中

CREATE EXTERNAL TABLE abc_schem.thattable(
... 
) 
STORED AS PARQUET 
LOCATION 's3a://bucket/path';

Then use some LOAD DATA or INSERT INTO... SELECT... FROM commands to get data there 然后使用一些LOAD DATAINSERT INTO... SELECT... FROM命令从那里获取数据

CREATE TABLE schema.temp_c 
STORED AS PARQUET LOCATION "s3a://s3highlevel/c/lowlevel" AS 
SELECT * FROM schema.table 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM