Database Instances¶
These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.database module.
- class databricks.sdk.service.database.CustomTag(key: 'Optional[str]' = None, value: 'Optional[str]' = None)¶
- key: str | None = None¶
The key of the custom tag.
- value: str | None = None¶
The value of the custom tag.
- as_dict() dict¶
Serializes the CustomTag into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CustomTag into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.database.DatabaseCatalog(name: 'str', database_instance_name: 'str', database_name: 'str', create_database_if_not_exists: 'Optional[bool]' = None, uid: 'Optional[str]' = None)¶
- name: str¶
The name of the catalog in UC.
- database_instance_name: str¶
The name of the DatabaseInstance housing the database.
- database_name: str¶
The name of the database (in an instance) associated with the catalog.
- create_database_if_not_exists: bool | None = None¶
- uid: str | None = None¶
- as_dict() dict¶
Serializes the DatabaseCatalog into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DatabaseCatalog into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DatabaseCatalog¶
Deserializes the DatabaseCatalog from a dictionary.
- class databricks.sdk.service.database.DatabaseCredential(expiration_time: 'Optional[str]' = None, token: 'Optional[str]' = None)¶
- expiration_time: str | None = None¶
- token: str | None = None¶
- as_dict() dict¶
Serializes the DatabaseCredential into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DatabaseCredential into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DatabaseCredential¶
Deserializes the DatabaseCredential from a dictionary.
- class databricks.sdk.service.database.DatabaseInstance(name: str, capacity: str | None = None, child_instance_refs: List[DatabaseInstanceRef] | None = None, creation_time: str | None = None, creator: str | None = None, custom_tags: List[CustomTag] | None = None, effective_capacity: str | None = None, effective_custom_tags: List[CustomTag] | None = None, effective_enable_pg_native_login: bool | None = None, effective_enable_readable_secondaries: bool | None = None, effective_node_count: int | None = None, effective_retention_window_in_days: int | None = None, effective_stopped: bool | None = None, effective_usage_policy_id: str | None = None, enable_pg_native_login: bool | None = None, enable_readable_secondaries: bool | None = None, node_count: int | None = None, parent_instance_ref: DatabaseInstanceRef | None = None, pg_version: str | None = None, read_only_dns: str | None = None, read_write_dns: str | None = None, retention_window_in_days: int | None = None, state: DatabaseInstanceState | None = None, stopped: bool | None = None, uid: str | None = None, usage_policy_id: str | None = None)¶
A DatabaseInstance represents a logical Postgres instance, comprised of both compute and storage.
- name: str¶
The name of the instance. This is the unique identifier for the instance.
- capacity: str | None = None¶
The sku of the instance. Valid values are “CU_1”, “CU_2”, “CU_4”, “CU_8”.
- child_instance_refs: List[DatabaseInstanceRef] | None = None¶
The refs of the child instances. This is only available if the instance is parent instance.
- creation_time: str | None = None¶
The timestamp when the instance was created.
- creator: str | None = None¶
The email of the creator of the instance.
- custom_tags: List[CustomTag] | None = None¶
Custom tags associated with the instance. This field is only included on create and update responses.
- effective_capacity: str | None = None¶
Deprecated. The sku of the instance; this field will always match the value of capacity. 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_custom_tags: List[CustomTag] | None = None¶
The recorded custom tags associated with the instance. 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_enable_pg_native_login: bool | None = None¶
Whether the instance has PG native password login enabled. 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_enable_readable_secondaries: bool | None = None¶
Whether secondaries serving read-only traffic are enabled. Defaults to false. 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_node_count: int | None = None¶
The number of nodes in the instance, composed of 1 primary and 0 or more secondaries. Defaults to 1 primary and 0 secondaries. 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_retention_window_in_days: int | None = None¶
The retention window for the instance. This is the time window in days for which the historical data is retained. 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_stopped: bool | None = None¶
Whether the instance is stopped. 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_usage_policy_id: str | None = None¶
The policy that is applied to the instance. 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.
- enable_pg_native_login: bool | None = None¶
Whether to enable PG native password login on the instance. Defaults to false.
- enable_readable_secondaries: bool | None = None¶
Whether to enable secondaries to serve read-only traffic. Defaults to false.
- node_count: int | None = None¶
The number of nodes in the instance, composed of 1 primary and 0 or more secondaries. Defaults to 1 primary and 0 secondaries. This field is input only, see effective_node_count for the output.
- parent_instance_ref: DatabaseInstanceRef | None = None¶
The ref of the parent instance. This is only available if the instance is child instance. Input: For specifying the parent instance to create a child instance. Optional. Output: Only populated if provided as input to create a child instance.
- pg_version: str | None = None¶
The version of Postgres running on the instance.
- read_only_dns: str | None = None¶
The DNS endpoint to connect to the instance for read only access. This is only available if enable_readable_secondaries is true.
- read_write_dns: str | None = None¶
The DNS endpoint to connect to the instance for read+write access.
- retention_window_in_days: int | None = None¶
The retention window for the instance. This is the time window in days for which the historical data is retained. The default value is 7 days. Valid values are 2 to 35 days.
- state: DatabaseInstanceState | None = None¶
The current state of the instance.
- stopped: bool | None = None¶
Whether to stop the instance. An input only param, see effective_stopped for the output.
- uid: str | None = None¶
An immutable UUID identifier for the instance.
- usage_policy_id: str | None = None¶
The desired usage policy to associate with the instance.
- as_dict() dict¶
Serializes the DatabaseInstance into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DatabaseInstance into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DatabaseInstance¶
Deserializes the DatabaseInstance from a dictionary.
- class databricks.sdk.service.database.DatabaseInstanceRef(branch_time: str | None = None, effective_lsn: str | None = None, lsn: str | None = None, name: str | None = None, uid: str | None = None)¶
DatabaseInstanceRef is a reference to a database instance. It is used in the DatabaseInstance object to refer to the parent instance of an instance and to refer the child instances of an instance. To specify as a parent instance during creation of an instance, the lsn and branch_time fields are optional. If not specified, the child instance will be created from the latest lsn of the parent. If both lsn and branch_time are specified, the lsn will be used to create the child instance.
- branch_time: str | None = None¶
Branch time of the ref database instance. For a parent ref instance, this is the point in time on the parent instance from which the instance was created. For a child ref instance, this is the point in time on the instance from which the child instance was created. Input: For specifying the point in time to create a child instance. Optional. Output: Only populated if provided as input to create a child instance.
- effective_lsn: str | None = None¶
For a parent ref instance, this is the LSN on the parent instance from which the instance was created. For a child ref instance, this is the LSN on the instance from which the child instance was created. 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.
- lsn: str | None = None¶
User-specified WAL LSN of the ref database instance.
Input: For specifying the WAL LSN to create a child instance. Optional. Output: Only populated if provided as input to create a child instance.
- name: str | None = None¶
Name of the ref database instance.
- uid: str | None = None¶
Id of the ref database instance.
- as_dict() dict¶
Serializes the DatabaseInstanceRef into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DatabaseInstanceRef into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DatabaseInstanceRef¶
Deserializes the DatabaseInstanceRef from a dictionary.
- class databricks.sdk.service.database.DatabaseInstanceRole(name: str, attributes: DatabaseInstanceRoleAttributes | None = None, effective_attributes: DatabaseInstanceRoleAttributes | None = None, identity_type: DatabaseInstanceRoleIdentityType | None = None, instance_name: str | None = None, membership_role: DatabaseInstanceRoleMembershipRole | None = None)¶
A DatabaseInstanceRole represents a Postgres role in a database instance.
- name: str¶
The name of the role. This is the unique identifier for the role in an instance.
- attributes: DatabaseInstanceRoleAttributes | None = None¶
The desired API-exposed Postgres role attribute to associate with the role. Optional.
- effective_attributes: DatabaseInstanceRoleAttributes | None = None¶
The attributes that are applied to the role. 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.
- identity_type: DatabaseInstanceRoleIdentityType | None = None¶
The type of the role.
- instance_name: str | None = None¶
- membership_role: DatabaseInstanceRoleMembershipRole | None = None¶
An enum value for a standard role that this role is a member of.
- as_dict() dict¶
Serializes the DatabaseInstanceRole into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DatabaseInstanceRole into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DatabaseInstanceRole¶
Deserializes the DatabaseInstanceRole from a dictionary.
- class databricks.sdk.service.database.DatabaseInstanceRoleAttributes(bypassrls: bool | None = None, createdb: bool | None = None, createrole: bool | None = None)¶
Attributes that can be granted to a Postgres role. We are only implementing a subset for now, see xref: https://www.postgresql.org/docs/16/sql-createrole.html The values follow Postgres keyword naming e.g. CREATEDB, BYPASSRLS, etc. which is why they don’t include typical underscores between words. We were requested to make this a nested object/struct representation since these are knobs from an external spec.
- bypassrls: bool | None = None¶
- createdb: bool | None = None¶
- createrole: bool | None = None¶
- as_dict() dict¶
Serializes the DatabaseInstanceRoleAttributes into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DatabaseInstanceRoleAttributes into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DatabaseInstanceRoleAttributes¶
Deserializes the DatabaseInstanceRoleAttributes from a dictionary.
- class databricks.sdk.service.database.DatabaseInstanceRoleIdentityType¶
- GROUP = "GROUP"¶
- PG_ONLY = "PG_ONLY"¶
- SERVICE_PRINCIPAL = "SERVICE_PRINCIPAL"¶
- USER = "USER"¶
- class databricks.sdk.service.database.DatabaseInstanceRoleMembershipRole¶
Roles that the DatabaseInstanceRole can be a member of.
- DATABRICKS_SUPERUSER = "DATABRICKS_SUPERUSER"¶
- class databricks.sdk.service.database.DatabaseInstanceState¶
- AVAILABLE = "AVAILABLE"¶
- DELETING = "DELETING"¶
- FAILING_OVER = "FAILING_OVER"¶
- STARTING = "STARTING"¶
- STOPPED = "STOPPED"¶
- UPDATING = "UPDATING"¶
- class databricks.sdk.service.database.DatabaseTable(name: 'str', database_instance_name: 'Optional[str]' = None, logical_database_name: 'Optional[str]' = None)¶
- name: str¶
Full three-part (catalog, schema, table) name of the table.
- database_instance_name: str | None = None¶
Name of the target database instance. This is required when creating database tables in standard catalogs. This is optional when creating database tables in registered catalogs. If this field is specified when creating database tables in registered catalogs, the database instance name MUST match that of the registered catalog (or the request will be rejected).
- logical_database_name: str | None = None¶
Target Postgres database object (logical database) name for this table.
When creating a table in a standard catalog, this field is required. In this scenario, specifying this field will allow targeting an arbitrary postgres database.
Registration of database tables via /database/tables is currently only supported in standard catalogs.
- as_dict() dict¶
Serializes the DatabaseTable into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DatabaseTable into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DatabaseTable¶
Deserializes the DatabaseTable from a dictionary.
- class databricks.sdk.service.database.DeltaTableSyncInfo(delta_commit_timestamp: 'Optional[str]' = None, delta_commit_version: 'Optional[int]' = None)¶
- delta_commit_timestamp: str | None = None¶
The timestamp when the above Delta version was committed in the source Delta table. Note: This is the Delta commit time, not the time the data was written to the synced table.
- delta_commit_version: int | None = None¶
The Delta Lake commit version that was last successfully synced.
- as_dict() dict¶
Serializes the DeltaTableSyncInfo into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DeltaTableSyncInfo into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DeltaTableSyncInfo¶
Deserializes the DeltaTableSyncInfo from a dictionary.
- class databricks.sdk.service.database.ListDatabaseCatalogsResponse(database_catalogs: 'Optional[List[DatabaseCatalog]]' = None, next_page_token: 'Optional[str]' = None)¶
- database_catalogs: List[DatabaseCatalog] | None = None¶
- next_page_token: str | None = None¶
Pagination token to request the next page of database catalogs.
- as_dict() dict¶
Serializes the ListDatabaseCatalogsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListDatabaseCatalogsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListDatabaseCatalogsResponse¶
Deserializes the ListDatabaseCatalogsResponse from a dictionary.
- class databricks.sdk.service.database.ListDatabaseInstanceRolesResponse(database_instance_roles: 'Optional[List[DatabaseInstanceRole]]' = None, next_page_token: 'Optional[str]' = None)¶
- database_instance_roles: List[DatabaseInstanceRole] | None = None¶
List of database instance roles.
- next_page_token: str | None = None¶
Pagination token to request the next page of instances.
- as_dict() dict¶
Serializes the ListDatabaseInstanceRolesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListDatabaseInstanceRolesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListDatabaseInstanceRolesResponse¶
Deserializes the ListDatabaseInstanceRolesResponse from a dictionary.
- class databricks.sdk.service.database.ListDatabaseInstancesResponse(database_instances: 'Optional[List[DatabaseInstance]]' = None, next_page_token: 'Optional[str]' = None)¶
- database_instances: List[DatabaseInstance] | None = None¶
List of instances.
- next_page_token: str | None = None¶
Pagination token to request the next page of instances.
- as_dict() dict¶
Serializes the ListDatabaseInstancesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListDatabaseInstancesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListDatabaseInstancesResponse¶
Deserializes the ListDatabaseInstancesResponse from a dictionary.
- class databricks.sdk.service.database.ListSyncedDatabaseTablesResponse(next_page_token: 'Optional[str]' = None, synced_tables: 'Optional[List[SyncedDatabaseTable]]' = None)¶
- next_page_token: str | None = None¶
Pagination token to request the next page of synced tables.
- synced_tables: List[SyncedDatabaseTable] | None = None¶
- as_dict() dict¶
Serializes the ListSyncedDatabaseTablesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListSyncedDatabaseTablesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListSyncedDatabaseTablesResponse¶
Deserializes the ListSyncedDatabaseTablesResponse from a dictionary.
- class databricks.sdk.service.database.NewPipelineSpec(budget_policy_id: str | None = None, storage_catalog: str | None = None, storage_schema: str | None = None)¶
Custom fields that user can set for pipeline while creating SyncedDatabaseTable. Note that other fields of pipeline are still inferred by table def internally
- budget_policy_id: str | None = None¶
Budget policy to set on the newly created pipeline.
- storage_catalog: str | None = None¶
This field needs to be specified if the destination catalog is a managed postgres catalog.
UC catalog for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be a standard catalog where the user has permissions to create Delta tables.
- storage_schema: str | None = None¶
This field needs to be specified if the destination catalog is a managed postgres catalog.
UC schema for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be in the standard catalog where the user has permissions to create Delta tables.
- as_dict() dict¶
Serializes the NewPipelineSpec into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the NewPipelineSpec into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) NewPipelineSpec¶
Deserializes the NewPipelineSpec from a dictionary.
- class databricks.sdk.service.database.ProvisioningInfoState¶
- ACTIVE = "ACTIVE"¶
- DEGRADED = "DEGRADED"¶
- DELETING = "DELETING"¶
- FAILED = "FAILED"¶
- PROVISIONING = "PROVISIONING"¶
- UPDATING = "UPDATING"¶
- class databricks.sdk.service.database.ProvisioningPhase¶
- PROVISIONING_PHASE_INDEX_SCAN = "PROVISIONING_PHASE_INDEX_SCAN"¶
- PROVISIONING_PHASE_INDEX_SORT = "PROVISIONING_PHASE_INDEX_SORT"¶
- PROVISIONING_PHASE_MAIN = "PROVISIONING_PHASE_MAIN"¶
- class databricks.sdk.service.database.RequestedClaims(permission_set: 'Optional[RequestedClaimsPermissionSet]' = None, resources: 'Optional[List[RequestedResource]]' = None)¶
- permission_set: RequestedClaimsPermissionSet | None = None¶
- resources: List[RequestedResource] | None = None¶
- as_dict() dict¶
Serializes the RequestedClaims into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RequestedClaims into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RequestedClaims¶
Deserializes the RequestedClaims from a dictionary.
- class databricks.sdk.service.database.RequestedClaimsPermissionSet¶
Might add WRITE in the future
- READ_ONLY = "READ_ONLY"¶
- class databricks.sdk.service.database.RequestedResource(table_name: 'Optional[str]' = None, unspecified_resource_name: 'Optional[str]' = None)¶
- table_name: str | None = None¶
- unspecified_resource_name: str | None = None¶
- as_dict() dict¶
Serializes the RequestedResource into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RequestedResource into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RequestedResource¶
Deserializes the RequestedResource from a dictionary.
- class databricks.sdk.service.database.SyncedDatabaseTable(name: 'str', data_synchronization_status: 'Optional[SyncedTableStatus]' = None, database_instance_name: 'Optional[str]' = None, effective_database_instance_name: 'Optional[str]' = None, effective_logical_database_name: 'Optional[str]' = None, logical_database_name: 'Optional[str]' = None, spec: 'Optional[SyncedTableSpec]' = None, unity_catalog_provisioning_state: 'Optional[ProvisioningInfoState]' = None)¶
- name: str¶
Full three-part (catalog, schema, table) name of the table.
- data_synchronization_status: SyncedTableStatus | None = None¶
Synced Table data synchronization status
- database_instance_name: str | None = None¶
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: str | None = None¶
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: str | None = None¶
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: str | None = None¶
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.
- spec: SyncedTableSpec | None = None¶
- unity_catalog_provisioning_state: ProvisioningInfoState | None = None¶
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).
- as_dict() dict¶
Serializes the SyncedDatabaseTable into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedDatabaseTable into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedDatabaseTable¶
Deserializes the SyncedDatabaseTable from a dictionary.
- class databricks.sdk.service.database.SyncedTableContinuousUpdateStatus(initial_pipeline_sync_progress: SyncedTablePipelineProgress | None = None, last_processed_commit_version: int | None = None, timestamp: str | None = None)¶
Detailed status of a synced table. Shown if the synced table is in the SYNCED_CONTINUOUS_UPDATE or the SYNCED_UPDATING_PIPELINE_RESOURCES state.
- initial_pipeline_sync_progress: SyncedTablePipelineProgress | None = None¶
Progress of the initial data synchronization.
- last_processed_commit_version: int | None = None¶
The last source table Delta version that was successfully synced to the synced table.
- timestamp: str | None = None¶
The end timestamp of the last time any data was synchronized from the source table to the synced table. This is when the data is available in the synced table.
- as_dict() dict¶
Serializes the SyncedTableContinuousUpdateStatus into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTableContinuousUpdateStatus into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTableContinuousUpdateStatus¶
Deserializes the SyncedTableContinuousUpdateStatus from a dictionary.
- class databricks.sdk.service.database.SyncedTableFailedStatus(last_processed_commit_version: int | None = None, timestamp: str | None = None)¶
Detailed status of a synced table. Shown if the synced table is in the OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state.
- last_processed_commit_version: int | None = None¶
The last source table Delta version that was successfully synced to the synced table. The last source table Delta version that was synced to the synced table. Only populated if the table is still synced and available for serving.
- timestamp: str | None = None¶
The end timestamp of the last time any data was synchronized from the source table to the synced table. Only populated if the table is still synced and available for serving.
- as_dict() dict¶
Serializes the SyncedTableFailedStatus into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTableFailedStatus into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTableFailedStatus¶
Deserializes the SyncedTableFailedStatus from a dictionary.
- class databricks.sdk.service.database.SyncedTablePipelineProgress(estimated_completion_time_seconds: float | None = None, latest_version_currently_processing: int | None = None, provisioning_phase: ProvisioningPhase | None = None, sync_progress_completion: float | None = None, synced_row_count: int | None = None, total_row_count: int | None = None)¶
Progress information of the Synced Table data synchronization pipeline.
- estimated_completion_time_seconds: float | None = None¶
The estimated time remaining to complete this update in seconds.
- latest_version_currently_processing: int | None = None¶
The source table Delta version that was last processed by the pipeline. The pipeline may not have completely processed this version yet.
- provisioning_phase: ProvisioningPhase | None = None¶
The current phase of the data synchronization pipeline.
- sync_progress_completion: float | None = None¶
The completion ratio of this update. This is a number between 0 and 1.
- synced_row_count: int | None = None¶
The number of rows that have been synced in this update.
- total_row_count: int | None = None¶
The total number of rows that need to be synced in this update. This number may be an estimate.
- as_dict() dict¶
Serializes the SyncedTablePipelineProgress into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTablePipelineProgress into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTablePipelineProgress¶
Deserializes the SyncedTablePipelineProgress from a dictionary.
- class databricks.sdk.service.database.SyncedTablePosition(delta_table_sync_info: 'Optional[DeltaTableSyncInfo]' = None, sync_end_timestamp: 'Optional[str]' = None, sync_start_timestamp: 'Optional[str]' = None)¶
- delta_table_sync_info: DeltaTableSyncInfo | None = None¶
- sync_end_timestamp: str | None = None¶
The end timestamp of the most recent successful synchronization. This is the time when the data is available in the synced table.
- sync_start_timestamp: str | None = None¶
The starting timestamp of the most recent successful synchronization from the source table to the destination (synced) table. Note this is the starting timestamp of the sync operation, not the end time. E.g., for a batch, this is the time when the sync operation started.
- as_dict() dict¶
Serializes the SyncedTablePosition into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTablePosition into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTablePosition¶
Deserializes the SyncedTablePosition from a dictionary.
- class databricks.sdk.service.database.SyncedTableProvisioningStatus(initial_pipeline_sync_progress: SyncedTablePipelineProgress | None = None)¶
Detailed status of a synced table. Shown if the synced table is in the PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state.
- initial_pipeline_sync_progress: SyncedTablePipelineProgress | None = None¶
Details about initial data synchronization. Only populated when in the PROVISIONING_INITIAL_SNAPSHOT state.
- as_dict() dict¶
Serializes the SyncedTableProvisioningStatus into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTableProvisioningStatus into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTableProvisioningStatus¶
Deserializes the SyncedTableProvisioningStatus from a dictionary.
- class databricks.sdk.service.database.SyncedTableSchedulingPolicy¶
- CONTINUOUS = "CONTINUOUS"¶
- SNAPSHOT = "SNAPSHOT"¶
- TRIGGERED = "TRIGGERED"¶
- class databricks.sdk.service.database.SyncedTableSpec(accelerated_sync: bool | None = None, create_database_objects_if_missing: bool | None = None, existing_pipeline_id: str | None = None, new_pipeline_spec: NewPipelineSpec | None = None, primary_key_columns: List[str] | None = None, scheduling_policy: SyncedTableSchedulingPolicy | None = None, source_table_full_name: str | None = None, timeseries_key: str | None = None, type_overrides: List[SyncedTableSpecTypeOverride] | None = None)¶
Specification of a synced database table.
- accelerated_sync: bool | None = None¶
When true, enables accelerated sync mode for the initial data load. This significantly improves performance for large tables. Requires workspace-level enablement.
- create_database_objects_if_missing: bool | None = None¶
If true, the synced table’s logical database and schema resources in PG will be created if they do not already exist.
- existing_pipeline_id: str | None = None¶
At most one of existing_pipeline_id and new_pipeline_spec should be defined.
If existing_pipeline_id is defined, the synced table will be bin packed into the existing pipeline referenced. This avoids creating a new pipeline and allows sharing existing compute. In this case, the scheduling_policy of this synced table must match the scheduling policy of the existing pipeline.
- new_pipeline_spec: NewPipelineSpec | None = None¶
At most one of existing_pipeline_id and new_pipeline_spec should be defined.
If new_pipeline_spec is defined, a new pipeline is created for this synced table. The location pointed to is used to store intermediate files (checkpoints, event logs etc). The caller must have write permissions to create Delta tables in the specified catalog and schema. Again, note this requires write permissions, whereas the source table only requires read permissions.
- primary_key_columns: List[str] | None = None¶
Primary Key columns to be used for data insert/update in the destination.
- scheduling_policy: SyncedTableSchedulingPolicy | None = None¶
Scheduling policy of the underlying pipeline.
- source_table_full_name: str | None = None¶
Three-part (catalog, schema, table) name of the source Delta table.
- timeseries_key: str | None = None¶
Time series key to deduplicate (tie-break) rows with the same primary key.
- type_overrides: List[SyncedTableSpecTypeOverride] | None = None¶
Override the default Delta->PG type mapping for specific columns. A TypeOverride with PG_SPECIFIC_TYPE_UNSPECIFIED is rejected; a valid pg_type must be set.
- as_dict() dict¶
Serializes the SyncedTableSpec into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTableSpec into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTableSpec¶
Deserializes the SyncedTableSpec from a dictionary.
- class databricks.sdk.service.database.SyncedTableSpecPgSpecificType¶
PostgreSQL-specific target types that can override the default Delta-to-PG mapping.
- PG_SPECIFIC_TYPE_VECTOR = "PG_SPECIFIC_TYPE_VECTOR"¶
- class databricks.sdk.service.database.SyncedTableSpecTypeOverride(column_name: str, pg_type: SyncedTableSpecPgSpecificType, size: int | None = None)¶
Overrides the default Delta-to-PostgreSQL type mapping for a single column.
- column_name: str¶
Name of the source column whose target PostgreSQL type should be overridden.
- pg_type: SyncedTableSpecPgSpecificType¶
PostgreSQL-specific target type to use for the column.
- size: int | None = None¶
Size parameter for the target type. Required when pg_type is PG_SPECIFIC_TYPE_VECTOR (specifies the vector dimension, e.g., 1024).
- as_dict() dict¶
Serializes the SyncedTableSpecTypeOverride into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTableSpecTypeOverride into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTableSpecTypeOverride¶
Deserializes the SyncedTableSpecTypeOverride from a dictionary.
- class databricks.sdk.service.database.SyncedTableState¶
The state of a synced table.
- SYNCED_TABLED_OFFLINE = "SYNCED_TABLED_OFFLINE"¶
- SYNCED_TABLE_OFFLINE_FAILED = "SYNCED_TABLE_OFFLINE_FAILED"¶
- SYNCED_TABLE_ONLINE = "SYNCED_TABLE_ONLINE"¶
- SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE = "SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE"¶
- SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE = "SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE"¶
- SYNCED_TABLE_ONLINE_PIPELINE_FAILED = "SYNCED_TABLE_ONLINE_PIPELINE_FAILED"¶
- SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE = "SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE"¶
- SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES = "SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES"¶
- SYNCED_TABLE_PROVISIONING = "SYNCED_TABLE_PROVISIONING"¶
- SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT = "SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT"¶
- SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES = "SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES"¶
- class databricks.sdk.service.database.SyncedTableStatus(continuous_update_status: SyncedTableContinuousUpdateStatus | None = None, detailed_state: SyncedTableState | None = None, failed_status: SyncedTableFailedStatus | None = None, last_sync: SyncedTablePosition | None = None, message: str | None = None, pipeline_id: str | None = None, provisioning_status: SyncedTableProvisioningStatus | None = None, triggered_update_status: SyncedTableTriggeredUpdateStatus | None = None)¶
Status of a synced table.
- continuous_update_status: SyncedTableContinuousUpdateStatus | None = None¶
- detailed_state: SyncedTableState | None = None¶
The state of the synced table.
- failed_status: SyncedTableFailedStatus | None = None¶
- last_sync: SyncedTablePosition | None = None¶
Summary of the last successful synchronization from source to destination.
Will always be present if there has been a successful sync. Even if the most recent syncs have failed.
Limitation: The only exception is if the synced table is doing a FULL REFRESH, then the last sync information will not be available until the full refresh is complete. This limitation will be addressed in a future version.
This top-level field is a convenience for consumers who want easy access to last sync information without having to traverse detailed_status.
- message: str | None = None¶
A text description of the current state of the synced table.
- pipeline_id: str | None = None¶
ID of the associated pipeline. The pipeline ID may have been provided by the client (in the case of bin packing), or generated by the server (when creating a new pipeline).
- provisioning_status: SyncedTableProvisioningStatus | None = None¶
- triggered_update_status: SyncedTableTriggeredUpdateStatus | None = None¶
- as_dict() dict¶
Serializes the SyncedTableStatus into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTableStatus into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTableStatus¶
Deserializes the SyncedTableStatus from a dictionary.
- class databricks.sdk.service.database.SyncedTableTriggeredUpdateStatus(last_processed_commit_version: int | None = None, timestamp: str | None = None, triggered_update_progress: SyncedTablePipelineProgress | None = None)¶
Detailed status of a synced table. Shown if the synced table is in the SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state.
- last_processed_commit_version: int | None = None¶
The last source table Delta version that was successfully synced to the synced table.
- timestamp: str | None = None¶
The end timestamp of the last time any data was synchronized from the source table to the synced table. This is when the data is available in the synced table.
- triggered_update_progress: SyncedTablePipelineProgress | None = None¶
Progress of the active data synchronization pipeline.
- as_dict() dict¶
Serializes the SyncedTableTriggeredUpdateStatus into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SyncedTableTriggeredUpdateStatus into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SyncedTableTriggeredUpdateStatus¶
Deserializes the SyncedTableTriggeredUpdateStatus from a dictionary.