Tensorflow 使用terraform raising在bigquery中创建表;错误:googleapi:错误400:在架构中找不到为分区指定的字段。”;

Tensorflow 使用terraform raising在bigquery中创建表;错误:googleapi:错误400:在架构中找不到为分区指定的字段。”;,tensorflow,google-bigquery,Tensorflow,Google Bigquery,我想使用terraform在bigquery中创建表,下面是我的terraform脚本表单层次结构: |-> TF |--> table_x |--- schemas |---- all JSON files with table schemes goes here |--- main.tf |--- variable.tf |--> main.tf |--> variable.tf 表x的main.tf包含: resource "google_bigquer

我想使用terraform在bigquery中创建表,下面是我的terraform脚本表单层次结构:

|-> TF
|--> table_x
|--- schemas
|---- all JSON files with table schemes goes here
|--- main.tf
|--- variable.tf
|--> main.tf
|--> variable.tf
表x的main.tf包含:

resource "google_bigquery_dataset" "dataset" {
  project    = var.gcp_project
  dataset_id = var.dataset_id
  location   = var.bq_location
}

resource "google_storage_bucket" "appsflyer" {
  name          = var.bucket_id
  location      = var.bq_location
  force_destroy = true
  project       = var.gcp_project
  versioning {
    enabled = true
  }
}

resource "google_bigquery_table" "table" {
  for_each   = var.tables
  dataset_id = var.dataset_id
  project    = var.gcp_project
  table_id   = each.key
  schema     = file("${local.schema_def_folder}/${each.key}.json")
  time_partitioning {
    type  = "DAY"
    field = "event_time"
  }
}
地形中的main.tf是:

provider "google" {
  project = var.gcp_project
}

module "appsflyer" {
  source              = "./appsflyer"
  gcp_project         = var.gcp_project
  dataset_id          = local.appsflyer_dataset_id
  bucket_id           = local.appsflyer_bucket_id
  tables = [
        "all the JSON schemas goes here"
  ]
}
因此,在我运行
terraformapply-target=module.table_x
之后,它正在提升

Error: googleapi: Error 400: The field specified for partitioning cannot be found in the schema., invalid
│ 
│   on table_x/main.tf line 17, in resource "google_bigquery_table" "table":
│   17: resource "google_bigquery_table" "table" {
如有任何意见,我们将不胜感激