Export: BigQuery

Converts the data contract to a BigQuery table schema JSON.

{/* AUTOGENERATED EXAMPLE: do not edit by hand; regenerate with the update script. */}

datacontract export bigquery orders.odcs.yaml --schema-name orders --server bigquery --output orders.bigquery.json

Running this against the example orders contract produces:

{
  "kind": "bigquery#table",
  "tableReference": {
    "datasetId": "orders",
    "projectId": "my-gcp-project",
    "tableId": "orders"
  },
  "description": "One row per customer order.",
  "schema": {
    "fields": [
      {
        "name": "order_id",
        "type": "STRING",
        "mode": "REQUIRED",
        "description": "Unique identifier of the order.",
        "maxLength": null
      },
      {
        "name": "order_timestamp",
        "type": "TIMESTAMP",
        "mode": "REQUIRED",
        "description": "Timestamp when the order was placed."
      },
      {
        "name": "customer_id",
        "type": "STRING",
        "mode": "REQUIRED",
        "description": "Reference to the customer who placed the order.",
        "maxLength": null
      },
      {
        "name": "order_total",
        "type": "NUMERIC",
        "mode": "REQUIRED",
        "description": "Total amount of the order in cents.",
        "precision": null,
        "scale": null
      },
      {
        "name": "status",
        "type": "STRING",
        "mode": "REQUIRED",
        "description": "Current fulfilment status of the order.",
        "maxLength": null
      }
    ]
  }
}

{/* END AUTOGENERATED EXAMPLE */}