tblproperties('skip.header.line.count'='1')在从beeline连接到hive jdbc 1.2.1的sparkthrift上不起作用

9q78igpj  于 2021-06-27  发布在  Hive
关注(0)|答案(1)|浏览(782)

我正在使用spark 2.3并将sparkthrift与beeline连接起来。
hive jdbc版本1.2.1 spark sql版本2.3.1
我试图用skip header属性创建外部表,但select命令总是返回头作为第一行的数据,下面是我的create查询

CREATE EXTERNAL TABLE datasourcename11(
`retail_invoice_detail_sys_invoice_no` STRING,
`store_id` STRING,
`retail_invoice_detail_invoice_time` STRING,
`retail_invoice_detail_invoice_date` string,
`cust_id` STRING,
`article_code` INTEGER,
`retail_invoice_detail_base_price` INTEGER,
`retail_invoice_detail_sale_price` INTEGER,
`retail_invoice_detail_quantity` DOUBLE,
`retail_invoice_detail_total_amount` DOUBLE
) 
ROW FORMAT DELIMITED  FIELDS TERMINATED BY ',' 
LINES TERMINATED BY '\n'  
LOCATION '/home/java_services/backend/demo/' 
TBLPROPERTIES('skip.header.line.count'=1);
p1tboqfb

p1tboqfb1#

此属性 skip.header.line.count=1 仅在配置单元中受支持。
解决方法是使用过滤器 retail_invoice_detail_sys_invoice_no!=<col name in header>

相关问题