# Create an Online Table

Launch stage: Public Preview

`POST /api/2.0/online-tables`

Create a new Online Table.

API scopes: unity-catalog

## Request body

Specification of the online table to be created.
- `name` (string, optional)
  Full three-part (catalog, schema, table) name of the table.
- `spec` (object, optional)
  Specification of the online table.
  - `run_continuously` (object, optional)
    Pipeline runs continuously after generating the initial data.
  - `run_triggered` (object, optional)
    Pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers)
  - `source_table_full_name` (string, optional)
    Three-part (catalog, schema, table) name of the source Delta table.
  - `primary_key_columns` (array of string, optional)
    Primary Key columns to be used for data insert/update in the destination.
  - `timeseries_key` (string, optional)
    Time series key to deduplicate (tie-break) rows with the same primary key.
  - `perform_full_copy` (boolean, optional)
    Whether to create a full-copy pipeline -- a pipeline that stops after creates a full copy of
     the source table upon initialization and does not process any change data feeds (CDFs)
     afterwards. The pipeline can still be manually triggered afterwards, but it always perform a
     full copy of the source table and there are no incremental updates. This mode is useful for
     syncing views or tables without CDFs to online tables.
     Note that the full-copy pipeline only supports "triggered" scheduling policy.
    Default: `false`
  - `pipeline_id` (string, optional)
    ID of the associated pipeline. Generated by the server - cannot be set by the caller.

## Returns

Returns the OnlineTable object.

## Response

```json
{
  "name": "string",
  "spec": {
    "run_continuously": {},
    "run_triggered": {},
    "source_table_full_name": "string",
    "primary_key_columns": [
      "string"
    ],
    "timeseries_key": "string",
    "perform_full_copy": false,
    "pipeline_id": "string"
  },
  "status": {
    "detailed_state": "PROVISIONING",
    "message": "string",
    "provisioning_status": {},
    "continuous_update_status": {},
    "triggered_update_status": {},
    "failed_status": {}
  },
  "table_serving_url": "string",
  "unity_catalog_provisioning_state": "PROVISIONING"
}
```

