online_tables
Operations on a online_tables
resource.
Overview
Name | online_tables |
Type | Resource |
Id | databricks_workspace.unitycatalog.online_tables |
Fields
Name | Datatype |
---|---|
name | string |
spec | object |
status | object |
table_serving_url | string |
unity_catalog_provisioning_state | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | name, deployment_name | Get information about an existing online table and its status. |
create | INSERT | deployment_name | 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 Delta table was deleted or modified since this Online Table was created, this will lose the data forever! |
SELECT
examples
SELECT
name,
spec,
status,
table_serving_url,
unity_catalog_provisioning_state
FROM databricks_workspace.unitycatalog.online_tables
WHERE name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new online_tables
resource.
- online_tables
- Manifest
/*+ create */
INSERT INTO databricks_workspace.unitycatalog.online_tables (
deployment_name,
data__name,
data__spec
)
SELECT
'{{ deployment_name }}',
'{{ name }}',
'{{ spec }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: spec
value:
run_continuously: {}
run_triggered: {}
source_table_full_name: string
primary_key_columns:
- string
timeseries_key: string
perform_full_copy: false
pipeline_id: string
DELETE
example
Deletes a online_tables
resource.
/*+ delete */
DELETE FROM databricks_workspace.unitycatalog.online_tables
WHERE name = '{{ name }}' AND
deployment_name = '{{ deployment_name }}';