synced_database_tables
Creates, updates, deletes, gets or lists a synced_database_tables resource.
Overview
| Name | synced_database_tables |
| Type | Resource |
| Id | databricks_workspace.database.synced_database_tables |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Full three-part (catalog, schema, table) name of the table. |
database_instance_name | string | Name of the target database instance. This is required when creating synced database tables in standard catalogs. This is optional when creating synced database tables in registered catalogs. If this field is specified when creating synced database tables in registered catalogs, the database instance name MUST match that of the registered catalog (or the request will be rejected). |
effective_database_instance_name | string | The name of the database instance that this table is registered to. This field is always returned, and for tables inside database catalogs is inferred database instance associated with the catalog. This is an output only field that contains the value computed from the input field combined with server side defaults. Use the field without the effective_ prefix to set the value. |
effective_logical_database_name | string | The name of the logical database that this table is registered to. This is an output only field that contains the value computed from the input field combined with server side defaults. Use the field without the effective_ prefix to set the value. |
logical_database_name | string | Target Postgres database object (logical database) name for this table. When creating a synced table in a registered Postgres catalog, the target Postgres database name is inferred to be that of the registered catalog. If this field is specified in this scenario, the Postgres database name MUST match that of the registered catalog (or the request will be rejected). When creating a synced table in a standard catalog, this field is required. In this scenario, specifying this field will allow targeting an arbitrary postgres database. Note that this has implications for the `create_database_objects_is_missing` field in `spec`. |
data_synchronization_status | object | Synced Table data synchronization status |
spec | object | Specification of a synced database table. |
unity_catalog_provisioning_state | string | The provisioning state of the synced 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) |
| Name | Datatype | Description |
|---|---|---|
name | string | Full three-part (catalog, schema, table) name of the table. |
database_instance_name | string | Name of the target database instance. This is required when creating synced database tables in standard catalogs. This is optional when creating synced database tables in registered catalogs. If this field is specified when creating synced database tables in registered catalogs, the database instance name MUST match that of the registered catalog (or the request will be rejected). |
effective_database_instance_name | string | The name of the database instance that this table is registered to. This field is always returned, and for tables inside database catalogs is inferred database instance associated with the catalog. This is an output only field that contains the value computed from the input field combined with server side defaults. Use the field without the effective_ prefix to set the value. |
effective_logical_database_name | string | The name of the logical database that this table is registered to. This is an output only field that contains the value computed from the input field combined with server side defaults. Use the field without the effective_ prefix to set the value. |
logical_database_name | string | Target Postgres database object (logical database) name for this table. When creating a synced table in a registered Postgres catalog, the target Postgres database name is inferred to be that of the registered catalog. If this field is specified in this scenario, the Postgres database name MUST match that of the registered catalog (or the request will be rejected). When creating a synced table in a standard catalog, this field is required. In this scenario, specifying this field will allow targeting an arbitrary postgres database. Note that this has implications for the `create_database_objects_is_missing` field in `spec`. |
data_synchronization_status | object | Synced Table data synchronization status |
spec | object | Specification of a synced database table. |
unity_catalog_provisioning_state | string | The provisioning state of the synced 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 a Synced Database Table. | |
list | select | instance_name, deployment_name | page_size, page_token | This API is currently unimplemented, but exposed for Terraform support. |
create | insert | deployment_name, synced_table | Create a Synced Database Table. | |
update | update | name, update_mask, deployment_name, synced_table | This API is currently unimplemented, but exposed for Terraform support. | |
delete | delete | name, deployment_name | purge_data | Delete a Synced Database Table. |
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) |
instance_name | string | Name of the instance to get synced tables for. |
name | string | :param purge_data: bool (optional) Optional. When set to true, the actual PostgreSQL table will be dropped from the database. |
update_mask | string | The list of fields to update. Setting this field is not yet supported. |
page_size | integer | Upper bound for items returned. |
page_token | string | Pagination token to go to the next page of synced database tables. Requests first page if absent. |
purge_data | boolean |
SELECT examples
- get
- list
Get a Synced Database Table.
SELECT
name,
database_instance_name,
effective_database_instance_name,
effective_logical_database_name,
logical_database_name,
data_synchronization_status,
spec,
unity_catalog_provisioning_state
FROM databricks_workspace.database.synced_database_tables
WHERE name = '{{ name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
This API is currently unimplemented, but exposed for Terraform support.
SELECT
name,
database_instance_name,
effective_database_instance_name,
effective_logical_database_name,
logical_database_name,
data_synchronization_status,
spec,
unity_catalog_provisioning_state
FROM databricks_workspace.database.synced_database_tables
WHERE instance_name = '{{ instance_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Create a Synced Database Table.
INSERT INTO databricks_workspace.database.synced_database_tables (
synced_table,
deployment_name
)
SELECT
'{{ synced_table }}' /* required */,
'{{ deployment_name }}'
RETURNING
name,
database_instance_name,
effective_database_instance_name,
effective_logical_database_name,
logical_database_name,
data_synchronization_status,
spec,
unity_catalog_provisioning_state
;
# Description fields are for documentation purposes
- name: synced_database_tables
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the synced_database_tables resource.
- name: synced_table
description: |
:returns: :class:`SyncedDatabaseTable`
value:
name: "{{ name }}"
data_synchronization_status:
continuous_update_status:
initial_pipeline_sync_progress:
estimated_completion_time_seconds: {{ estimated_completion_time_seconds }}
latest_version_currently_processing: {{ latest_version_currently_processing }}
provisioning_phase: "{{ provisioning_phase }}"
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 }}"
last_sync:
delta_table_sync_info:
delta_commit_timestamp: "{{ delta_commit_timestamp }}"
delta_commit_version: {{ delta_commit_version }}
sync_end_timestamp: "{{ sync_end_timestamp }}"
sync_start_timestamp: "{{ sync_start_timestamp }}"
message: "{{ message }}"
pipeline_id: "{{ pipeline_id }}"
provisioning_status:
initial_pipeline_sync_progress:
estimated_completion_time_seconds: {{ estimated_completion_time_seconds }}
latest_version_currently_processing: {{ latest_version_currently_processing }}
provisioning_phase: "{{ provisioning_phase }}"
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 }}
provisioning_phase: "{{ provisioning_phase }}"
sync_progress_completion: {{ sync_progress_completion }}
synced_row_count: {{ synced_row_count }}
total_row_count: {{ total_row_count }}
database_instance_name: "{{ database_instance_name }}"
effective_database_instance_name: "{{ effective_database_instance_name }}"
effective_logical_database_name: "{{ effective_logical_database_name }}"
logical_database_name: "{{ logical_database_name }}"
spec:
create_database_objects_if_missing: {{ create_database_objects_if_missing }}
existing_pipeline_id: "{{ existing_pipeline_id }}"
new_pipeline_spec:
budget_policy_id: "{{ budget_policy_id }}"
storage_catalog: "{{ storage_catalog }}"
storage_schema: "{{ storage_schema }}"
primary_key_columns:
- "{{ primary_key_columns }}"
scheduling_policy: "{{ scheduling_policy }}"
source_table_full_name: "{{ source_table_full_name }}"
timeseries_key: "{{ timeseries_key }}"
unity_catalog_provisioning_state: "{{ unity_catalog_provisioning_state }}"
UPDATE examples
- update
This API is currently unimplemented, but exposed for Terraform support.
UPDATE databricks_workspace.database.synced_database_tables
SET
synced_table = '{{ synced_table }}'
WHERE
name = '{{ name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND synced_table = '{{ synced_table }}' --required
RETURNING
name,
database_instance_name,
effective_database_instance_name,
effective_logical_database_name,
logical_database_name,
data_synchronization_status,
spec,
unity_catalog_provisioning_state;
DELETE examples
- delete
Delete a Synced Database Table.
DELETE FROM databricks_workspace.database.synced_database_tables
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND purge_data = '{{ purge_data }}'
;