Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在BQ中使用外部数据源,并从Google存储中生成特定数据_Java_Google Cloud Platform_Google Bigquery_Google Cloud Storage - Fatal编程技术网

Java 在BQ中使用外部数据源,并从Google存储中生成特定数据

Java 在BQ中使用外部数据源,并从Google存储中生成特定数据,java,google-cloud-platform,google-bigquery,google-cloud-storage,Java,Google Cloud Platform,Google Bigquery,Google Cloud Storage,我想在BQ select语句中使用外部数据源,并不是最新的,而是来自Google云存储的特定一代文件 我目前使用以下方法: val sourceFile = "gs://test-bucket/flights.csv" val queryConfig = QueryJobConfiguration.newBuilder(query) .addTableDefinition("tmpTable", ExternalTa

我想在BQ select语句中使用外部数据源,并不是最新的,而是来自Google云存储的特定一代文件

我目前使用以下方法:

val sourceFile = "gs://test-bucket/flights.csv"
val queryConfig = QueryJobConfiguration.newBuilder(query)
                .addTableDefinition("tmpTable",
                        ExternalTableDefinition.newBuilder(sourceFile, schema, format)
                                .setCompression("GZIP")
                                .build())
                .build();
        bigQuery.query(queryConfig)
我尝试按如下方式设置sourceFile变量:

val sourceFile = "gs://test-bucket/flights.csv#123456789"
但这会导致以下错误:

Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
{
  "code" : 400,
  "errors" : [ {
    "domain" : "global",
    "message" : "The query specified one or more federated data sources but not all of them were scanned. It usually indicates incorrect uri specification or a 'limit' clause over a union of federated data sources that was satisfied without having to read all sources.",
    "reason" : "invalid"
  } ],
  "message" : "The query specified one or more federated data sources but not all of them were scanned. It usually indicates incorrect uri specification or a 'limit' clause over a union of federated data sources that was satisfied without having to read all sources.",
  "status" : "INVALID_ARGUMENT"
}
当我不使用一代时,它工作得很好。我还使用
gsutils stat gs://test bucket/flights.csv#123456789
检查了此生成的文件是否存在


是否可以在此处指定一个版本?

这是仅此版本还是所有版本都会发生?我在此处尝试了两个不同的文件,每个文件都有一个版本的谷歌云支持!经过进一步的调查,发现这一点在任何地方都没有记录,我理解版本化对象应该像非版本化对象一样工作。因此,我已经提交了一份报告,您可以跟踪并查看解决该主题的进展情况。请随时向公开问题添加其他信息,以帮助加快调查。这是仅此版本还是所有版本都会发生?我尝试了两个不同的文件,每个文件都有一个版本的谷歌云支持!经过进一步的调查,发现这一点在任何地方都没有记录,我理解版本化对象应该像非版本化对象一样工作。因此,我已经提交了一份报告,您可以跟踪并查看解决该主题的进展情况。请随时在公开问题中添加其他信息,以帮助加快调查。