尝试安排查询时,BigQuery'请求包含无效的参数'

时间:2019-11-19 14:55:27

标签: google-cloud-platform google-bigquery

我创建了一个查询,该查询显示了手动执行时的预期行为。尝试从中创建计划的查询时,总是会收到错误BigQuery error in query operation: Request contains an invalid argument。除了我要安排它之外,同一查询是1:1。

Web平台和CLI均显示相同的错误 BigQuery error in query operation: Request contains an invalid argument. 。甚至--apilog=stdout都对我没有任何意义。

我们在另一个表中使用了类似的计划查询-唯一的区别是新查询中的目标位置和原始位置是--location=europe-west3而不是us

命令:

bq query \
--append \
--display_name=XXX \
--schedule='every 24 hours' \
--destination_table=XXX \
--use_legacy_sql=false \
'[...]'

标准输出:

INFO:googleapiclient.model:--request-start--
INFO:googleapiclient.model:-headers-start-
INFO:googleapiclient.model:content-type: application/json
INFO:googleapiclient.model:accept-encoding: gzip, deflate
INFO:googleapiclient.model:accept: application/json
INFO:googleapiclient.model:user-agent: google-api-python-client/1.7.10 (gzip)
INFO:googleapiclient.model:-headers-end-
INFO:googleapiclient.model:-path-parameters-start-
INFO:googleapiclient.model:parent: projects/XXX/locations/-
INFO:googleapiclient.model:-path-parameters-end-
INFO:googleapiclient.model:body: {"destinationDatasetId": "III", "displayName": "scheduledQueryName", "schedule": "every 24 hours", "scheduleOptions": {"disableAutoScheduling": false}, "dataSourceId": "scheduled_query", "params": {"query": "[.........]", "write_disposition": "", "destination_table_name_template": "[.........]", "partitioning_field": ""}}
INFO:googleapiclient.model:query: ?authorizationCode=&alt=json
INFO:googleapiclient.model:--request-end--
INFO:googleapiclient.discovery:URL being requested: POST https://bigquerydatatransfer.googleapis.com/v1/projects/XXX/locations/-/transferConfigs?authorizationCode=&alt=json
INFO:googleapiclient.model:--response-start--
INFO:googleapiclient.model:status: 400
INFO:googleapiclient.model:content-length: 285
INFO:googleapiclient.model:x-xss-protection: 0
INFO:googleapiclient.model:x-content-type-options: nosniff
INFO:googleapiclient.model:transfer-encoding: chunked
INFO:googleapiclient.model:vary: Origin, X-Origin, Referer
INFO:googleapiclient.model:server: ESF
INFO:googleapiclient.model:-content-encoding: gzip
INFO:googleapiclient.model:cache-control: private
INFO:googleapiclient.model:date: Tue, 19 Nov 2019 14:06:45 GMT
INFO:googleapiclient.model:x-frame-options: SAMEORIGIN
INFO:googleapiclient.model:alt-svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
INFO:googleapiclient.model:content-type: application/json; charset=UTF-8
INFO:googleapiclient.model:{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "errors": [
      {
        "message": "Request contains an invalid argument.",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}

INFO:googleapiclient.model:--response-end--
BigQuery error in query operation: Request contains an invalid argument.

任何线索可能导致 BigQuery error in query operation: Request contains an invalid argument. 吗?

1 个答案:

答案 0 :(得分:1)

BigQuery Data Transfer Service does not yet support location europe-west3.
Please select a dataset in a supported location.

您必须将位置更改为EU