我正在使用 spark 2.3 并将 sparkThrift 与直线连接。
Hive jdbc 版本 1.2.1 Spark SQL 版本 2.3.1
我正在尝试使用跳过标头属性创建外部表,但选择命令始终返回带有标头的数据作为第一行,下面是我的创建查询
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);