Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Deployment Manager " instance type (boolean)does not match " to deploy bigquery table(field Y)

When I deployed a BigQuery table using yaml/jinja file in Deployment Manager, the following error occurs only when the field name is "Y".   Please advise the cause of this error and how to avoid it.

[Command to deploy]

gcloud deployment-manager deployments create my-deploy --config sample.yaml (It also happens with "update" instead of "create”)

[Excerpt of the relevant part of config files]

<sample.yaml>
import:
  - path: bigquery.jinja
resources:
  - typebigquery.jinja
    namebigquery
 
  <bigquery.jinja>
   - type: gcp-types/bigquery-v2:tables
      name: sample
     properties:
        tableReference:
             datasetId: {{ DATASET_ID }}
             projectId: {{ env["project"] }}
        tableId: foo_table
             timePartitioning:
              type: DAY
       schema:
            fields:
               - name: X
                 type: FLOAT
                 mode: NULLABLE
               - name: Y # Not sure why, but Y is treated as a boolean and will cause an error
                  type: FLOAT
                  mode: NULLABLE
    metadata:
       dependsOn:
          - {{ DATASET_ID }}-dataset

[Error Message]

The fingerprint of the deployment is b'uV_CVDY5lTYT5XmHj2m64Q=='
Waiting for update [operation-1637891221984-5d1a744779502-601aa210-33d74fe9]...failed.
ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation [operation-1637891221984-5d1a744779502-601aa210-33d74fe9]: errors:
- code: CONDITION_NOT_MET

  location: /deployments/xxxx/resources/xxxxxxx->$.properties

  message: 
    error: instance type (boolean) does not match any allowed primitive type (allowed: ["string"])
        level: "error"
        schema: {"loadingURI":"#","pointer":"/schemas/TableFieldSchema/properties/name"}
        instance: {"pointer":"/schema/fields/1/name"}
        domain: "validation"
        keyword: "type"
        found: "boolean"
        expected: ["string"]

0 2 402
2 REPLIES 2

It seems this is a known issue and that fixed the problem if you set the value to "yes" or "true".

Thank you Ahmadp, I understood it is a known issue, but how can I solve it. Where to set "yes" or "true" ?

I want to use the field name "Y" to store the coordinates, can I use it?