【发布时间】:2020-06-24 05:51:13
【问题描述】:
我正在尝试使用此 BigQuery doc 的引用查询外部分区数据
谷歌云存储:(csv数据只包含字符串值)
gs://project/myfolder/count=1000/file_1k.csv
gs://project/myfolder/count=10000/file_10k.csv
gs://project/myfolder/count=100000/file_100k.csv
源 URI 前缀: gs://project/myfolder
但是查询表格时出现以下错误,
Error while reading table: project.dataset.partition_table,
error message: Cannot query hive partitioned data for table project.dataset.partition_table without any associated files.
查询:
SELECT * FROM `project.dataset.partition_table` where count=1000 order by rand() LIMIT 100;
这里的任何意见都非常感谢。
【问题讨论】:
-
您能分享您的查询吗?
-
@rmesteves 问题已通过查询更新。
-
我尝试重现该问题,但对我来说效果很好。该错误似乎表明您的分区没有关联的文件。你检查了所有分区的文件吗?
-
尝试将 gs://project/myfolder/* 而不是 gs://project/myfolder 放在“从 GCS 存储桶中选择文件”字段中。请让我知道它有效
-
@rmesteves 是的,你可以。
标签: google-bigquery google-cloud-storage external-tables