'show table extended' 应该列出分区下的文件吗?
Should 'show table extended' list the files under partitions?
我已将外部文件按年份分隔 table。我每年都添加分区。我 运行 显示 table 扩展命令,它显示:
partitioned:true
partitionColumns:struct partition_columns { i32 year}
totalNumberFiles:0
totalFileSize:0
它应该列出每个分区位置的文件吗?
DROP TABLE IF EXISTS myTable;
CREATE EXTERNAL TABLE myTable(
somefield STRING,
somefield2 STRING,
GMTDateTime TIMESTAMP
)
PARTITIONED BY (year INT)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE LOCATION 'wasb://{hdinsight instance}@{storage name}.blob.core.windows.net/data00/';
alter table myTable add partition ( year = 2015 ) location '{hdinsight instance}@{storage name}.blob.core.windows.net/data2015/' ;
alter table myTable add partition ( year = 2014 ) location '{hdinsight instance}@{storage name}.blob.core.windows.net/data2014/' ;
对不起..
我们可以在以下命令的帮助下查看单个分区位置..
描述 [扩展|格式化] [db_name.]table_name 分区 partition_spec...
但是没有这样的命令可以知道所有带url的分区..我们必须通过单个分区来找到它。
我已将外部文件按年份分隔 table。我每年都添加分区。我 运行 显示 table 扩展命令,它显示:
partitioned:true
partitionColumns:struct partition_columns { i32 year}
totalNumberFiles:0
totalFileSize:0
它应该列出每个分区位置的文件吗?
DROP TABLE IF EXISTS myTable;
CREATE EXTERNAL TABLE myTable(
somefield STRING,
somefield2 STRING,
GMTDateTime TIMESTAMP
)
PARTITIONED BY (year INT)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE LOCATION 'wasb://{hdinsight instance}@{storage name}.blob.core.windows.net/data00/';
alter table myTable add partition ( year = 2015 ) location '{hdinsight instance}@{storage name}.blob.core.windows.net/data2015/' ;
alter table myTable add partition ( year = 2014 ) location '{hdinsight instance}@{storage name}.blob.core.windows.net/data2014/' ;
对不起.. 我们可以在以下命令的帮助下查看单个分区位置.. 描述 [扩展|格式化] [db_name.]table_name 分区 partition_spec...
但是没有这样的命令可以知道所有带url的分区..我们必须通过单个分区来找到它。