Sql 使用Presto插入到静态配置单元分区中

Sql 使用Presto插入到静态配置单元分区中,sql,hive,presto,trino,hive-partitions,Sql,Hive,Presto,Trino,Hive Partitions,假设我想插入到一个静态配置单元分区中,我可以用Presto来完成吗 分区关键字仅适用于配置单元 INSERT INTO TABLE Employee PARTITION (department='HR') 原因:com.facebook.presto.sql.parser.ParsingException:第1:44行: 输入“分区”不匹配。应为:“(”,在 com.facebook.presto.sql.parser.ErrorHandler.syntaxError(ErrorHandle

假设我想
插入到一个静态配置单元分区中,我可以用
Presto
来完成吗

分区
关键字仅适用于配置单元

INSERT INTO TABLE Employee PARTITION (department='HR') 
原因:com.facebook.presto.sql.parser.ParsingException:第1:44行: 输入“分区”不匹配。应为:“(”,在 com.facebook.presto.sql.parser.ErrorHandler.syntaxError(ErrorHandler.java:109)

在中,您不需要分区(department='HR')

INSERT INTO TABLE Employee (name, department)
VALUES  ('John', 'HR');
INSERT INTO TABLE Employee (name, department)
select 
      name, 
      'HR' --partition column is the last one
from 
...