在Hive中创建CREATE EXTERNAL TABLE成功运行,但结果为零

时间:2018-08-31 03:34:52

标签: hiveql

当我在配置单元中执行CellFormatting时,它可以成功运行,但结果为零。我用:

CREATE EXTERNAL TABLE

其中数据在ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' stored as textfile LOCATION '/common_folder/nyc_taxi_data/' tblproperties ("skip.header.line.count"="2"); 中给出。这样只会创建没有数据的视图吗?

2 个答案:

答案 0 :(得分:0)

使用LOCATION'/ common_folder / nyc_taxi_data'代替 DDL中的位置“ / common_folder / nyc_taxi_data /”。

如果您已经将数据加载到hdfs中,请使用选择查询进行测试。

答案 1 :(得分:0)

假定要从中将数据加载到表中的文件是“ nyc_taxi_data”,请使用LOCATION'/ common_folder / nyc_taxi_data' 如果“ nyc_taxi_data”是父文件夹,请使用LOCATION'/ common_folder / nyc_taxi_data / name_of_the_text_file'