英文:
Does presto support insert overwrite into hive table?
问题
我正在尝试将数据插入到一个分区表中。我正在使用PrestoSqlOperator(airflow DAG)运行presto/trino SQL查询。
我能够使用以下命令将数据插入到表中:
Insert into table ......
但是,如果我尝试使用以下命令:
Insert overwrite table .....
它会抛出错误。
请帮助我找到正确的语句。
我还尝试过删除分区,但没有取得太多成功。
英文:
I am trying to insert data into a partioned table. I am using PrestoSqlOperator ( airflow DAG) to run a presto/trino SQL query.
I am able to insert data into table using command
Insert into table......
But if I am trying to use below command
Insert overwrite table .....
It's throwing error.
Please help me with the correct statement.
I have also tried to drop the partition, but did not get much success.
答案1
得分: 1
INSERT OVERWRITE功能在Trino版本419中添加。
先前的实现是:
SET SESSION hive.insert_existing_partitions_behavior='OVERWRITE';
INSERT INTO hive.test2.insert_test SELECT * FROM tpch.sf1.customer;
更多详情请参阅https://github.com/trinodb/trino/issues/11602以及https://github.com/trinodb/trino/issues?page=2&q=+insert+overwrite和https://github.com/trinodb/trino/issues?page=2&q=+insert+overwrite。
英文:
INSERT OVERWRITE feature was added in Trino v 419
INSERT OVERWRITE hive.test2.insert_test SELECT * FROM tpch.sf1.customer;
Previous implementation is:
SET SESSION hive.insert_existing_partitions_behavior='OVERWRITE';
INSERT INTO hive.test2.insert_test SELECT * FROM tpch.sf1.customer;
See more details https://github.com/trinodb/trino/issues/11602
https://github.com/trinodb/trino/issues?page=2&q=+insert+overwrite
and https://github.com/trinodb/trino/issues?page=2&q=+insert+overwrite
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论