Documentation
¶
Overview ¶
Database Instances provide access to a database via REST API or direct SQL.
Index ¶
- type CreateDatabaseCatalogRequest
- type CreateDatabaseInstanceRequest
- type CreateDatabaseTableRequest
- type CreateSyncedDatabaseTableRequest
- type DatabaseAPI
- func (a *DatabaseAPI) CreateDatabaseCatalog(ctx context.Context, request CreateDatabaseCatalogRequest) (*DatabaseCatalog, error)
- func (a *DatabaseAPI) CreateDatabaseInstance(ctx context.Context, request CreateDatabaseInstanceRequest) (*DatabaseInstance, error)
- func (a *DatabaseAPI) CreateDatabaseTable(ctx context.Context, request CreateDatabaseTableRequest) (*DatabaseTable, error)
- func (a *DatabaseAPI) CreateSyncedDatabaseTable(ctx context.Context, request CreateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
- func (a *DatabaseAPI) DeleteDatabaseCatalog(ctx context.Context, request DeleteDatabaseCatalogRequest) error
- func (a *DatabaseAPI) DeleteDatabaseCatalogByName(ctx context.Context, name string) error
- func (a *DatabaseAPI) DeleteDatabaseInstance(ctx context.Context, request DeleteDatabaseInstanceRequest) error
- func (a *DatabaseAPI) DeleteDatabaseInstanceByName(ctx context.Context, name string) error
- func (a *DatabaseAPI) DeleteDatabaseTable(ctx context.Context, request DeleteDatabaseTableRequest) error
- func (a *DatabaseAPI) DeleteDatabaseTableByName(ctx context.Context, name string) error
- func (a *DatabaseAPI) DeleteSyncedDatabaseTable(ctx context.Context, request DeleteSyncedDatabaseTableRequest) error
- func (a *DatabaseAPI) DeleteSyncedDatabaseTableByName(ctx context.Context, name string) error
- func (a *DatabaseAPI) FindDatabaseInstanceByUid(ctx context.Context, request FindDatabaseInstanceByUidRequest) (*DatabaseInstance, error)
- func (a *DatabaseAPI) GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)
- func (a *DatabaseAPI) GetDatabaseCatalog(ctx context.Context, request GetDatabaseCatalogRequest) (*DatabaseCatalog, error)
- func (a *DatabaseAPI) GetDatabaseCatalogByName(ctx context.Context, name string) (*DatabaseCatalog, error)
- func (a *DatabaseAPI) GetDatabaseInstance(ctx context.Context, request GetDatabaseInstanceRequest) (*DatabaseInstance, error)
- func (a *DatabaseAPI) GetDatabaseInstanceByName(ctx context.Context, name string) (*DatabaseInstance, error)
- func (a *DatabaseAPI) GetDatabaseTable(ctx context.Context, request GetDatabaseTableRequest) (*DatabaseTable, error)
- func (a *DatabaseAPI) GetDatabaseTableByName(ctx context.Context, name string) (*DatabaseTable, error)
- func (a *DatabaseAPI) GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
- func (a *DatabaseAPI) GetSyncedDatabaseTableByName(ctx context.Context, name string) (*SyncedDatabaseTable, error)
- func (a *DatabaseAPI) ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) listing.Iterator[DatabaseInstance]
- func (a *DatabaseAPI) ListDatabaseInstancesAll(ctx context.Context, request ListDatabaseInstancesRequest) ([]DatabaseInstance, error)
- func (a *DatabaseAPI) UpdateDatabaseInstance(ctx context.Context, request UpdateDatabaseInstanceRequest) (*DatabaseInstance, error)
- type DatabaseCatalog
- type DatabaseCredential
- type DatabaseInstance
- type DatabaseInstanceState
- type DatabaseInterface
- type DatabaseServicedeprecated
- type DatabaseTable
- type DeleteDatabaseCatalogRequest
- type DeleteDatabaseCatalogResponse
- type DeleteDatabaseInstanceRequest
- type DeleteDatabaseInstanceResponse
- type DeleteDatabaseTableRequest
- type DeleteDatabaseTableResponse
- type DeleteSyncedDatabaseTableRequest
- type DeleteSyncedDatabaseTableResponse
- type FindDatabaseInstanceByUidRequest
- type GenerateDatabaseCredentialRequest
- type GetDatabaseCatalogRequest
- type GetDatabaseInstanceRequest
- type GetDatabaseTableRequest
- type GetSyncedDatabaseTableRequest
- type ListDatabaseInstancesRequest
- type ListDatabaseInstancesResponse
- type NewPipelineSpec
- type ProvisioningInfoState
- type SyncedDatabaseTable
- type SyncedTableContinuousUpdateStatus
- type SyncedTableFailedStatus
- type SyncedTablePipelineProgress
- type SyncedTableProvisioningStatus
- type SyncedTableSchedulingPolicy
- type SyncedTableSpec
- type SyncedTableState
- type SyncedTableStatus
- type SyncedTableTriggeredUpdateStatus
- type UpdateDatabaseInstanceRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateDatabaseCatalogRequest ¶
type CreateDatabaseCatalogRequest struct {
Catalog DatabaseCatalog `json:"catalog"`
}
Create a Database Catalog
type CreateDatabaseInstanceRequest ¶
type CreateDatabaseInstanceRequest struct {
// A DatabaseInstance represents a logical Postgres instance, comprised of
// both compute and storage.
DatabaseInstance DatabaseInstance `json:"database_instance"`
}
Create a Database Instance
type CreateDatabaseTableRequest ¶
type CreateDatabaseTableRequest struct {
// Next field marker: 13
Table DatabaseTable `json:"table"`
}
Create a Database Table
type CreateSyncedDatabaseTableRequest ¶
type CreateSyncedDatabaseTableRequest struct {
// Next field marker: 12
SyncedTable SyncedDatabaseTable `json:"synced_table"`
}
Create a Synced Database Table
type DatabaseAPI ¶
type DatabaseAPI struct {
// contains filtered or unexported fields
}
Database Instances provide access to a database via REST API or direct SQL.
func NewDatabase ¶
func NewDatabase(client *client.DatabricksClient) *DatabaseAPI
func (*DatabaseAPI) CreateDatabaseCatalog ¶
func (a *DatabaseAPI) CreateDatabaseCatalog(ctx context.Context, request CreateDatabaseCatalogRequest) (*DatabaseCatalog, error)
func (*DatabaseAPI) CreateDatabaseInstance ¶
func (a *DatabaseAPI) CreateDatabaseInstance(ctx context.Context, request CreateDatabaseInstanceRequest) (*DatabaseInstance, error)
func (*DatabaseAPI) CreateDatabaseTable ¶
func (a *DatabaseAPI) CreateDatabaseTable(ctx context.Context, request CreateDatabaseTableRequest) (*DatabaseTable, error)
func (*DatabaseAPI) CreateSyncedDatabaseTable ¶
func (a *DatabaseAPI) CreateSyncedDatabaseTable(ctx context.Context, request CreateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
func (*DatabaseAPI) DeleteDatabaseCatalog ¶
func (a *DatabaseAPI) DeleteDatabaseCatalog(ctx context.Context, request DeleteDatabaseCatalogRequest) error
func (*DatabaseAPI) DeleteDatabaseCatalogByName ¶
func (a *DatabaseAPI) DeleteDatabaseCatalogByName(ctx context.Context, name string) error
Delete a Database Catalog.
func (*DatabaseAPI) DeleteDatabaseInstance ¶
func (a *DatabaseAPI) DeleteDatabaseInstance(ctx context.Context, request DeleteDatabaseInstanceRequest) error
func (*DatabaseAPI) DeleteDatabaseInstanceByName ¶
func (a *DatabaseAPI) DeleteDatabaseInstanceByName(ctx context.Context, name string) error
Delete a Database Instance.
func (*DatabaseAPI) DeleteDatabaseTable ¶
func (a *DatabaseAPI) DeleteDatabaseTable(ctx context.Context, request DeleteDatabaseTableRequest) error
func (*DatabaseAPI) DeleteDatabaseTableByName ¶
func (a *DatabaseAPI) DeleteDatabaseTableByName(ctx context.Context, name string) error
Delete a Database Table.
func (*DatabaseAPI) DeleteSyncedDatabaseTable ¶
func (a *DatabaseAPI) DeleteSyncedDatabaseTable(ctx context.Context, request DeleteSyncedDatabaseTableRequest) error
func (*DatabaseAPI) DeleteSyncedDatabaseTableByName ¶
func (a *DatabaseAPI) DeleteSyncedDatabaseTableByName(ctx context.Context, name string) error
Delete a Synced Database Table.
func (*DatabaseAPI) FindDatabaseInstanceByUid ¶
func (a *DatabaseAPI) FindDatabaseInstanceByUid(ctx context.Context, request FindDatabaseInstanceByUidRequest) (*DatabaseInstance, error)
func (*DatabaseAPI) GenerateDatabaseCredential ¶
func (a *DatabaseAPI) GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)
func (*DatabaseAPI) GetDatabaseCatalog ¶
func (a *DatabaseAPI) GetDatabaseCatalog(ctx context.Context, request GetDatabaseCatalogRequest) (*DatabaseCatalog, error)
func (*DatabaseAPI) GetDatabaseCatalogByName ¶
func (a *DatabaseAPI) GetDatabaseCatalogByName(ctx context.Context, name string) (*DatabaseCatalog, error)
Get a Database Catalog.
func (*DatabaseAPI) GetDatabaseInstance ¶
func (a *DatabaseAPI) GetDatabaseInstance(ctx context.Context, request GetDatabaseInstanceRequest) (*DatabaseInstance, error)
func (*DatabaseAPI) GetDatabaseInstanceByName ¶
func (a *DatabaseAPI) GetDatabaseInstanceByName(ctx context.Context, name string) (*DatabaseInstance, error)
Get a Database Instance.
func (*DatabaseAPI) GetDatabaseTable ¶
func (a *DatabaseAPI) GetDatabaseTable(ctx context.Context, request GetDatabaseTableRequest) (*DatabaseTable, error)
func (*DatabaseAPI) GetDatabaseTableByName ¶
func (a *DatabaseAPI) GetDatabaseTableByName(ctx context.Context, name string) (*DatabaseTable, error)
Get a Database Table.
func (*DatabaseAPI) GetSyncedDatabaseTable ¶
func (a *DatabaseAPI) GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
func (*DatabaseAPI) GetSyncedDatabaseTableByName ¶
func (a *DatabaseAPI) GetSyncedDatabaseTableByName(ctx context.Context, name string) (*SyncedDatabaseTable, error)
Get a Synced Database Table.
func (*DatabaseAPI) ListDatabaseInstances ¶
func (a *DatabaseAPI) ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) listing.Iterator[DatabaseInstance]
List Database Instances.
func (*DatabaseAPI) ListDatabaseInstancesAll ¶
func (a *DatabaseAPI) ListDatabaseInstancesAll(ctx context.Context, request ListDatabaseInstancesRequest) ([]DatabaseInstance, error)
List Database Instances.
func (*DatabaseAPI) UpdateDatabaseInstance ¶
func (a *DatabaseAPI) UpdateDatabaseInstance(ctx context.Context, request UpdateDatabaseInstanceRequest) (*DatabaseInstance, error)
type DatabaseCatalog ¶
type DatabaseCatalog struct {
CreateDatabaseIfNotExists bool `json:"create_database_if_not_exists,omitempty"`
// The name of the DatabaseInstance housing the database.
DatabaseInstanceName string `json:"database_instance_name"`
// The name of the database (in a instance) associated with the catalog.
DatabaseName string `json:"database_name"`
// The name of the catalog in UC.
Name string `json:"name"`
Uid string `json:"uid,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DatabaseCatalog) MarshalJSON ¶
func (s DatabaseCatalog) MarshalJSON() ([]byte, error)
func (*DatabaseCatalog) UnmarshalJSON ¶
func (s *DatabaseCatalog) UnmarshalJSON(b []byte) error
type DatabaseCredential ¶
type DatabaseCredential struct {
Token string `json:"token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DatabaseCredential) MarshalJSON ¶
func (s DatabaseCredential) MarshalJSON() ([]byte, error)
func (*DatabaseCredential) UnmarshalJSON ¶
func (s *DatabaseCredential) UnmarshalJSON(b []byte) error
type DatabaseInstance ¶
type DatabaseInstance struct {
// The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8".
Capacity string `json:"capacity,omitempty"`
// The timestamp when the instance was created.
CreationTime string `json:"creation_time,omitempty"`
// The email of the creator of the instance.
Creator string `json:"creator,omitempty"`
// The name of the instance. This is the unique identifier for the instance.
Name string `json:"name"`
// The version of Postgres running on the instance.
PgVersion string `json:"pg_version,omitempty"`
// The DNS endpoint to connect to the instance for read+write access.
ReadWriteDns string `json:"read_write_dns,omitempty"`
// The current state of the instance.
State DatabaseInstanceState `json:"state,omitempty"`
// Whether the instance is stopped.
Stopped bool `json:"stopped,omitempty"`
// An immutable UUID identifier for the instance.
Uid string `json:"uid,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A DatabaseInstance represents a logical Postgres instance, comprised of both compute and storage.
func (DatabaseInstance) MarshalJSON ¶
func (s DatabaseInstance) MarshalJSON() ([]byte, error)
func (*DatabaseInstance) UnmarshalJSON ¶
func (s *DatabaseInstance) UnmarshalJSON(b []byte) error
type DatabaseInstanceState ¶
type DatabaseInstanceState string
const DatabaseInstanceStateAvailable DatabaseInstanceState = `AVAILABLE`
const DatabaseInstanceStateDeleting DatabaseInstanceState = `DELETING`
const DatabaseInstanceStateFailingOver DatabaseInstanceState = `FAILING_OVER`
const DatabaseInstanceStateStarting DatabaseInstanceState = `STARTING`
const DatabaseInstanceStateStopped DatabaseInstanceState = `STOPPED`
const DatabaseInstanceStateUpdating DatabaseInstanceState = `UPDATING`
func (*DatabaseInstanceState) Set ¶
func (f *DatabaseInstanceState) Set(v string) error
Set raw string value and validate it against allowed values
func (*DatabaseInstanceState) String ¶
func (f *DatabaseInstanceState) String() string
String representation for fmt.Print
func (*DatabaseInstanceState) Type ¶
func (f *DatabaseInstanceState) Type() string
Type always returns DatabaseInstanceState to satisfy [pflag.Value] interface
func (*DatabaseInstanceState) Values ¶
func (f *DatabaseInstanceState) Values() []DatabaseInstanceState
Values returns all possible values for DatabaseInstanceState.
There is no guarantee on the order of the values in the slice.
type DatabaseInterface ¶
type DatabaseInterface interface {
// Create a Database Catalog.
CreateDatabaseCatalog(ctx context.Context, request CreateDatabaseCatalogRequest) (*DatabaseCatalog, error)
// Create a Database Instance.
CreateDatabaseInstance(ctx context.Context, request CreateDatabaseInstanceRequest) (*DatabaseInstance, error)
// Create a Database Table.
CreateDatabaseTable(ctx context.Context, request CreateDatabaseTableRequest) (*DatabaseTable, error)
// Create a Synced Database Table.
CreateSyncedDatabaseTable(ctx context.Context, request CreateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
// Delete a Database Catalog.
DeleteDatabaseCatalog(ctx context.Context, request DeleteDatabaseCatalogRequest) error
// Delete a Database Catalog.
DeleteDatabaseCatalogByName(ctx context.Context, name string) error
// Delete a Database Instance.
DeleteDatabaseInstance(ctx context.Context, request DeleteDatabaseInstanceRequest) error
// Delete a Database Instance.
DeleteDatabaseInstanceByName(ctx context.Context, name string) error
// Delete a Database Table.
DeleteDatabaseTable(ctx context.Context, request DeleteDatabaseTableRequest) error
// Delete a Database Table.
DeleteDatabaseTableByName(ctx context.Context, name string) error
// Delete a Synced Database Table.
DeleteSyncedDatabaseTable(ctx context.Context, request DeleteSyncedDatabaseTableRequest) error
// Delete a Synced Database Table.
DeleteSyncedDatabaseTableByName(ctx context.Context, name string) error
// Find a Database Instance by uid.
FindDatabaseInstanceByUid(ctx context.Context, request FindDatabaseInstanceByUidRequest) (*DatabaseInstance, error)
// Generates a credential that can be used to access database instances.
GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)
// Get a Database Catalog.
GetDatabaseCatalog(ctx context.Context, request GetDatabaseCatalogRequest) (*DatabaseCatalog, error)
// Get a Database Catalog.
GetDatabaseCatalogByName(ctx context.Context, name string) (*DatabaseCatalog, error)
// Get a Database Instance.
GetDatabaseInstance(ctx context.Context, request GetDatabaseInstanceRequest) (*DatabaseInstance, error)
// Get a Database Instance.
GetDatabaseInstanceByName(ctx context.Context, name string) (*DatabaseInstance, error)
// Get a Database Table.
GetDatabaseTable(ctx context.Context, request GetDatabaseTableRequest) (*DatabaseTable, error)
// Get a Database Table.
GetDatabaseTableByName(ctx context.Context, name string) (*DatabaseTable, error)
// Get a Synced Database Table.
GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
// Get a Synced Database Table.
GetSyncedDatabaseTableByName(ctx context.Context, name string) (*SyncedDatabaseTable, error)
// List Database Instances.
//
// This method is generated by Databricks SDK Code Generator.
ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) listing.Iterator[DatabaseInstance]
// List Database Instances.
//
// This method is generated by Databricks SDK Code Generator.
ListDatabaseInstancesAll(ctx context.Context, request ListDatabaseInstancesRequest) ([]DatabaseInstance, error)
// Update a Database Instance.
UpdateDatabaseInstance(ctx context.Context, request UpdateDatabaseInstanceRequest) (*DatabaseInstance, error)
}
type DatabaseService
deprecated
type DatabaseService interface {
// Create a Database Catalog.
CreateDatabaseCatalog(ctx context.Context, request CreateDatabaseCatalogRequest) (*DatabaseCatalog, error)
// Create a Database Instance.
CreateDatabaseInstance(ctx context.Context, request CreateDatabaseInstanceRequest) (*DatabaseInstance, error)
// Create a Database Table.
CreateDatabaseTable(ctx context.Context, request CreateDatabaseTableRequest) (*DatabaseTable, error)
// Create a Synced Database Table.
CreateSyncedDatabaseTable(ctx context.Context, request CreateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
// Delete a Database Catalog.
DeleteDatabaseCatalog(ctx context.Context, request DeleteDatabaseCatalogRequest) error
// Delete a Database Instance.
DeleteDatabaseInstance(ctx context.Context, request DeleteDatabaseInstanceRequest) error
// Delete a Database Table.
DeleteDatabaseTable(ctx context.Context, request DeleteDatabaseTableRequest) error
// Delete a Synced Database Table.
DeleteSyncedDatabaseTable(ctx context.Context, request DeleteSyncedDatabaseTableRequest) error
// Find a Database Instance by uid.
FindDatabaseInstanceByUid(ctx context.Context, request FindDatabaseInstanceByUidRequest) (*DatabaseInstance, error)
// Generates a credential that can be used to access database instances.
GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)
// Get a Database Catalog.
GetDatabaseCatalog(ctx context.Context, request GetDatabaseCatalogRequest) (*DatabaseCatalog, error)
// Get a Database Instance.
GetDatabaseInstance(ctx context.Context, request GetDatabaseInstanceRequest) (*DatabaseInstance, error)
// Get a Database Table.
GetDatabaseTable(ctx context.Context, request GetDatabaseTableRequest) (*DatabaseTable, error)
// Get a Synced Database Table.
GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
// List Database Instances.
ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) (*ListDatabaseInstancesResponse, error)
// Update a Database Instance.
UpdateDatabaseInstance(ctx context.Context, request UpdateDatabaseInstanceRequest) (*DatabaseInstance, error)
}
Database Instances provide access to a database via REST API or direct SQL.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type DatabaseTable ¶
type DatabaseTable struct {
// 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).
DatabaseInstanceName string `json:"database_instance_name,omitempty"`
// Target Postgres database object (logical database) name for this table.
// This field is optional in all scenarios.
//
// When creating a 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 table in a standard catalog, the target database name is
// inferred to be that of the standard catalog. 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`.
LogicalDatabaseName string `json:"logical_database_name,omitempty"`
// Full three-part (catalog, schema, table) name of the table.
Name string `json:"name"`
// Data serving REST API URL for this table
TableServingUrl string `json:"table_serving_url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Next field marker: 13
func (DatabaseTable) MarshalJSON ¶
func (s DatabaseTable) MarshalJSON() ([]byte, error)
func (*DatabaseTable) UnmarshalJSON ¶
func (s *DatabaseTable) UnmarshalJSON(b []byte) error
type DeleteDatabaseCatalogRequest ¶
type DeleteDatabaseCatalogRequest struct {
Name string `json:"-" url:"-"`
}
Delete a Database Catalog
type DeleteDatabaseCatalogResponse ¶
type DeleteDatabaseCatalogResponse struct {
}
type DeleteDatabaseInstanceRequest ¶
type DeleteDatabaseInstanceRequest struct {
// By default, a instance cannot be deleted if it has descendant instances
// created via PITR. If this flag is specified as true, all descendent
// instances will be deleted as well.
Force bool `json:"-" url:"force,omitempty"`
// Name of the instance to delete.
Name string `json:"-" url:"-"`
// If false, the database instance is soft deleted. Soft deleted instances
// behave as if they are deleted, and cannot be used for CRUD operations nor
// connected to. However they can be undeleted by calling the undelete API
// for a limited time. If true, the database instance is hard deleted and
// cannot be undeleted.
Purge bool `json:"-" url:"purge,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Delete a Database Instance
func (DeleteDatabaseInstanceRequest) MarshalJSON ¶
func (s DeleteDatabaseInstanceRequest) MarshalJSON() ([]byte, error)
func (*DeleteDatabaseInstanceRequest) UnmarshalJSON ¶
func (s *DeleteDatabaseInstanceRequest) UnmarshalJSON(b []byte) error
type DeleteDatabaseInstanceResponse ¶
type DeleteDatabaseInstanceResponse struct {
}
type DeleteDatabaseTableRequest ¶
type DeleteDatabaseTableRequest struct {
Name string `json:"-" url:"-"`
}
Delete a Database Table
type DeleteDatabaseTableResponse ¶
type DeleteDatabaseTableResponse struct {
}
type DeleteSyncedDatabaseTableRequest ¶
type DeleteSyncedDatabaseTableRequest struct {
Name string `json:"-" url:"-"`
}
Delete a Synced Database Table
type DeleteSyncedDatabaseTableResponse ¶
type DeleteSyncedDatabaseTableResponse struct {
}
type FindDatabaseInstanceByUidRequest ¶
type FindDatabaseInstanceByUidRequest struct {
// UID of the cluster to get.
Uid string `json:"-" url:"uid,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Find a Database Instance by uid
func (FindDatabaseInstanceByUidRequest) MarshalJSON ¶
func (s FindDatabaseInstanceByUidRequest) MarshalJSON() ([]byte, error)
func (*FindDatabaseInstanceByUidRequest) UnmarshalJSON ¶
func (s *FindDatabaseInstanceByUidRequest) UnmarshalJSON(b []byte) error
type GenerateDatabaseCredentialRequest ¶
type GenerateDatabaseCredentialRequest struct {
// Instances to which the token will be scoped.
InstanceNames []string `json:"instance_names,omitempty"`
RequestId string `json:"request_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Generates a credential that can be used to access database instances
func (GenerateDatabaseCredentialRequest) MarshalJSON ¶
func (s GenerateDatabaseCredentialRequest) MarshalJSON() ([]byte, error)
func (*GenerateDatabaseCredentialRequest) UnmarshalJSON ¶
func (s *GenerateDatabaseCredentialRequest) UnmarshalJSON(b []byte) error
type GetDatabaseCatalogRequest ¶
type GetDatabaseCatalogRequest struct {
Name string `json:"-" url:"-"`
}
Get a Database Catalog
type GetDatabaseInstanceRequest ¶
type GetDatabaseInstanceRequest struct {
// Name of the cluster to get.
Name string `json:"-" url:"-"`
}
Get a Database Instance
type GetDatabaseTableRequest ¶
type GetDatabaseTableRequest struct {
Name string `json:"-" url:"-"`
}
Get a Database Table
type GetSyncedDatabaseTableRequest ¶
type GetSyncedDatabaseTableRequest struct {
Name string `json:"-" url:"-"`
}
Get a Synced Database Table
type ListDatabaseInstancesRequest ¶
type ListDatabaseInstancesRequest struct {
// Upper bound for items returned.
PageSize int `json:"-" url:"page_size,omitempty"`
// Pagination token to go to the next page of Database Instances. Requests
// first page if absent.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
List Database Instances
func (ListDatabaseInstancesRequest) MarshalJSON ¶
func (s ListDatabaseInstancesRequest) MarshalJSON() ([]byte, error)
func (*ListDatabaseInstancesRequest) UnmarshalJSON ¶
func (s *ListDatabaseInstancesRequest) UnmarshalJSON(b []byte) error
type ListDatabaseInstancesResponse ¶
type ListDatabaseInstancesResponse struct {
// List of instances.
DatabaseInstances []DatabaseInstance `json:"database_instances,omitempty"`
// Pagination token to request the next page of instances.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListDatabaseInstancesResponse) MarshalJSON ¶
func (s ListDatabaseInstancesResponse) MarshalJSON() ([]byte, error)
func (*ListDatabaseInstancesResponse) UnmarshalJSON ¶
func (s *ListDatabaseInstancesResponse) UnmarshalJSON(b []byte) error
type NewPipelineSpec ¶
type NewPipelineSpec struct {
// 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.
StorageCatalog string `json:"storage_catalog,omitempty"`
// 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.
StorageSchema string `json:"storage_schema,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Custom fields that user can set for pipeline while creating SyncedDatabaseTable. Note that other fields of pipeline are still inferred by table def internally
func (NewPipelineSpec) MarshalJSON ¶
func (s NewPipelineSpec) MarshalJSON() ([]byte, error)
func (*NewPipelineSpec) UnmarshalJSON ¶
func (s *NewPipelineSpec) UnmarshalJSON(b []byte) error
type ProvisioningInfoState ¶
type ProvisioningInfoState string
const ProvisioningInfoStateActive ProvisioningInfoState = `ACTIVE`
const ProvisioningInfoStateDegraded ProvisioningInfoState = `DEGRADED`
const ProvisioningInfoStateDeleting ProvisioningInfoState = `DELETING`
const ProvisioningInfoStateFailed ProvisioningInfoState = `FAILED`
const ProvisioningInfoStateProvisioning ProvisioningInfoState = `PROVISIONING`
const ProvisioningInfoStateUpdating ProvisioningInfoState = `UPDATING`
func (*ProvisioningInfoState) Set ¶
func (f *ProvisioningInfoState) Set(v string) error
Set raw string value and validate it against allowed values
func (*ProvisioningInfoState) String ¶
func (f *ProvisioningInfoState) String() string
String representation for fmt.Print
func (*ProvisioningInfoState) Type ¶
func (f *ProvisioningInfoState) Type() string
Type always returns ProvisioningInfoState to satisfy [pflag.Value] interface
func (*ProvisioningInfoState) Values ¶
func (f *ProvisioningInfoState) Values() []ProvisioningInfoState
Values returns all possible values for ProvisioningInfoState.
There is no guarantee on the order of the values in the slice.
type SyncedDatabaseTable ¶
type SyncedDatabaseTable struct {
// Synced Table data synchronization status
DataSynchronizationStatus *SyncedTableStatus `json:"data_synchronization_status,omitempty"`
// 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).
DatabaseInstanceName string `json:"database_instance_name,omitempty"`
// Target Postgres database object (logical database) name for this table.
// This field is optional in all scenarios.
//
// 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, the target database
// name is inferred to be that of the standard catalog. In this scenario,
// specifying this field will allow targeting an arbitrary postgres
// database.
LogicalDatabaseName string `json:"logical_database_name,omitempty"`
// Full three-part (catalog, schema, table) name of the table.
Name string `json:"name"`
// Specification of a synced database table.
Spec *SyncedTableSpec `json:"spec,omitempty"`
// Data serving REST API URL for this table
TableServingUrl string `json:"table_serving_url,omitempty"`
// 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).
UnityCatalogProvisioningState ProvisioningInfoState `json:"unity_catalog_provisioning_state,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Next field marker: 12
func (SyncedDatabaseTable) MarshalJSON ¶
func (s SyncedDatabaseTable) MarshalJSON() ([]byte, error)
func (*SyncedDatabaseTable) UnmarshalJSON ¶
func (s *SyncedDatabaseTable) UnmarshalJSON(b []byte) error
type SyncedTableContinuousUpdateStatus ¶
type SyncedTableContinuousUpdateStatus struct {
// Progress of the initial data synchronization.
InitialPipelineSyncProgress *SyncedTablePipelineProgress `json:"initial_pipeline_sync_progress,omitempty"`
// The last source table Delta version that was synced to the synced table.
// Note that this Delta version may not be completely synced to the synced
// table yet.
LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
// The timestamp of the last time any data was synchronized from the source
// table to the synced table.
Timestamp string `json:"timestamp,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Detailed status of a synced table. Shown if the synced table is in the SYNCED_CONTINUOUS_UPDATE or the SYNCED_UPDATING_PIPELINE_RESOURCES state.
func (SyncedTableContinuousUpdateStatus) MarshalJSON ¶
func (s SyncedTableContinuousUpdateStatus) MarshalJSON() ([]byte, error)
func (*SyncedTableContinuousUpdateStatus) UnmarshalJSON ¶
func (s *SyncedTableContinuousUpdateStatus) UnmarshalJSON(b []byte) error
type SyncedTableFailedStatus ¶
type SyncedTableFailedStatus struct {
// The last source table Delta version that was synced to the synced table.
// Note that this Delta version may only be partially synced to the synced
// table. Only populated if the table is still synced and available for
// serving.
LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
// The 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.
Timestamp string `json:"timestamp,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Detailed status of a synced table. Shown if the synced table is in the OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state.
func (SyncedTableFailedStatus) MarshalJSON ¶
func (s SyncedTableFailedStatus) MarshalJSON() ([]byte, error)
func (*SyncedTableFailedStatus) UnmarshalJSON ¶
func (s *SyncedTableFailedStatus) UnmarshalJSON(b []byte) error
type SyncedTablePipelineProgress ¶
type SyncedTablePipelineProgress struct {
// The estimated time remaining to complete this update in seconds.
EstimatedCompletionTimeSeconds float64 `json:"estimated_completion_time_seconds,omitempty"`
// The source table Delta version that was last processed by the pipeline.
// The pipeline may not have completely processed this version yet.
LatestVersionCurrentlyProcessing int64 `json:"latest_version_currently_processing,omitempty"`
// The completion ratio of this update. This is a number between 0 and 1.
SyncProgressCompletion float64 `json:"sync_progress_completion,omitempty"`
// The number of rows that have been synced in this update.
SyncedRowCount int64 `json:"synced_row_count,omitempty"`
// The total number of rows that need to be synced in this update. This
// number may be an estimate.
TotalRowCount int64 `json:"total_row_count,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Progress information of the Synced Table data synchronization pipeline.
func (SyncedTablePipelineProgress) MarshalJSON ¶
func (s SyncedTablePipelineProgress) MarshalJSON() ([]byte, error)
func (*SyncedTablePipelineProgress) UnmarshalJSON ¶
func (s *SyncedTablePipelineProgress) UnmarshalJSON(b []byte) error
type SyncedTableProvisioningStatus ¶
type SyncedTableProvisioningStatus struct {
// Details about initial data synchronization. Only populated when in the
// PROVISIONING_INITIAL_SNAPSHOT state.
InitialPipelineSyncProgress *SyncedTablePipelineProgress `json:"initial_pipeline_sync_progress,omitempty"`
}
Detailed status of a synced table. Shown if the synced table is in the PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state.
type SyncedTableSchedulingPolicy ¶
type SyncedTableSchedulingPolicy string
const SyncedTableSchedulingPolicyContinuous SyncedTableSchedulingPolicy = `CONTINUOUS`
const SyncedTableSchedulingPolicySnapshot SyncedTableSchedulingPolicy = `SNAPSHOT`
const SyncedTableSchedulingPolicyTriggered SyncedTableSchedulingPolicy = `TRIGGERED`
func (*SyncedTableSchedulingPolicy) Set ¶
func (f *SyncedTableSchedulingPolicy) Set(v string) error
Set raw string value and validate it against allowed values
func (*SyncedTableSchedulingPolicy) String ¶
func (f *SyncedTableSchedulingPolicy) String() string
String representation for fmt.Print
func (*SyncedTableSchedulingPolicy) Type ¶
func (f *SyncedTableSchedulingPolicy) Type() string
Type always returns SyncedTableSchedulingPolicy to satisfy [pflag.Value] interface
func (*SyncedTableSchedulingPolicy) Values ¶
func (f *SyncedTableSchedulingPolicy) Values() []SyncedTableSchedulingPolicy
Values returns all possible values for SyncedTableSchedulingPolicy.
There is no guarantee on the order of the values in the slice.
type SyncedTableSpec ¶
type SyncedTableSpec struct {
// If true, the synced table's logical database and schema resources in PG
// will be created if they do not already exist.
CreateDatabaseObjectsIfMissing bool `json:"create_database_objects_if_missing,omitempty"`
// Spec of new pipeline. Should be empty if pipeline_id is set
NewPipelineSpec *NewPipelineSpec `json:"new_pipeline_spec,omitempty"`
// ID of the associated pipeline. Should be empty if new_pipeline_spec is
// set
PipelineId string `json:"pipeline_id,omitempty"`
// Primary Key columns to be used for data insert/update in the destination.
PrimaryKeyColumns []string `json:"primary_key_columns,omitempty"`
// Scheduling policy of the underlying pipeline.
SchedulingPolicy SyncedTableSchedulingPolicy `json:"scheduling_policy,omitempty"`
// Three-part (catalog, schema, table) name of the source Delta table.
SourceTableFullName string `json:"source_table_full_name,omitempty"`
// Time series key to deduplicate (tie-break) rows with the same primary
// key.
TimeseriesKey string `json:"timeseries_key,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Specification of a synced database table.
func (SyncedTableSpec) MarshalJSON ¶
func (s SyncedTableSpec) MarshalJSON() ([]byte, error)
func (*SyncedTableSpec) UnmarshalJSON ¶
func (s *SyncedTableSpec) UnmarshalJSON(b []byte) error
type SyncedTableState ¶
type SyncedTableState string
The state of a synced table.
const SyncedTableStateSyncedTableOfflineFailed SyncedTableState = `SYNCED_TABLE_OFFLINE_FAILED`
const SyncedTableStateSyncedTableOnline SyncedTableState = `SYNCED_TABLE_ONLINE`
const SyncedTableStateSyncedTableOnlineContinuousUpdate SyncedTableState = `SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE`
const SyncedTableStateSyncedTableOnlineNoPendingUpdate SyncedTableState = `SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE`
const SyncedTableStateSyncedTableOnlinePipelineFailed SyncedTableState = `SYNCED_TABLE_ONLINE_PIPELINE_FAILED`
const SyncedTableStateSyncedTableOnlineTriggeredUpdate SyncedTableState = `SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE`
const SyncedTableStateSyncedTableOnlineUpdatingPipelineResources SyncedTableState = `SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES`
const SyncedTableStateSyncedTableProvisioning SyncedTableState = `SYNCED_TABLE_PROVISIONING`
const SyncedTableStateSyncedTableProvisioningInitialSnapshot SyncedTableState = `SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT`
const SyncedTableStateSyncedTableProvisioningPipelineResources SyncedTableState = `SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES`
const SyncedTableStateSyncedTabledOffline SyncedTableState = `SYNCED_TABLED_OFFLINE`
func (*SyncedTableState) Set ¶
func (f *SyncedTableState) Set(v string) error
Set raw string value and validate it against allowed values
func (*SyncedTableState) String ¶
func (f *SyncedTableState) String() string
String representation for fmt.Print
func (*SyncedTableState) Type ¶
func (f *SyncedTableState) Type() string
Type always returns SyncedTableState to satisfy [pflag.Value] interface
func (*SyncedTableState) Values ¶
func (f *SyncedTableState) Values() []SyncedTableState
Values returns all possible values for SyncedTableState.
There is no guarantee on the order of the values in the slice.
type SyncedTableStatus ¶
type SyncedTableStatus struct {
// Detailed status of a synced table. Shown if the synced table is in the
// SYNCED_CONTINUOUS_UPDATE or the SYNCED_UPDATING_PIPELINE_RESOURCES state.
ContinuousUpdateStatus *SyncedTableContinuousUpdateStatus `json:"continuous_update_status,omitempty"`
// The state of the synced table.
DetailedState SyncedTableState `json:"detailed_state,omitempty"`
// Detailed status of a synced table. Shown if the synced table is in the
// OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state.
FailedStatus *SyncedTableFailedStatus `json:"failed_status,omitempty"`
// A text description of the current state of the synced table.
Message string `json:"message,omitempty"`
// Detailed status of a synced table. Shown if the synced table is in the
// PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT
// state.
ProvisioningStatus *SyncedTableProvisioningStatus `json:"provisioning_status,omitempty"`
// Detailed status of a synced table. Shown if the synced table is in the
// SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state.
TriggeredUpdateStatus *SyncedTableTriggeredUpdateStatus `json:"triggered_update_status,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Status of a synced table.
func (SyncedTableStatus) MarshalJSON ¶
func (s SyncedTableStatus) MarshalJSON() ([]byte, error)
func (*SyncedTableStatus) UnmarshalJSON ¶
func (s *SyncedTableStatus) UnmarshalJSON(b []byte) error
type SyncedTableTriggeredUpdateStatus ¶
type SyncedTableTriggeredUpdateStatus struct {
// The last source table Delta version that was synced to the synced table.
// Note that this Delta version may not be completely synced to the synced
// table yet.
LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
// The timestamp of the last time any data was synchronized from the source
// table to the synced table.
Timestamp string `json:"timestamp,omitempty"`
// Progress of the active data synchronization pipeline.
TriggeredUpdateProgress *SyncedTablePipelineProgress `json:"triggered_update_progress,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Detailed status of a synced table. Shown if the synced table is in the SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state.
func (SyncedTableTriggeredUpdateStatus) MarshalJSON ¶
func (s SyncedTableTriggeredUpdateStatus) MarshalJSON() ([]byte, error)
func (*SyncedTableTriggeredUpdateStatus) UnmarshalJSON ¶
func (s *SyncedTableTriggeredUpdateStatus) UnmarshalJSON(b []byte) error
type UpdateDatabaseInstanceRequest ¶
type UpdateDatabaseInstanceRequest struct {
// A DatabaseInstance represents a logical Postgres instance, comprised of
// both compute and storage.
DatabaseInstance DatabaseInstance `json:"database_instance"`
// The name of the instance. This is the unique identifier for the instance.
Name string `json:"-" url:"-"`
// The list of fields to update.
UpdateMask string `json:"-" url:"update_mask"`
}
Update a Database Instance