# Export: BigQuery

> Export a data contract to a BigQuery schema.

#  Export: BigQuery

Converts the data contract to a [BigQuery table schema](https://cloud.google.com/bigquery/docs/schemas) JSON.

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

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

Running this against the [example `orders` contract](https://github.com/datacontract/datacontract-cli/blob/main/examples/orders/orders.odcs.yaml) produces:

```json
{
  "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 */}

All options: **[`datacontract export bigquery`](../commands/export/bigquery.md)**.
