online_tables
Creates, updates, deletes, gets or lists an online_tables
resource.
Overview
Name | online_tables |
Type | Resource |
Id | databricks_workspace.unitycatalog.online_tables |
Fields
The following fields are returned by SELECT
queries:
- get
Request completed successfully.
Name | Datatype | Description |
---|---|---|
name | string | |
spec | object | |
status | object | |
table_serving_url | string | |
unity_catalog_provisioning_state | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Get information about an existing online table and its status. | |
create | insert | deployment_name | Create a new Online Table. | |
delete | delete | 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! |
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) |
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.unitycatalog.online_tables
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Create a new Online Table.
INSERT INTO databricks_workspace.unitycatalog.online_tables (
data__name,
data__spec,
deployment_name
)
SELECT
'{{ name }}',
'{{ spec }}',
'{{ 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: string
description: Required parameter for the online_tables resource.
- name: name
value: string
- name: spec
value: object
DELETE
examples
- delete
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!
DELETE FROM databricks_workspace.unitycatalog.online_tables
WHERE deployment_name = '{{ deployment_name }}' --required;