online_tables
Creates, updates, deletes, gets or lists an online_tables resource.
Overview
| Name | online_tables |
| Type | Resource |
| Id | databricks_workspace.catalog.online_tables |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
name | string | Full three-part (catalog, schema, table) name of the table. |
spec | object | Specification of the online table. |
status | object | Online Table data synchronization status |
table_serving_url | string | Data serving REST API URL for this table |
unity_catalog_provisioning_state | string | The provisioning state of the online table entity in Unity Catalog. This is distinct from the state of the data synchronization pipeline (i.e. the table may be in "ACTIVE" but the pipeline may be in "PROVISIONING" as it runs asynchronously). (ACTIVE, DEGRADED, DELETING, FAILED, PROVISIONING, UPDATING) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, deployment_name | Get information about an existing online table and its status. | |
create | insert | deployment_name, table | Create a new Online Table. | |
delete | delete | name, deployment_name | Delete an online table. Warning: This will delete all the data in the online table. If the source |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
name | string | Full three-part (catalog, schema, table) name of the table. |
SELECT examples
- get
Get information about an existing online table and its status.
SELECT
name,
spec,
status,
table_serving_url,
unity_catalog_provisioning_state
FROM databricks_workspace.catalog.online_tables
WHERE name = '{{ name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
INSERT examples
- create
- Manifest
Create a new Online Table.
INSERT INTO databricks_workspace.catalog.online_tables (
table,
deployment_name
)
SELECT
'{{ table }}' /* required */,
'{{ deployment_name }}'
RETURNING
name,
spec,
status,
table_serving_url,
unity_catalog_provisioning_state
;
# Description fields are for documentation purposes
- name: online_tables
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the online_tables resource.
- name: table
description: |
Specification of the online table to be created.
value:
name: "{{ name }}"
spec:
perform_full_copy: {{ perform_full_copy }}
pipeline_id: "{{ pipeline_id }}"
primary_key_columns:
- "{{ primary_key_columns }}"
run_continuously: "{{ run_continuously }}"
run_triggered: "{{ run_triggered }}"
source_table_full_name: "{{ source_table_full_name }}"
timeseries_key: "{{ timeseries_key }}"
status:
continuous_update_status:
initial_pipeline_sync_progress:
estimated_completion_time_seconds: {{ estimated_completion_time_seconds }}
latest_version_currently_processing: {{ latest_version_currently_processing }}
sync_progress_completion: {{ sync_progress_completion }}
synced_row_count: {{ synced_row_count }}
total_row_count: {{ total_row_count }}
last_processed_commit_version: {{ last_processed_commit_version }}
timestamp: "{{ timestamp }}"
detailed_state: "{{ detailed_state }}"
failed_status:
last_processed_commit_version: {{ last_processed_commit_version }}
timestamp: "{{ timestamp }}"
message: "{{ message }}"
provisioning_status:
initial_pipeline_sync_progress:
estimated_completion_time_seconds: {{ estimated_completion_time_seconds }}
latest_version_currently_processing: {{ latest_version_currently_processing }}
sync_progress_completion: {{ sync_progress_completion }}
synced_row_count: {{ synced_row_count }}
total_row_count: {{ total_row_count }}
triggered_update_status:
last_processed_commit_version: {{ last_processed_commit_version }}
timestamp: "{{ timestamp }}"
triggered_update_progress:
estimated_completion_time_seconds: {{ estimated_completion_time_seconds }}
latest_version_currently_processing: {{ latest_version_currently_processing }}
sync_progress_completion: {{ sync_progress_completion }}
synced_row_count: {{ synced_row_count }}
total_row_count: {{ total_row_count }}
table_serving_url: "{{ table_serving_url }}"
unity_catalog_provisioning_state: "{{ unity_catalog_provisioning_state }}"
DELETE examples
- delete
Delete an online table. Warning: This will delete all the data in the online table. If the source
DELETE FROM databricks_workspace.catalog.online_tables
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;