Documentation
¶
Overview ¶
These APIs allow you to manage Account Metastore Assignments, Account Metastores, Account Storage Credentials, Artifact Allowlists, Catalogs, Connections, Credentials, Entity Tag Assignments, External Lineage, External Locations, External Metadata, Functions, Grants, Metastores, Model Versions, Online Tables, Policies, Quality Monitors, Registered Models, Resource Quotas, Rfa, Schemas, Storage Credentials, System Schemas, Table Constraints, Tables, Temporary Path Credentials, Temporary Table Credentials, Volumes, Workspace Bindings, etc.
Index ¶
- type AccessRequestDestinations
- type AccountMetastoreAssignmentsAPI
- func (a *AccountMetastoreAssignmentsAPI) Create(ctx context.Context, request AccountsCreateMetastoreAssignment) (*AccountsCreateMetastoreAssignmentResponse, error)
- func (a *AccountMetastoreAssignmentsAPI) Delete(ctx context.Context, request DeleteAccountMetastoreAssignmentRequest) (*AccountsDeleteMetastoreAssignmentResponse, error)
- func (a *AccountMetastoreAssignmentsAPI) DeleteByWorkspaceIdAndMetastoreId(ctx context.Context, workspaceId int64, metastoreId string) (*AccountsDeleteMetastoreAssignmentResponse, error)
- func (a *AccountMetastoreAssignmentsAPI) Get(ctx context.Context, request GetAccountMetastoreAssignmentRequest) (*AccountsMetastoreAssignment, error)
- func (a *AccountMetastoreAssignmentsAPI) GetByWorkspaceId(ctx context.Context, workspaceId int64) (*AccountsMetastoreAssignment, error)
- func (a *AccountMetastoreAssignmentsAPI) List(ctx context.Context, request ListAccountMetastoreAssignmentsRequest) listing.Iterator[int64]
- func (a *AccountMetastoreAssignmentsAPI) ListAll(ctx context.Context, request ListAccountMetastoreAssignmentsRequest) ([]int64, error)
- func (a *AccountMetastoreAssignmentsAPI) ListByMetastoreId(ctx context.Context, metastoreId string) (*ListAccountMetastoreAssignmentsResponse, error)
- func (a *AccountMetastoreAssignmentsAPI) Update(ctx context.Context, request AccountsUpdateMetastoreAssignment) (*AccountsUpdateMetastoreAssignmentResponse, error)
- type AccountMetastoreAssignmentsInterface
- type AccountMetastoreAssignmentsServicedeprecated
- type AccountMetastoresAPI
- func (a *AccountMetastoresAPI) Create(ctx context.Context, request AccountsCreateMetastore) (*AccountsCreateMetastoreResponse, error)
- func (a *AccountMetastoresAPI) Delete(ctx context.Context, request DeleteAccountMetastoreRequest) (*AccountsDeleteMetastoreResponse, error)
- func (a *AccountMetastoresAPI) DeleteByMetastoreId(ctx context.Context, metastoreId string) (*AccountsDeleteMetastoreResponse, error)
- func (a *AccountMetastoresAPI) Get(ctx context.Context, request GetAccountMetastoreRequest) (*AccountsGetMetastoreResponse, error)
- func (a *AccountMetastoresAPI) GetByMetastoreId(ctx context.Context, metastoreId string) (*AccountsGetMetastoreResponse, error)
- func (a *AccountMetastoresAPI) List(ctx context.Context) listing.Iterator[MetastoreInfo]
- func (a *AccountMetastoresAPI) ListAll(ctx context.Context) ([]MetastoreInfo, error)
- func (a *AccountMetastoresAPI) Update(ctx context.Context, request AccountsUpdateMetastore) (*AccountsUpdateMetastoreResponse, error)
- type AccountMetastoresInterface
- type AccountMetastoresServicedeprecated
- type AccountStorageCredentialsAPI
- func (a *AccountStorageCredentialsAPI) Create(ctx context.Context, request AccountsCreateStorageCredential) (*AccountsCreateStorageCredentialInfo, error)
- func (a *AccountStorageCredentialsAPI) Delete(ctx context.Context, request DeleteAccountStorageCredentialRequest) (*AccountsDeleteStorageCredentialResponse, error)
- func (a *AccountStorageCredentialsAPI) DeleteByMetastoreIdAndStorageCredentialName(ctx context.Context, metastoreId string, storageCredentialName string) (*AccountsDeleteStorageCredentialResponse, error)
- func (a *AccountStorageCredentialsAPI) Get(ctx context.Context, request GetAccountStorageCredentialRequest) (*AccountsStorageCredentialInfo, error)
- func (a *AccountStorageCredentialsAPI) GetByMetastoreIdAndStorageCredentialName(ctx context.Context, metastoreId string, storageCredentialName string) (*AccountsStorageCredentialInfo, error)
- func (a *AccountStorageCredentialsAPI) List(ctx context.Context, request ListAccountStorageCredentialsRequest) listing.Iterator[StorageCredentialInfo]
- func (a *AccountStorageCredentialsAPI) ListAll(ctx context.Context, request ListAccountStorageCredentialsRequest) ([]StorageCredentialInfo, error)
- func (a *AccountStorageCredentialsAPI) ListByMetastoreId(ctx context.Context, metastoreId string) (*ListAccountStorageCredentialsResponse, error)
- func (a *AccountStorageCredentialsAPI) Update(ctx context.Context, request AccountsUpdateStorageCredential) (*AccountsUpdateStorageCredentialResponse, error)
- type AccountStorageCredentialsInterface
- type AccountStorageCredentialsServicedeprecated
- type AccountsCreateMetastore
- type AccountsCreateMetastoreAssignment
- type AccountsCreateMetastoreAssignmentResponse
- type AccountsCreateMetastoreResponse
- type AccountsCreateStorageCredential
- type AccountsCreateStorageCredentialInfo
- type AccountsDeleteMetastoreAssignmentResponse
- type AccountsDeleteMetastoreResponse
- type AccountsDeleteStorageCredentialResponse
- type AccountsGetMetastoreResponse
- type AccountsListMetastoresResponse
- type AccountsMetastoreAssignment
- type AccountsStorageCredentialInfo
- type AccountsUpdateMetastore
- type AccountsUpdateMetastoreAssignment
- type AccountsUpdateMetastoreAssignmentResponse
- type AccountsUpdateMetastoreResponse
- type AccountsUpdateStorageCredential
- type AccountsUpdateStorageCredentialResponse
- type ArtifactAllowlistInfo
- type ArtifactAllowlistsAPI
- func (a *ArtifactAllowlistsAPI) Get(ctx context.Context, request GetArtifactAllowlistRequest) (*ArtifactAllowlistInfo, error)
- func (a *ArtifactAllowlistsAPI) GetByArtifactType(ctx context.Context, artifactType ArtifactType) (*ArtifactAllowlistInfo, error)
- func (a *ArtifactAllowlistsAPI) Update(ctx context.Context, request SetArtifactAllowlist) (*ArtifactAllowlistInfo, error)
- type ArtifactAllowlistsInterface
- type ArtifactAllowlistsServicedeprecated
- type ArtifactMatcher
- type ArtifactType
- type AwsCredentials
- type AwsIamRole
- type AwsIamRoleRequest
- type AwsIamRoleResponse
- type AwsSqsQueue
- type AzureActiveDirectoryToken
- type AzureManagedIdentity
- type AzureManagedIdentityRequest
- type AzureManagedIdentityResponse
- type AzureQueueStorage
- type AzureServicePrincipal
- type AzureUserDelegationSas
- type BatchCreateAccessRequestsRequest
- type BatchCreateAccessRequestsResponse
- type CancelRefreshRequest
- type CatalogInfo
- type CatalogIsolationMode
- type CatalogType
- type CatalogsAPI
- func (a *CatalogsAPI) Create(ctx context.Context, request CreateCatalog) (*CatalogInfo, error)
- func (a *CatalogsAPI) Delete(ctx context.Context, request DeleteCatalogRequest) error
- func (a *CatalogsAPI) DeleteByName(ctx context.Context, name string) error
- func (a *CatalogsAPI) Get(ctx context.Context, request GetCatalogRequest) (*CatalogInfo, error)
- func (a *CatalogsAPI) GetByName(ctx context.Context, name string) (*CatalogInfo, error)
- func (a *CatalogsAPI) List(ctx context.Context, request ListCatalogsRequest) listing.Iterator[CatalogInfo]
- func (a *CatalogsAPI) ListAll(ctx context.Context, request ListCatalogsRequest) ([]CatalogInfo, error)
- func (a *CatalogsAPI) Update(ctx context.Context, request UpdateCatalog) (*CatalogInfo, error)
- type CatalogsInterface
- type CatalogsServicedeprecated
- type CloudflareApiToken
- type ColumnInfo
- type ColumnMask
- type ColumnMaskOptions
- type ColumnRelationship
- type ColumnTypeName
- type ConnectionDependency
- type ConnectionInfo
- type ConnectionType
- type ConnectionsAPI
- func (a *ConnectionsAPI) ConnectionInfoNameToFullNameMap(ctx context.Context, request ListConnectionsRequest) (map[string]string, error)
- func (a *ConnectionsAPI) Create(ctx context.Context, request CreateConnection) (*ConnectionInfo, error)
- func (a *ConnectionsAPI) Delete(ctx context.Context, request DeleteConnectionRequest) error
- func (a *ConnectionsAPI) DeleteByName(ctx context.Context, name string) error
- func (a *ConnectionsAPI) Get(ctx context.Context, request GetConnectionRequest) (*ConnectionInfo, error)
- func (a *ConnectionsAPI) GetByName(ctx context.Context, name string) (*ConnectionInfo, error)
- func (a *ConnectionsAPI) List(ctx context.Context, request ListConnectionsRequest) listing.Iterator[ConnectionInfo]
- func (a *ConnectionsAPI) ListAll(ctx context.Context, request ListConnectionsRequest) ([]ConnectionInfo, error)
- func (a *ConnectionsAPI) Update(ctx context.Context, request UpdateConnection) (*ConnectionInfo, error)
- type ConnectionsInterface
- type ConnectionsServicedeprecated
- type ContinuousUpdateStatus
- type CreateAccessRequest
- type CreateAccessRequestResponse
- type CreateAccountsMetastore
- type CreateAccountsStorageCredential
- type CreateCatalog
- type CreateConnection
- type CreateCredentialRequest
- type CreateEntityTagAssignmentRequest
- type CreateExternalLineageRelationshipRequest
- type CreateExternalLocation
- type CreateExternalMetadataRequest
- type CreateFunction
- type CreateFunctionParameterStyle
- type CreateFunctionRequest
- type CreateFunctionRoutineBody
- type CreateFunctionSecurityType
- type CreateFunctionSqlDataAccess
- type CreateMetastore
- type CreateMetastoreAssignment
- type CreateMonitor
- type CreateOnlineTableRequest
- type CreatePolicyRequest
- type CreateRegisteredModelRequest
- type CreateRequestExternalLineage
- type CreateSchema
- type CreateStorageCredential
- type CreateTableConstraint
- type CreateTableRequest
- type CreateVolumeRequestContent
- type CredentialDependency
- type CredentialInfo
- type CredentialPurpose
- type CredentialType
- type CredentialValidationResult
- type CredentialsAPI
- func (a *CredentialsAPI) CreateCredential(ctx context.Context, request CreateCredentialRequest) (*CredentialInfo, error)
- func (a *CredentialsAPI) DeleteCredential(ctx context.Context, request DeleteCredentialRequest) error
- func (a *CredentialsAPI) DeleteCredentialByNameArg(ctx context.Context, nameArg string) error
- func (a *CredentialsAPI) GenerateTemporaryServiceCredential(ctx context.Context, request GenerateTemporaryServiceCredentialRequest) (*TemporaryCredentials, error)
- func (a *CredentialsAPI) GetCredential(ctx context.Context, request GetCredentialRequest) (*CredentialInfo, error)
- func (a *CredentialsAPI) GetCredentialByNameArg(ctx context.Context, nameArg string) (*CredentialInfo, error)
- func (a *CredentialsAPI) ListCredentials(ctx context.Context, request ListCredentialsRequest) listing.Iterator[CredentialInfo]
- func (a *CredentialsAPI) ListCredentialsAll(ctx context.Context, request ListCredentialsRequest) ([]CredentialInfo, error)
- func (a *CredentialsAPI) UpdateCredential(ctx context.Context, request UpdateCredentialRequest) (*CredentialInfo, error)
- func (a *CredentialsAPI) ValidateCredential(ctx context.Context, request ValidateCredentialRequest) (*ValidateCredentialResponse, error)
- type CredentialsInterface
- type CredentialsServicedeprecated
- type DataSourceFormat
- type DatabricksGcpServiceAccount
- type DatabricksGcpServiceAccountRequest
- type DatabricksGcpServiceAccountResponse
- type DeleteAccountMetastoreAssignmentRequest
- type DeleteAccountMetastoreRequest
- type DeleteAccountStorageCredentialRequest
- type DeleteAliasRequest
- type DeleteCatalogRequest
- type DeleteConnectionRequest
- type DeleteCredentialRequest
- type DeleteEntityTagAssignmentRequest
- type DeleteExternalLineageRelationshipRequest
- type DeleteExternalLocationRequest
- type DeleteExternalMetadataRequest
- type DeleteFunctionRequest
- type DeleteMetastoreRequest
- type DeleteModelVersionRequest
- type DeleteMonitorResponse
- type DeleteOnlineTableRequest
- type DeletePolicyRequest
- type DeletePolicyResponse
- type DeleteQualityMonitorRequest
- type DeleteRegisteredModelRequest
- type DeleteRequestExternalLineage
- type DeleteSchemaRequest
- type DeleteStorageCredentialRequest
- type DeleteTableConstraintRequest
- type DeleteTableRequest
- type DeleteVolumeRequest
- type DeltaRuntimePropertiesKvPairs
- type DeltaSharingScopeEnum
- type Dependency
- type DependencyList
- type DestinationType
- type DisableRequest
- type EffectivePermissionsList
- type EffectivePredictiveOptimizationFlag
- type EffectivePredictiveOptimizationFlagInheritedFromType
- func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Set(v string) error
- func (f *EffectivePredictiveOptimizationFlagInheritedFromType) String() string
- func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Type() string
- func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Values() []EffectivePredictiveOptimizationFlagInheritedFromType
- type EffectivePrivilege
- type EffectivePrivilegeAssignment
- type EnablePredictiveOptimization
- type EnableRequest
- type EncryptionDetails
- type EntityTagAssignment
- type EntityTagAssignmentsAPI
- func (a *EntityTagAssignmentsAPI) Create(ctx context.Context, request CreateEntityTagAssignmentRequest) (*EntityTagAssignment, error)
- func (a *EntityTagAssignmentsAPI) Delete(ctx context.Context, request DeleteEntityTagAssignmentRequest) error
- func (a *EntityTagAssignmentsAPI) Get(ctx context.Context, request GetEntityTagAssignmentRequest) (*EntityTagAssignment, error)
- func (a *EntityTagAssignmentsAPI) List(ctx context.Context, request ListEntityTagAssignmentsRequest) listing.Iterator[EntityTagAssignment]
- func (a *EntityTagAssignmentsAPI) ListAll(ctx context.Context, request ListEntityTagAssignmentsRequest) ([]EntityTagAssignment, error)
- func (a *EntityTagAssignmentsAPI) Update(ctx context.Context, request UpdateEntityTagAssignmentRequest) (*EntityTagAssignment, error)
- type EntityTagAssignmentsInterface
- type EntityTagAssignmentsServicedeprecated
- type ExistsRequest
- type ExternalLineageAPI
- func (a *ExternalLineageAPI) CreateExternalLineageRelationship(ctx context.Context, request CreateExternalLineageRelationshipRequest) (*ExternalLineageRelationship, error)
- func (a *ExternalLineageAPI) DeleteExternalLineageRelationship(ctx context.Context, request DeleteExternalLineageRelationshipRequest) error
- func (a *ExternalLineageAPI) ListExternalLineageRelationships(ctx context.Context, request ListExternalLineageRelationshipsRequest) listing.Iterator[ExternalLineageInfo]
- func (a *ExternalLineageAPI) ListExternalLineageRelationshipsAll(ctx context.Context, request ListExternalLineageRelationshipsRequest) ([]ExternalLineageInfo, error)
- func (a *ExternalLineageAPI) UpdateExternalLineageRelationship(ctx context.Context, request UpdateExternalLineageRelationshipRequest) (*ExternalLineageRelationship, error)
- type ExternalLineageExternalMetadata
- type ExternalLineageExternalMetadataInfo
- type ExternalLineageFileInfo
- type ExternalLineageInfo
- type ExternalLineageInterface
- type ExternalLineageModelVersion
- type ExternalLineageModelVersionInfo
- type ExternalLineageObject
- type ExternalLineagePath
- type ExternalLineageRelationship
- type ExternalLineageRelationshipInfo
- type ExternalLineageServicedeprecated
- type ExternalLineageTable
- type ExternalLineageTableInfo
- type ExternalLocationInfo
- type ExternalLocationsAPI
- func (a *ExternalLocationsAPI) Create(ctx context.Context, request CreateExternalLocation) (*ExternalLocationInfo, error)
- func (a *ExternalLocationsAPI) Delete(ctx context.Context, request DeleteExternalLocationRequest) error
- func (a *ExternalLocationsAPI) DeleteByName(ctx context.Context, name string) error
- func (a *ExternalLocationsAPI) Get(ctx context.Context, request GetExternalLocationRequest) (*ExternalLocationInfo, error)
- func (a *ExternalLocationsAPI) GetByName(ctx context.Context, name string) (*ExternalLocationInfo, error)
- func (a *ExternalLocationsAPI) List(ctx context.Context, request ListExternalLocationsRequest) listing.Iterator[ExternalLocationInfo]
- func (a *ExternalLocationsAPI) ListAll(ctx context.Context, request ListExternalLocationsRequest) ([]ExternalLocationInfo, error)
- func (a *ExternalLocationsAPI) Update(ctx context.Context, request UpdateExternalLocation) (*ExternalLocationInfo, error)
- type ExternalLocationsInterface
- type ExternalLocationsServicedeprecated
- type ExternalMetadata
- type ExternalMetadataAPI
- func (a *ExternalMetadataAPI) CreateExternalMetadata(ctx context.Context, request CreateExternalMetadataRequest) (*ExternalMetadata, error)
- func (a *ExternalMetadataAPI) DeleteExternalMetadata(ctx context.Context, request DeleteExternalMetadataRequest) error
- func (a *ExternalMetadataAPI) DeleteExternalMetadataByName(ctx context.Context, name string) error
- func (a *ExternalMetadataAPI) GetExternalMetadata(ctx context.Context, request GetExternalMetadataRequest) (*ExternalMetadata, error)
- func (a *ExternalMetadataAPI) GetExternalMetadataByName(ctx context.Context, name string) (*ExternalMetadata, error)
- func (a *ExternalMetadataAPI) ListExternalMetadata(ctx context.Context, request ListExternalMetadataRequest) listing.Iterator[ExternalMetadata]
- func (a *ExternalMetadataAPI) ListExternalMetadataAll(ctx context.Context, request ListExternalMetadataRequest) ([]ExternalMetadata, error)
- func (a *ExternalMetadataAPI) UpdateExternalMetadata(ctx context.Context, request UpdateExternalMetadataRequest) (*ExternalMetadata, error)
- type ExternalMetadataInterface
- type ExternalMetadataServicedeprecated
- type FailedStatus
- type FileEventQueue
- type ForeignKeyConstraint
- type FunctionArgument
- type FunctionDependency
- type FunctionInfo
- type FunctionInfoParameterStyle
- type FunctionInfoRoutineBody
- type FunctionInfoSecurityType
- type FunctionInfoSqlDataAccess
- type FunctionParameterInfo
- type FunctionParameterInfos
- type FunctionParameterMode
- type FunctionParameterType
- type FunctionsAPI
- func (a *FunctionsAPI) Create(ctx context.Context, request CreateFunctionRequest) (*FunctionInfo, error)
- func (a *FunctionsAPI) Delete(ctx context.Context, request DeleteFunctionRequest) error
- func (a *FunctionsAPI) DeleteByName(ctx context.Context, name string) error
- func (a *FunctionsAPI) FunctionInfoNameToFullNameMap(ctx context.Context, request ListFunctionsRequest) (map[string]string, error)
- func (a *FunctionsAPI) Get(ctx context.Context, request GetFunctionRequest) (*FunctionInfo, error)
- func (a *FunctionsAPI) GetByName(ctx context.Context, name string) (*FunctionInfo, error)
- func (a *FunctionsAPI) List(ctx context.Context, request ListFunctionsRequest) listing.Iterator[FunctionInfo]
- func (a *FunctionsAPI) ListAll(ctx context.Context, request ListFunctionsRequest) ([]FunctionInfo, error)
- func (a *FunctionsAPI) Update(ctx context.Context, request UpdateFunction) (*FunctionInfo, error)
- type FunctionsInterface
- type FunctionsServicedeprecated
- type GcpOauthToken
- type GcpPubsub
- type GenerateTemporaryPathCredentialRequest
- type GenerateTemporaryPathCredentialResponse
- type GenerateTemporaryServiceCredentialAzureOptions
- type GenerateTemporaryServiceCredentialGcpOptions
- type GenerateTemporaryServiceCredentialRequest
- type GenerateTemporaryTableCredentialRequest
- type GenerateTemporaryTableCredentialResponse
- type GetAccessRequestDestinationsRequest
- type GetAccountMetastoreAssignmentRequest
- type GetAccountMetastoreRequest
- type GetAccountStorageCredentialRequest
- type GetArtifactAllowlistRequest
- type GetBindingsRequest
- type GetByAliasRequest
- type GetCatalogRequest
- type GetCatalogWorkspaceBindingsResponse
- type GetConnectionRequest
- type GetCredentialRequest
- type GetEffectiveRequest
- type GetEntityTagAssignmentRequest
- type GetExternalLocationRequest
- type GetExternalMetadataRequest
- type GetFunctionRequest
- type GetGrantRequest
- type GetMetastoreRequest
- type GetMetastoreSummaryResponse
- type GetModelVersionRequest
- type GetOnlineTableRequest
- type GetPermissionsResponse
- type GetPolicyRequest
- type GetQualityMonitorRequest
- type GetQuotaRequest
- type GetQuotaResponse
- type GetRefreshRequest
- type GetRegisteredModelRequest
- type GetSchemaRequest
- type GetStorageCredentialRequest
- type GetTableRequest
- type GetWorkspaceBindingRequest
- type GetWorkspaceBindingsResponse
- type GrantsAPI
- func (a *GrantsAPI) Get(ctx context.Context, request GetGrantRequest) (*GetPermissionsResponse, error)
- func (a *GrantsAPI) GetBySecurableTypeAndFullName(ctx context.Context, securableType string, fullName string) (*GetPermissionsResponse, error)
- func (a *GrantsAPI) GetEffective(ctx context.Context, request GetEffectiveRequest) (*EffectivePermissionsList, error)
- func (a *GrantsAPI) GetEffectiveBySecurableTypeAndFullName(ctx context.Context, securableType string, fullName string) (*EffectivePermissionsList, error)
- func (a *GrantsAPI) Update(ctx context.Context, request UpdatePermissions) (*UpdatePermissionsResponse, error)
- type GrantsInterface
- type GrantsServicedeprecated
- type IsolationMode
- type LineageDirection
- type ListAccountMetastoreAssignmentsRequest
- type ListAccountMetastoreAssignmentsResponse
- type ListAccountStorageCredentialsRequest
- type ListAccountStorageCredentialsResponse
- type ListCatalogsRequest
- type ListCatalogsResponse
- type ListConnectionsRequest
- type ListConnectionsResponse
- type ListCredentialsRequest
- type ListCredentialsResponse
- type ListEntityTagAssignmentsRequest
- type ListEntityTagAssignmentsResponse
- type ListExternalLineageRelationshipsRequest
- type ListExternalLineageRelationshipsResponse
- type ListExternalLocationsRequest
- type ListExternalLocationsResponse
- type ListExternalMetadataRequest
- type ListExternalMetadataResponse
- type ListFunctionsRequest
- type ListFunctionsResponse
- type ListMetastoresRequest
- type ListMetastoresResponse
- type ListModelVersionsRequest
- type ListModelVersionsResponse
- type ListPoliciesRequest
- type ListPoliciesResponse
- type ListQuotasRequest
- type ListQuotasResponse
- type ListRefreshesRequest
- type ListRegisteredModelsRequest
- type ListRegisteredModelsResponse
- type ListSchemasRequest
- type ListSchemasResponse
- type ListStorageCredentialsRequest
- type ListStorageCredentialsResponse
- type ListSummariesRequest
- type ListSystemSchemasRequest
- type ListSystemSchemasResponse
- type ListTableSummariesResponse
- type ListTablesRequest
- type ListTablesResponse
- type ListVolumesRequest
- type ListVolumesResponseContent
- type MatchColumn
- type MatchType
- type MetastoreAssignment
- type MetastoreInfo
- type MetastoresAPI
- func (a *MetastoresAPI) Assign(ctx context.Context, request CreateMetastoreAssignment) error
- func (a *MetastoresAPI) Create(ctx context.Context, request CreateMetastore) (*MetastoreInfo, error)
- func (a *MetastoresAPI) Current(ctx context.Context) (*MetastoreAssignment, error)
- func (a *MetastoresAPI) Delete(ctx context.Context, request DeleteMetastoreRequest) error
- func (a *MetastoresAPI) DeleteById(ctx context.Context, id string) error
- func (a *MetastoresAPI) Get(ctx context.Context, request GetMetastoreRequest) (*MetastoreInfo, error)
- func (a *MetastoresAPI) GetById(ctx context.Context, id string) (*MetastoreInfo, error)
- func (a *MetastoresAPI) List(ctx context.Context, request ListMetastoresRequest) listing.Iterator[MetastoreInfo]
- func (a *MetastoresAPI) ListAll(ctx context.Context, request ListMetastoresRequest) ([]MetastoreInfo, error)
- func (a *MetastoresAPI) Summary(ctx context.Context) (*GetMetastoreSummaryResponse, error)
- func (a *MetastoresAPI) Unassign(ctx context.Context, request UnassignRequest) error
- func (a *MetastoresAPI) UnassignByWorkspaceId(ctx context.Context, workspaceId int64) error
- func (a *MetastoresAPI) Update(ctx context.Context, request UpdateMetastore) (*MetastoreInfo, error)
- func (a *MetastoresAPI) UpdateAssignment(ctx context.Context, request UpdateMetastoreAssignment) error
- type MetastoresInterface
- type MetastoresServicedeprecated
- type ModelVersionInfo
- type ModelVersionInfoStatus
- type ModelVersionsAPI
- func (a *ModelVersionsAPI) Delete(ctx context.Context, request DeleteModelVersionRequest) error
- func (a *ModelVersionsAPI) DeleteByFullNameAndVersion(ctx context.Context, fullName string, version int) error
- func (a *ModelVersionsAPI) Get(ctx context.Context, request GetModelVersionRequest) (*ModelVersionInfo, error)
- func (a *ModelVersionsAPI) GetByAlias(ctx context.Context, request GetByAliasRequest) (*ModelVersionInfo, error)
- func (a *ModelVersionsAPI) GetByAliasByFullNameAndAlias(ctx context.Context, fullName string, alias string) (*ModelVersionInfo, error)
- func (a *ModelVersionsAPI) GetByFullNameAndVersion(ctx context.Context, fullName string, version int) (*ModelVersionInfo, error)
- func (a *ModelVersionsAPI) List(ctx context.Context, request ListModelVersionsRequest) listing.Iterator[ModelVersionInfo]
- func (a *ModelVersionsAPI) ListAll(ctx context.Context, request ListModelVersionsRequest) ([]ModelVersionInfo, error)
- func (a *ModelVersionsAPI) ListByFullName(ctx context.Context, fullName string) (*ListModelVersionsResponse, error)
- func (a *ModelVersionsAPI) Update(ctx context.Context, request UpdateModelVersionRequest) (*ModelVersionInfo, error)
- type ModelVersionsInterface
- type ModelVersionsServicedeprecated
- type MonitorCronSchedule
- type MonitorCronSchedulePauseStatus
- type MonitorDataClassificationConfig
- type MonitorDestination
- type MonitorInferenceLog
- type MonitorInferenceLogProblemType
- type MonitorInfo
- type MonitorInfoStatus
- type MonitorMetric
- type MonitorMetricType
- type MonitorNotifications
- type MonitorRefreshInfo
- type MonitorRefreshInfoState
- type MonitorRefreshInfoTrigger
- type MonitorRefreshListResponse
- type MonitorSnapshot
- type MonitorTimeSeries
- type NamedTableConstraint
- type NotificationDestination
- type OnlineTable
- type OnlineTableSpec
- type OnlineTableSpecContinuousSchedulingPolicy
- type OnlineTableSpecTriggeredSchedulingPolicy
- type OnlineTableState
- type OnlineTableStatus
- type OnlineTablesAPI
- func (a *OnlineTablesAPI) Create(ctx context.Context, createOnlineTableRequest CreateOnlineTableRequest) (*WaitGetOnlineTableActive[OnlineTable], error)
- func (a *OnlineTablesAPI) CreateAndWait(ctx context.Context, createOnlineTableRequest CreateOnlineTableRequest, ...) (*OnlineTable, error)deprecated
- func (a *OnlineTablesAPI) Delete(ctx context.Context, request DeleteOnlineTableRequest) error
- func (a *OnlineTablesAPI) DeleteByName(ctx context.Context, name string) error
- func (a *OnlineTablesAPI) Get(ctx context.Context, request GetOnlineTableRequest) (*OnlineTable, error)
- func (a *OnlineTablesAPI) GetByName(ctx context.Context, name string) (*OnlineTable, error)
- func (a *OnlineTablesAPI) WaitGetOnlineTableActive(ctx context.Context, name string, timeout time.Duration, ...) (*OnlineTable, error)
- type OnlineTablesInterface
- type OnlineTablesServicedeprecated
- type OptionSpec
- type OptionSpecOauthStage
- type OptionSpecOptionType
- type PathOperation
- type PermissionsChange
- type PipelineProgress
- type PoliciesAPI
- func (a *PoliciesAPI) CreatePolicy(ctx context.Context, request CreatePolicyRequest) (*PolicyInfo, error)
- func (a *PoliciesAPI) DeletePolicy(ctx context.Context, request DeletePolicyRequest) (*DeletePolicyResponse, error)
- func (a *PoliciesAPI) GetPolicy(ctx context.Context, request GetPolicyRequest) (*PolicyInfo, error)
- func (a *PoliciesAPI) ListPolicies(ctx context.Context, request ListPoliciesRequest) listing.Iterator[PolicyInfo]
- func (a *PoliciesAPI) ListPoliciesAll(ctx context.Context, request ListPoliciesRequest) ([]PolicyInfo, error)
- func (a *PoliciesAPI) UpdatePolicy(ctx context.Context, request UpdatePolicyRequest) (*PolicyInfo, error)
- type PoliciesInterface
- type PoliciesServicedeprecated
- type PolicyInfo
- type PolicyType
- type PrimaryKeyConstraint
- type Principal
- type PrincipalType
- type Privilege
- type PrivilegeAssignment
- type ProvisioningInfo
- type ProvisioningInfoState
- type ProvisioningStatus
- type QualityMonitorsAPI
- func (a *QualityMonitorsAPI) CancelRefresh(ctx context.Context, request CancelRefreshRequest) error
- func (a *QualityMonitorsAPI) Create(ctx context.Context, request CreateMonitor) (*MonitorInfo, error)
- func (a *QualityMonitorsAPI) Delete(ctx context.Context, request DeleteQualityMonitorRequest) (*DeleteMonitorResponse, error)
- func (a *QualityMonitorsAPI) Get(ctx context.Context, request GetQualityMonitorRequest) (*MonitorInfo, error)
- func (a *QualityMonitorsAPI) GetRefresh(ctx context.Context, request GetRefreshRequest) (*MonitorRefreshInfo, error)
- func (a *QualityMonitorsAPI) ListRefreshes(ctx context.Context, request ListRefreshesRequest) (*MonitorRefreshListResponse, error)
- func (a *QualityMonitorsAPI) RegenerateDashboard(ctx context.Context, request RegenerateDashboardRequest) (*RegenerateDashboardResponse, error)
- func (a *QualityMonitorsAPI) RunRefresh(ctx context.Context, request RunRefreshRequest) (*MonitorRefreshInfo, error)
- func (a *QualityMonitorsAPI) Update(ctx context.Context, request UpdateMonitor) (*MonitorInfo, error)
- type QualityMonitorsInterface
- type QualityMonitorsServicedeprecated
- type QuotaInfo
- type R2Credentials
- type ReadVolumeRequest
- type RegenerateDashboardRequest
- type RegenerateDashboardResponse
- type RegisteredModelAlias
- type RegisteredModelInfo
- type RegisteredModelsAPI
- func (a *RegisteredModelsAPI) Create(ctx context.Context, request CreateRegisteredModelRequest) (*RegisteredModelInfo, error)
- func (a *RegisteredModelsAPI) Delete(ctx context.Context, request DeleteRegisteredModelRequest) error
- func (a *RegisteredModelsAPI) DeleteAlias(ctx context.Context, request DeleteAliasRequest) error
- func (a *RegisteredModelsAPI) DeleteAliasByFullNameAndAlias(ctx context.Context, fullName string, alias string) error
- func (a *RegisteredModelsAPI) DeleteByFullName(ctx context.Context, fullName string) error
- func (a *RegisteredModelsAPI) Get(ctx context.Context, request GetRegisteredModelRequest) (*RegisteredModelInfo, error)
- func (a *RegisteredModelsAPI) GetByFullName(ctx context.Context, fullName string) (*RegisteredModelInfo, error)
- func (a *RegisteredModelsAPI) GetByName(ctx context.Context, name string) (*RegisteredModelInfo, error)
- func (a *RegisteredModelsAPI) List(ctx context.Context, request ListRegisteredModelsRequest) listing.Iterator[RegisteredModelInfo]
- func (a *RegisteredModelsAPI) ListAll(ctx context.Context, request ListRegisteredModelsRequest) ([]RegisteredModelInfo, error)
- func (a *RegisteredModelsAPI) RegisteredModelInfoNameToFullNameMap(ctx context.Context, request ListRegisteredModelsRequest) (map[string]string, error)
- func (a *RegisteredModelsAPI) SetAlias(ctx context.Context, request SetRegisteredModelAliasRequest) (*RegisteredModelAlias, error)
- func (a *RegisteredModelsAPI) Update(ctx context.Context, request UpdateRegisteredModelRequest) (*RegisteredModelInfo, error)
- type RegisteredModelsInterface
- type RegisteredModelsServicedeprecated
- type ResourceQuotasAPI
- func (a *ResourceQuotasAPI) GetQuota(ctx context.Context, request GetQuotaRequest) (*GetQuotaResponse, error)
- func (a *ResourceQuotasAPI) ListQuotas(ctx context.Context, request ListQuotasRequest) listing.Iterator[QuotaInfo]
- func (a *ResourceQuotasAPI) ListQuotasAll(ctx context.Context, request ListQuotasRequest) ([]QuotaInfo, error)
- type ResourceQuotasInterface
- type ResourceQuotasServicedeprecated
- type RfaAPI
- func (a *RfaAPI) BatchCreateAccessRequests(ctx context.Context, request BatchCreateAccessRequestsRequest) (*BatchCreateAccessRequestsResponse, error)
- func (a *RfaAPI) GetAccessRequestDestinations(ctx context.Context, request GetAccessRequestDestinationsRequest) (*AccessRequestDestinations, error)
- func (a *RfaAPI) UpdateAccessRequestDestinations(ctx context.Context, request UpdateAccessRequestDestinationsRequest) (*AccessRequestDestinations, error)
- type RfaInterface
- type RfaServicedeprecated
- type RowFilterOptions
- type RunRefreshRequest
- type SchemaInfo
- type SchemasAPI
- func (a *SchemasAPI) Create(ctx context.Context, request CreateSchema) (*SchemaInfo, error)
- func (a *SchemasAPI) Delete(ctx context.Context, request DeleteSchemaRequest) error
- func (a *SchemasAPI) DeleteByFullName(ctx context.Context, fullName string) error
- func (a *SchemasAPI) Get(ctx context.Context, request GetSchemaRequest) (*SchemaInfo, error)
- func (a *SchemasAPI) GetByFullName(ctx context.Context, fullName string) (*SchemaInfo, error)
- func (a *SchemasAPI) List(ctx context.Context, request ListSchemasRequest) listing.Iterator[SchemaInfo]
- func (a *SchemasAPI) ListAll(ctx context.Context, request ListSchemasRequest) ([]SchemaInfo, error)
- func (a *SchemasAPI) Update(ctx context.Context, request UpdateSchema) (*SchemaInfo, error)
- type SchemasInterface
- type SchemasServicedeprecated
- type Securable
- type SecurableKind
- type SecurableKindManifest
- type SecurablePermissions
- type SecurableType
- type SetArtifactAllowlist
- type SetRegisteredModelAliasRequest
- type SpecialDestination
- type SseEncryptionDetails
- type SseEncryptionDetailsAlgorithm
- type StorageCredentialInfo
- type StorageCredentialsAPI
- func (a *StorageCredentialsAPI) Create(ctx context.Context, request CreateStorageCredential) (*StorageCredentialInfo, error)
- func (a *StorageCredentialsAPI) Delete(ctx context.Context, request DeleteStorageCredentialRequest) error
- func (a *StorageCredentialsAPI) DeleteByName(ctx context.Context, name string) error
- func (a *StorageCredentialsAPI) Get(ctx context.Context, request GetStorageCredentialRequest) (*StorageCredentialInfo, error)
- func (a *StorageCredentialsAPI) GetByName(ctx context.Context, name string) (*StorageCredentialInfo, error)
- func (a *StorageCredentialsAPI) List(ctx context.Context, request ListStorageCredentialsRequest) listing.Iterator[StorageCredentialInfo]
- func (a *StorageCredentialsAPI) ListAll(ctx context.Context, request ListStorageCredentialsRequest) ([]StorageCredentialInfo, error)
- func (a *StorageCredentialsAPI) Update(ctx context.Context, request UpdateStorageCredential) (*StorageCredentialInfo, error)
- func (a *StorageCredentialsAPI) Validate(ctx context.Context, request ValidateStorageCredential) (*ValidateStorageCredentialResponse, error)
- type StorageCredentialsInterface
- type StorageCredentialsServicedeprecated
- type SystemSchemaInfo
- type SystemSchemasAPI
- func (a *SystemSchemasAPI) Disable(ctx context.Context, request DisableRequest) error
- func (a *SystemSchemasAPI) DisableByMetastoreIdAndSchemaName(ctx context.Context, metastoreId string, schemaName string) error
- func (a *SystemSchemasAPI) Enable(ctx context.Context, request EnableRequest) error
- func (a *SystemSchemasAPI) List(ctx context.Context, request ListSystemSchemasRequest) listing.Iterator[SystemSchemaInfo]
- func (a *SystemSchemasAPI) ListAll(ctx context.Context, request ListSystemSchemasRequest) ([]SystemSchemaInfo, error)
- func (a *SystemSchemasAPI) ListByMetastoreId(ctx context.Context, metastoreId string) (*ListSystemSchemasResponse, error)
- type SystemSchemasInterface
- type SystemSchemasServicedeprecated
- type SystemType
- type TableConstraint
- type TableConstraintsAPI
- func (a *TableConstraintsAPI) Create(ctx context.Context, request CreateTableConstraint) (*TableConstraint, error)
- func (a *TableConstraintsAPI) Delete(ctx context.Context, request DeleteTableConstraintRequest) error
- func (a *TableConstraintsAPI) DeleteByFullName(ctx context.Context, fullName string) error
- type TableConstraintsInterface
- type TableConstraintsServicedeprecated
- type TableDependency
- type TableExistsResponse
- type TableInfo
- type TableOperation
- type TableRowFilter
- type TableSummary
- type TableType
- type TablesAPI
- func (a *TablesAPI) Create(ctx context.Context, request CreateTableRequest) (*TableInfo, error)
- func (a *TablesAPI) Delete(ctx context.Context, request DeleteTableRequest) error
- func (a *TablesAPI) DeleteByFullName(ctx context.Context, fullName string) error
- func (a *TablesAPI) Exists(ctx context.Context, request ExistsRequest) (*TableExistsResponse, error)
- func (a *TablesAPI) ExistsByFullName(ctx context.Context, fullName string) (*TableExistsResponse, error)
- func (a *TablesAPI) Get(ctx context.Context, request GetTableRequest) (*TableInfo, error)
- func (a *TablesAPI) GetByFullName(ctx context.Context, fullName string) (*TableInfo, error)
- func (a *TablesAPI) List(ctx context.Context, request ListTablesRequest) listing.Iterator[TableInfo]
- func (a *TablesAPI) ListAll(ctx context.Context, request ListTablesRequest) ([]TableInfo, error)
- func (a *TablesAPI) ListSummaries(ctx context.Context, request ListSummariesRequest) listing.Iterator[TableSummary]
- func (a *TablesAPI) ListSummariesAll(ctx context.Context, request ListSummariesRequest) ([]TableSummary, error)
- func (a *TablesAPI) Update(ctx context.Context, request UpdateTableRequest) error
- type TablesInterface
- type TablesServicedeprecated
- type TagKeyValue
- type TemporaryCredentials
- type TemporaryPathCredentialsAPI
- type TemporaryPathCredentialsInterface
- type TemporaryPathCredentialsServicedeprecated
- type TemporaryTableCredentialsAPI
- type TemporaryTableCredentialsInterface
- type TemporaryTableCredentialsServicedeprecated
- type TriggeredUpdateStatus
- type UnassignRequest
- type UpdateAccessRequestDestinationsRequest
- type UpdateAccountsMetastore
- type UpdateAccountsStorageCredential
- type UpdateCatalog
- type UpdateCatalogWorkspaceBindingsResponse
- type UpdateConnection
- type UpdateCredentialRequest
- type UpdateEntityTagAssignmentRequest
- type UpdateExternalLineageRelationshipRequest
- type UpdateExternalLocation
- type UpdateExternalMetadataRequest
- type UpdateFunction
- type UpdateMetastore
- type UpdateMetastoreAssignment
- type UpdateModelVersionRequest
- type UpdateMonitor
- type UpdatePermissions
- type UpdatePermissionsResponse
- type UpdatePolicyRequest
- type UpdateRegisteredModelRequest
- type UpdateRequestExternalLineage
- type UpdateSchema
- type UpdateStorageCredential
- type UpdateTableRequest
- type UpdateVolumeRequestContent
- type UpdateWorkspaceBindings
- type UpdateWorkspaceBindingsParameters
- type UpdateWorkspaceBindingsResponse
- type ValidateCredentialRequest
- type ValidateCredentialResponse
- type ValidateCredentialResult
- type ValidateStorageCredential
- type ValidateStorageCredentialResponse
- type ValidationResult
- type ValidationResultOperation
- type ValidationResultResult
- type VolumeInfo
- type VolumeType
- type VolumesAPI
- func (a *VolumesAPI) Create(ctx context.Context, request CreateVolumeRequestContent) (*VolumeInfo, error)
- func (a *VolumesAPI) Delete(ctx context.Context, request DeleteVolumeRequest) error
- func (a *VolumesAPI) DeleteByName(ctx context.Context, name string) error
- func (a *VolumesAPI) GetByName(ctx context.Context, name string) (*VolumeInfo, error)
- func (a *VolumesAPI) List(ctx context.Context, request ListVolumesRequest) listing.Iterator[VolumeInfo]
- func (a *VolumesAPI) ListAll(ctx context.Context, request ListVolumesRequest) ([]VolumeInfo, error)
- func (a *VolumesAPI) Read(ctx context.Context, request ReadVolumeRequest) (*VolumeInfo, error)
- func (a *VolumesAPI) ReadByName(ctx context.Context, name string) (*VolumeInfo, error)
- func (a *VolumesAPI) Update(ctx context.Context, request UpdateVolumeRequestContent) (*VolumeInfo, error)
- func (a *VolumesAPI) VolumeInfoNameToVolumeIdMap(ctx context.Context, request ListVolumesRequest) (map[string]string, error)
- type VolumesInterface
- type VolumesServicedeprecated
- type WaitGetOnlineTableActive
- type WorkspaceBinding
- type WorkspaceBindingBindingType
- type WorkspaceBindingsAPI
- func (a *WorkspaceBindingsAPI) Get(ctx context.Context, request GetWorkspaceBindingRequest) (*GetCatalogWorkspaceBindingsResponse, error)
- func (a *WorkspaceBindingsAPI) GetBindings(ctx context.Context, request GetBindingsRequest) listing.Iterator[WorkspaceBinding]
- func (a *WorkspaceBindingsAPI) GetBindingsAll(ctx context.Context, request GetBindingsRequest) ([]WorkspaceBinding, error)
- func (a *WorkspaceBindingsAPI) GetBindingsBySecurableTypeAndSecurableName(ctx context.Context, securableType string, securableName string) (*GetWorkspaceBindingsResponse, error)
- func (a *WorkspaceBindingsAPI) GetByName(ctx context.Context, name string) (*GetCatalogWorkspaceBindingsResponse, error)
- func (a *WorkspaceBindingsAPI) Update(ctx context.Context, request UpdateWorkspaceBindings) (*UpdateCatalogWorkspaceBindingsResponse, error)
- func (a *WorkspaceBindingsAPI) UpdateBindings(ctx context.Context, request UpdateWorkspaceBindingsParameters) (*UpdateWorkspaceBindingsResponse, error)
- type WorkspaceBindingsInterface
- type WorkspaceBindingsServicedeprecated
Examples ¶
- AccountMetastoreAssignmentsAPI.ListAll (MetastoreAssignments)
- CatalogsAPI.Create (CatalogWorkspaceBindings)
- CatalogsAPI.Create (Catalogs)
- CatalogsAPI.Create (Schemas)
- CatalogsAPI.Create (Shares)
- CatalogsAPI.Create (Tables)
- CatalogsAPI.Create (Volumes)
- CatalogsAPI.Get (Catalogs)
- CatalogsAPI.List (Catalogs)
- CatalogsAPI.Update (CatalogWorkspaceBindings)
- CatalogsAPI.Update (Catalogs)
- ConnectionsAPI.Create (Connections)
- ConnectionsAPI.Get (Connections)
- ConnectionsAPI.List (Connections)
- ConnectionsAPI.Update (Connections)
- ExternalLocationsAPI.Create (ExternalLocationsOnAws)
- ExternalLocationsAPI.Create (Volumes)
- ExternalLocationsAPI.Get (ExternalLocationsOnAws)
- ExternalLocationsAPI.List (ExternalLocationsOnAws)
- ExternalLocationsAPI.Update (ExternalLocationsOnAws)
- GrantsAPI.GetEffective (Tables)
- GrantsAPI.Update (Tables)
- MetastoresAPI.Assign (Metastores)
- MetastoresAPI.Create (Metastores)
- MetastoresAPI.Current (Metastores)
- MetastoresAPI.Get (Metastores)
- MetastoresAPI.List (Metastores)
- MetastoresAPI.Summary (Metastores)
- MetastoresAPI.Unassign (Metastores)
- MetastoresAPI.Update (Metastores)
- SchemasAPI.Create (Schemas)
- SchemasAPI.Create (Shares)
- SchemasAPI.Create (Tables)
- SchemasAPI.Create (Volumes)
- SchemasAPI.Get (Schemas)
- SchemasAPI.List (Schemas)
- SchemasAPI.Update (Schemas)
- StorageCredentialsAPI.Create (ExternalLocationsOnAws)
- StorageCredentialsAPI.Create (StorageCredentialsOnAws)
- StorageCredentialsAPI.Create (Volumes)
- StorageCredentialsAPI.Get (StorageCredentialsOnAws)
- StorageCredentialsAPI.List (StorageCredentialsOnAws)
- StorageCredentialsAPI.Update (StorageCredentialsOnAws)
- TablesAPI.Get (Tables)
- TablesAPI.List (Tables)
- TablesAPI.ListSummaries (Tables)
- VolumesAPI.Create (Volumes)
- VolumesAPI.List (Volumes)
- VolumesAPI.Read (Volumes)
- VolumesAPI.Update (Volumes)
- WorkspaceBindingsAPI.Get (CatalogWorkspaceBindings)
- WorkspaceBindingsAPI.Update (CatalogWorkspaceBindings)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRequestDestinations ¶ added in v0.81.0
type AccessRequestDestinations struct {
// Indicates whether any destinations are hidden from the caller due to a
// lack of permissions. This value is true if the caller does not have
// permission to see all destinations.
AreAnyDestinationsHidden bool `json:"are_any_destinations_hidden,omitempty"`
// The access request destinations for the securable.
Destinations []NotificationDestination `json:"destinations,omitempty"`
// The securable for which the access request destinations are being
// retrieved.
Securable Securable `json:"securable"`
ForceSendFields []string `json:"-" url:"-"`
}
func (AccessRequestDestinations) MarshalJSON ¶ added in v0.81.0
func (s AccessRequestDestinations) MarshalJSON() ([]byte, error)
func (*AccessRequestDestinations) UnmarshalJSON ¶ added in v0.81.0
func (s *AccessRequestDestinations) UnmarshalJSON(b []byte) error
type AccountMetastoreAssignmentsAPI ¶
type AccountMetastoreAssignmentsAPI struct {
// contains filtered or unexported fields
}
These APIs manage metastore assignments to a workspace.
func NewAccountMetastoreAssignments ¶
func NewAccountMetastoreAssignments(client *client.DatabricksClient) *AccountMetastoreAssignmentsAPI
func (*AccountMetastoreAssignmentsAPI) Create ¶
func (a *AccountMetastoreAssignmentsAPI) Create(ctx context.Context, request AccountsCreateMetastoreAssignment) (*AccountsCreateMetastoreAssignmentResponse, error)
func (*AccountMetastoreAssignmentsAPI) Delete ¶
func (a *AccountMetastoreAssignmentsAPI) Delete(ctx context.Context, request DeleteAccountMetastoreAssignmentRequest) (*AccountsDeleteMetastoreAssignmentResponse, error)
func (*AccountMetastoreAssignmentsAPI) DeleteByWorkspaceIdAndMetastoreId ¶
func (a *AccountMetastoreAssignmentsAPI) DeleteByWorkspaceIdAndMetastoreId(ctx context.Context, workspaceId int64, metastoreId string) (*AccountsDeleteMetastoreAssignmentResponse, error)
Deletes a metastore assignment to a workspace, leaving the workspace with no metastore.
func (*AccountMetastoreAssignmentsAPI) Get ¶
func (a *AccountMetastoreAssignmentsAPI) Get(ctx context.Context, request GetAccountMetastoreAssignmentRequest) (*AccountsMetastoreAssignment, error)
func (*AccountMetastoreAssignmentsAPI) GetByWorkspaceId ¶
func (a *AccountMetastoreAssignmentsAPI) GetByWorkspaceId(ctx context.Context, workspaceId int64) (*AccountsMetastoreAssignment, error)
Gets the metastore assignment, if any, for the workspace specified by ID. If the workspace is assigned a metastore, the mapping will be returned. If no metastore is assigned to the workspace, the assignment will not be found and a 404 returned.
func (*AccountMetastoreAssignmentsAPI) List ¶
func (a *AccountMetastoreAssignmentsAPI) List(ctx context.Context, request ListAccountMetastoreAssignmentsRequest) listing.Iterator[int64]
Gets a list of all Databricks workspace IDs that have been assigned to given metastore.
func (*AccountMetastoreAssignmentsAPI) ListAll ¶ added in v0.22.0
func (a *AccountMetastoreAssignmentsAPI) ListAll(ctx context.Context, request ListAccountMetastoreAssignmentsRequest) ([]int64, error)
Gets a list of all Databricks workspace IDs that have been assigned to given metastore.
Example (MetastoreAssignments) ¶
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
panic(err)
}
ws, err := a.MetastoreAssignments.ListAll(ctx, catalog.ListAccountMetastoreAssignmentsRequest{
MetastoreId: os.Getenv("TEST_METASTORE_ID"),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", ws)
func (*AccountMetastoreAssignmentsAPI) ListByMetastoreId ¶
func (a *AccountMetastoreAssignmentsAPI) ListByMetastoreId(ctx context.Context, metastoreId string) (*ListAccountMetastoreAssignmentsResponse, error)
Gets a list of all Databricks workspace IDs that have been assigned to given metastore.
func (*AccountMetastoreAssignmentsAPI) Update ¶
func (a *AccountMetastoreAssignmentsAPI) Update(ctx context.Context, request AccountsUpdateMetastoreAssignment) (*AccountsUpdateMetastoreAssignmentResponse, error)
type AccountMetastoreAssignmentsInterface ¶ added in v0.29.0
type AccountMetastoreAssignmentsInterface interface {
// Creates an assignment to a metastore for a workspace
Create(ctx context.Context, request AccountsCreateMetastoreAssignment) (*AccountsCreateMetastoreAssignmentResponse, error)
// Deletes a metastore assignment to a workspace, leaving the workspace with no
// metastore.
Delete(ctx context.Context, request DeleteAccountMetastoreAssignmentRequest) (*AccountsDeleteMetastoreAssignmentResponse, error)
// Deletes a metastore assignment to a workspace, leaving the workspace with no
// metastore.
DeleteByWorkspaceIdAndMetastoreId(ctx context.Context, workspaceId int64, metastoreId string) (*AccountsDeleteMetastoreAssignmentResponse, error)
// Gets the metastore assignment, if any, for the workspace specified by ID. If
// the workspace is assigned a metastore, the mapping will be returned. If no
// metastore is assigned to the workspace, the assignment will not be found and
// a 404 returned.
Get(ctx context.Context, request GetAccountMetastoreAssignmentRequest) (*AccountsMetastoreAssignment, error)
// Gets the metastore assignment, if any, for the workspace specified by ID. If
// the workspace is assigned a metastore, the mapping will be returned. If no
// metastore is assigned to the workspace, the assignment will not be found and
// a 404 returned.
GetByWorkspaceId(ctx context.Context, workspaceId int64) (*AccountsMetastoreAssignment, error)
// Gets a list of all Databricks workspace IDs that have been assigned to given
// metastore.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListAccountMetastoreAssignmentsRequest) listing.Iterator[int64]
// Gets a list of all Databricks workspace IDs that have been assigned to given
// metastore.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListAccountMetastoreAssignmentsRequest) ([]int64, error)
// Gets a list of all Databricks workspace IDs that have been assigned to given
// metastore.
ListByMetastoreId(ctx context.Context, metastoreId string) (*ListAccountMetastoreAssignmentsResponse, error)
// Updates an assignment to a metastore for a workspace. Currently, only the
// default catalog may be updated.
Update(ctx context.Context, request AccountsUpdateMetastoreAssignment) (*AccountsUpdateMetastoreAssignmentResponse, error)
}
type AccountMetastoreAssignmentsService
deprecated
type AccountMetastoreAssignmentsService interface {
// Creates an assignment to a metastore for a workspace
Create(ctx context.Context, request AccountsCreateMetastoreAssignment) (*AccountsCreateMetastoreAssignmentResponse, error)
// Deletes a metastore assignment to a workspace, leaving the workspace with
// no metastore.
Delete(ctx context.Context, request DeleteAccountMetastoreAssignmentRequest) (*AccountsDeleteMetastoreAssignmentResponse, error)
// Gets the metastore assignment, if any, for the workspace specified by ID.
// If the workspace is assigned a metastore, the mapping will be returned.
// If no metastore is assigned to the workspace, the assignment will not be
// found and a 404 returned.
Get(ctx context.Context, request GetAccountMetastoreAssignmentRequest) (*AccountsMetastoreAssignment, error)
// Gets a list of all Databricks workspace IDs that have been assigned to
// given metastore.
List(ctx context.Context, request ListAccountMetastoreAssignmentsRequest) (*ListAccountMetastoreAssignmentsResponse, error)
// Updates an assignment to a metastore for a workspace. Currently, only the
// default catalog may be updated.
Update(ctx context.Context, request AccountsUpdateMetastoreAssignment) (*AccountsUpdateMetastoreAssignmentResponse, error)
}
These APIs manage metastore assignments to a workspace.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type AccountMetastoresAPI ¶
type AccountMetastoresAPI struct {
// contains filtered or unexported fields
}
These APIs manage Unity Catalog metastores for an account. A metastore contains catalogs that can be associated with workspaces
func NewAccountMetastores ¶
func NewAccountMetastores(client *client.DatabricksClient) *AccountMetastoresAPI
func (*AccountMetastoresAPI) Create ¶
func (a *AccountMetastoresAPI) Create(ctx context.Context, request AccountsCreateMetastore) (*AccountsCreateMetastoreResponse, error)
func (*AccountMetastoresAPI) Delete ¶
func (a *AccountMetastoresAPI) Delete(ctx context.Context, request DeleteAccountMetastoreRequest) (*AccountsDeleteMetastoreResponse, error)
func (*AccountMetastoresAPI) DeleteByMetastoreId ¶
func (a *AccountMetastoresAPI) DeleteByMetastoreId(ctx context.Context, metastoreId string) (*AccountsDeleteMetastoreResponse, error)
Deletes a Unity Catalog metastore for an account, both specified by ID.
func (*AccountMetastoresAPI) Get ¶
func (a *AccountMetastoresAPI) Get(ctx context.Context, request GetAccountMetastoreRequest) (*AccountsGetMetastoreResponse, error)
func (*AccountMetastoresAPI) GetByMetastoreId ¶
func (a *AccountMetastoresAPI) GetByMetastoreId(ctx context.Context, metastoreId string) (*AccountsGetMetastoreResponse, error)
Gets a Unity Catalog metastore from an account, both specified by ID.
func (*AccountMetastoresAPI) List ¶
func (a *AccountMetastoresAPI) List(ctx context.Context) listing.Iterator[MetastoreInfo]
Gets all Unity Catalog metastores associated with an account specified by ID.
func (*AccountMetastoresAPI) ListAll ¶ added in v0.18.0
func (a *AccountMetastoresAPI) ListAll(ctx context.Context) ([]MetastoreInfo, error)
Gets all Unity Catalog metastores associated with an account specified by ID.
func (*AccountMetastoresAPI) Update ¶
func (a *AccountMetastoresAPI) Update(ctx context.Context, request AccountsUpdateMetastore) (*AccountsUpdateMetastoreResponse, error)
type AccountMetastoresInterface ¶ added in v0.29.0
type AccountMetastoresInterface interface {
// Creates a Unity Catalog metastore.
Create(ctx context.Context, request AccountsCreateMetastore) (*AccountsCreateMetastoreResponse, error)
// Deletes a Unity Catalog metastore for an account, both specified by ID.
Delete(ctx context.Context, request DeleteAccountMetastoreRequest) (*AccountsDeleteMetastoreResponse, error)
// Deletes a Unity Catalog metastore for an account, both specified by ID.
DeleteByMetastoreId(ctx context.Context, metastoreId string) (*AccountsDeleteMetastoreResponse, error)
// Gets a Unity Catalog metastore from an account, both specified by ID.
Get(ctx context.Context, request GetAccountMetastoreRequest) (*AccountsGetMetastoreResponse, error)
// Gets a Unity Catalog metastore from an account, both specified by ID.
GetByMetastoreId(ctx context.Context, metastoreId string) (*AccountsGetMetastoreResponse, error)
// Gets all Unity Catalog metastores associated with an account specified by ID.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context) listing.Iterator[MetastoreInfo]
// Gets all Unity Catalog metastores associated with an account specified by ID.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context) ([]MetastoreInfo, error)
// Updates an existing Unity Catalog metastore.
Update(ctx context.Context, request AccountsUpdateMetastore) (*AccountsUpdateMetastoreResponse, error)
}
type AccountMetastoresService
deprecated
type AccountMetastoresService interface {
// Creates a Unity Catalog metastore.
Create(ctx context.Context, request AccountsCreateMetastore) (*AccountsCreateMetastoreResponse, error)
// Deletes a Unity Catalog metastore for an account, both specified by ID.
Delete(ctx context.Context, request DeleteAccountMetastoreRequest) (*AccountsDeleteMetastoreResponse, error)
// Gets a Unity Catalog metastore from an account, both specified by ID.
Get(ctx context.Context, request GetAccountMetastoreRequest) (*AccountsGetMetastoreResponse, error)
// Gets all Unity Catalog metastores associated with an account specified by
// ID.
List(ctx context.Context) (*AccountsListMetastoresResponse, error)
// Updates an existing Unity Catalog metastore.
Update(ctx context.Context, request AccountsUpdateMetastore) (*AccountsUpdateMetastoreResponse, error)
}
These APIs manage Unity Catalog metastores for an account. A metastore contains catalogs that can be associated with workspaces
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type AccountStorageCredentialsAPI ¶
type AccountStorageCredentialsAPI struct {
// contains filtered or unexported fields
}
These APIs manage storage credentials for a particular metastore.
func NewAccountStorageCredentials ¶
func NewAccountStorageCredentials(client *client.DatabricksClient) *AccountStorageCredentialsAPI
func (*AccountStorageCredentialsAPI) Create ¶
func (a *AccountStorageCredentialsAPI) Create(ctx context.Context, request AccountsCreateStorageCredential) (*AccountsCreateStorageCredentialInfo, error)
func (*AccountStorageCredentialsAPI) Delete ¶ added in v0.9.0
func (a *AccountStorageCredentialsAPI) Delete(ctx context.Context, request DeleteAccountStorageCredentialRequest) (*AccountsDeleteStorageCredentialResponse, error)
func (*AccountStorageCredentialsAPI) DeleteByMetastoreIdAndStorageCredentialName ¶ added in v0.23.0
func (a *AccountStorageCredentialsAPI) DeleteByMetastoreIdAndStorageCredentialName(ctx context.Context, metastoreId string, storageCredentialName string) (*AccountsDeleteStorageCredentialResponse, error)
Deletes a storage credential from the metastore. The caller must be an owner of the storage credential.
func (*AccountStorageCredentialsAPI) Get ¶
func (a *AccountStorageCredentialsAPI) Get(ctx context.Context, request GetAccountStorageCredentialRequest) (*AccountsStorageCredentialInfo, error)
func (*AccountStorageCredentialsAPI) GetByMetastoreIdAndStorageCredentialName ¶ added in v0.23.0
func (a *AccountStorageCredentialsAPI) GetByMetastoreIdAndStorageCredentialName(ctx context.Context, metastoreId string, storageCredentialName string) (*AccountsStorageCredentialInfo, error)
Gets a storage credential from the metastore. The caller must be a metastore admin, the owner of the storage credential, or have a level of privilege on the storage credential.
func (*AccountStorageCredentialsAPI) List ¶
func (a *AccountStorageCredentialsAPI) List(ctx context.Context, request ListAccountStorageCredentialsRequest) listing.Iterator[StorageCredentialInfo]
Gets a list of all storage credentials that have been assigned to given metastore.
func (*AccountStorageCredentialsAPI) ListAll ¶ added in v0.42.0
func (a *AccountStorageCredentialsAPI) ListAll(ctx context.Context, request ListAccountStorageCredentialsRequest) ([]StorageCredentialInfo, error)
Gets a list of all storage credentials that have been assigned to given metastore.
func (*AccountStorageCredentialsAPI) ListByMetastoreId ¶
func (a *AccountStorageCredentialsAPI) ListByMetastoreId(ctx context.Context, metastoreId string) (*ListAccountStorageCredentialsResponse, error)
Gets a list of all storage credentials that have been assigned to given metastore.
func (*AccountStorageCredentialsAPI) Update ¶ added in v0.9.0
func (a *AccountStorageCredentialsAPI) Update(ctx context.Context, request AccountsUpdateStorageCredential) (*AccountsUpdateStorageCredentialResponse, error)
type AccountStorageCredentialsInterface ¶ added in v0.29.0
type AccountStorageCredentialsInterface interface {
// Creates a new storage credential. The request object is specific to the
// cloud: - **AwsIamRole** for AWS credentials - **AzureServicePrincipal** for
// Azure credentials - **GcpServiceAccountKey** for GCP credentials
//
// The caller must be a metastore admin and have the `CREATE_STORAGE_CREDENTIAL`
// privilege on the metastore.
Create(ctx context.Context, request AccountsCreateStorageCredential) (*AccountsCreateStorageCredentialInfo, error)
// Deletes a storage credential from the metastore. The caller must be an owner
// of the storage credential.
Delete(ctx context.Context, request DeleteAccountStorageCredentialRequest) (*AccountsDeleteStorageCredentialResponse, error)
// Deletes a storage credential from the metastore. The caller must be an owner
// of the storage credential.
DeleteByMetastoreIdAndStorageCredentialName(ctx context.Context, metastoreId string, storageCredentialName string) (*AccountsDeleteStorageCredentialResponse, error)
// Gets a storage credential from the metastore. The caller must be a metastore
// admin, the owner of the storage credential, or have a level of privilege on
// the storage credential.
Get(ctx context.Context, request GetAccountStorageCredentialRequest) (*AccountsStorageCredentialInfo, error)
// Gets a storage credential from the metastore. The caller must be a metastore
// admin, the owner of the storage credential, or have a level of privilege on
// the storage credential.
GetByMetastoreIdAndStorageCredentialName(ctx context.Context, metastoreId string, storageCredentialName string) (*AccountsStorageCredentialInfo, error)
// Gets a list of all storage credentials that have been assigned to given
// metastore.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListAccountStorageCredentialsRequest) listing.Iterator[StorageCredentialInfo]
// Gets a list of all storage credentials that have been assigned to given
// metastore.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListAccountStorageCredentialsRequest) ([]StorageCredentialInfo, error)
// Gets a list of all storage credentials that have been assigned to given
// metastore.
ListByMetastoreId(ctx context.Context, metastoreId string) (*ListAccountStorageCredentialsResponse, error)
// Updates a storage credential on the metastore. The caller must be the owner
// of the storage credential. If the caller is a metastore admin, only the
// **owner** credential can be changed.
Update(ctx context.Context, request AccountsUpdateStorageCredential) (*AccountsUpdateStorageCredentialResponse, error)
}
type AccountStorageCredentialsService
deprecated
type AccountStorageCredentialsService interface {
// Creates a new storage credential. The request object is specific to the
// cloud: - **AwsIamRole** for AWS credentials - **AzureServicePrincipal**
// for Azure credentials - **GcpServiceAccountKey** for GCP credentials
//
// The caller must be a metastore admin and have the
// `CREATE_STORAGE_CREDENTIAL` privilege on the metastore.
Create(ctx context.Context, request AccountsCreateStorageCredential) (*AccountsCreateStorageCredentialInfo, error)
// Deletes a storage credential from the metastore. The caller must be an
// owner of the storage credential.
Delete(ctx context.Context, request DeleteAccountStorageCredentialRequest) (*AccountsDeleteStorageCredentialResponse, error)
// Gets a storage credential from the metastore. The caller must be a
// metastore admin, the owner of the storage credential, or have a level of
// privilege on the storage credential.
Get(ctx context.Context, request GetAccountStorageCredentialRequest) (*AccountsStorageCredentialInfo, error)
// Gets a list of all storage credentials that have been assigned to given
// metastore.
List(ctx context.Context, request ListAccountStorageCredentialsRequest) (*ListAccountStorageCredentialsResponse, error)
// Updates a storage credential on the metastore. The caller must be the
// owner of the storage credential. If the caller is a metastore admin, only
// the **owner** credential can be changed.
Update(ctx context.Context, request AccountsUpdateStorageCredential) (*AccountsUpdateStorageCredentialResponse, error)
}
These APIs manage storage credentials for a particular metastore.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type AccountsCreateMetastore ¶ added in v0.10.0
type AccountsCreateMetastore struct {
MetastoreInfo *CreateAccountsMetastore `json:"metastore_info,omitempty"`
}
Properties of the new metastore.
type AccountsCreateMetastoreAssignment ¶ added in v0.10.0
type AccountsCreateMetastoreAssignment struct {
MetastoreAssignment *CreateMetastoreAssignment `json:"metastore_assignment,omitempty"`
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
// Workspace ID.
WorkspaceId int64 `json:"-" url:"-"`
}
The mapping from workspace to metastore.
type AccountsCreateMetastoreAssignmentResponse ¶ added in v0.86.0
type AccountsCreateMetastoreAssignmentResponse struct {
}
The metastore assignment was successfully created.
type AccountsCreateMetastoreResponse ¶ added in v0.86.0
type AccountsCreateMetastoreResponse struct {
MetastoreInfo *MetastoreInfo `json:"metastore_info,omitempty"`
}
type AccountsCreateStorageCredential ¶ added in v0.10.0
type AccountsCreateStorageCredential struct {
CredentialInfo *CreateAccountsStorageCredential `json:"credential_info,omitempty"`
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
// Optional, default false. Supplying true to this argument skips validation
// of the created set of credentials.
SkipValidation bool `json:"skip_validation,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (AccountsCreateStorageCredential) MarshalJSON ¶ added in v0.73.0
func (s AccountsCreateStorageCredential) MarshalJSON() ([]byte, error)
func (*AccountsCreateStorageCredential) UnmarshalJSON ¶ added in v0.73.0
func (s *AccountsCreateStorageCredential) UnmarshalJSON(b []byte) error
type AccountsCreateStorageCredentialInfo ¶ added in v0.86.0
type AccountsCreateStorageCredentialInfo struct {
CredentialInfo *StorageCredentialInfo `json:"credential_info,omitempty"`
}
type AccountsDeleteMetastoreAssignmentResponse ¶ added in v0.86.0
type AccountsDeleteMetastoreAssignmentResponse struct {
}
The metastore assignment was successfully deleted.
type AccountsDeleteMetastoreResponse ¶ added in v0.86.0
type AccountsDeleteMetastoreResponse struct {
}
The metastore was successfully deleted.
type AccountsDeleteStorageCredentialResponse ¶ added in v0.86.0
type AccountsDeleteStorageCredentialResponse struct {
}
The storage credential was successfully deleted.
type AccountsGetMetastoreResponse ¶ added in v0.86.0
type AccountsGetMetastoreResponse struct {
MetastoreInfo *MetastoreInfo `json:"metastore_info,omitempty"`
}
The metastore was successfully returned.
type AccountsListMetastoresResponse ¶ added in v0.86.0
type AccountsListMetastoresResponse struct {
// An array of metastore information objects.
Metastores []MetastoreInfo `json:"metastores,omitempty"`
}
Metastores were returned successfully.
type AccountsMetastoreAssignment ¶ added in v0.10.0
type AccountsMetastoreAssignment struct {
MetastoreAssignment *MetastoreAssignment `json:"metastore_assignment,omitempty"`
}
The workspace metastore assignment was successfully returned.
type AccountsStorageCredentialInfo ¶ added in v0.16.0
type AccountsStorageCredentialInfo struct {
CredentialInfo *StorageCredentialInfo `json:"credential_info,omitempty"`
}
The storage credential was successfully retrieved.
type AccountsUpdateMetastore ¶ added in v0.10.0
type AccountsUpdateMetastore struct {
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
// Properties of the metastore to change.
MetastoreInfo *UpdateAccountsMetastore `json:"metastore_info,omitempty"`
}
Properties of the metastore to change.
type AccountsUpdateMetastoreAssignment ¶ added in v0.10.0
type AccountsUpdateMetastoreAssignment struct {
MetastoreAssignment *UpdateMetastoreAssignment `json:"metastore_assignment,omitempty"`
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
// Workspace ID.
WorkspaceId int64 `json:"-" url:"-"`
}
The metastore assignment to update.
type AccountsUpdateMetastoreAssignmentResponse ¶ added in v0.86.0
type AccountsUpdateMetastoreAssignmentResponse struct {
}
The metastore assignment was successfully updated.
type AccountsUpdateMetastoreResponse ¶ added in v0.86.0
type AccountsUpdateMetastoreResponse struct {
MetastoreInfo *MetastoreInfo `json:"metastore_info,omitempty"`
}
The metastore update request succeeded.
type AccountsUpdateStorageCredential ¶ added in v0.10.0
type AccountsUpdateStorageCredential struct {
CredentialInfo *UpdateAccountsStorageCredential `json:"credential_info,omitempty"`
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
// Optional. Supplying true to this argument skips validation of the updated
// set of credentials.
SkipValidation bool `json:"skip_validation,omitempty"`
// Name of the storage credential.
StorageCredentialName string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
The storage credential to update.
func (AccountsUpdateStorageCredential) MarshalJSON ¶ added in v0.73.0
func (s AccountsUpdateStorageCredential) MarshalJSON() ([]byte, error)
func (*AccountsUpdateStorageCredential) UnmarshalJSON ¶ added in v0.73.0
func (s *AccountsUpdateStorageCredential) UnmarshalJSON(b []byte) error
type AccountsUpdateStorageCredentialResponse ¶ added in v0.86.0
type AccountsUpdateStorageCredentialResponse struct {
CredentialInfo *StorageCredentialInfo `json:"credential_info,omitempty"`
}
The storage credential was successfully updated.
type ArtifactAllowlistInfo ¶ added in v0.17.0
type ArtifactAllowlistInfo struct {
// A list of allowed artifact match patterns.
ArtifactMatchers []ArtifactMatcher `json:"artifact_matchers,omitempty"`
// Time at which this artifact allowlist was set, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of the user who set the artifact allowlist.
CreatedBy string `json:"created_by,omitempty"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ArtifactAllowlistInfo) MarshalJSON ¶ added in v0.23.0
func (s ArtifactAllowlistInfo) MarshalJSON() ([]byte, error)
func (*ArtifactAllowlistInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *ArtifactAllowlistInfo) UnmarshalJSON(b []byte) error
type ArtifactAllowlistsAPI ¶ added in v0.17.0
type ArtifactAllowlistsAPI struct {
// contains filtered or unexported fields
}
In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the `allowlist` in UC so that users can leverage these artifacts on compute configured with shared access mode.
func NewArtifactAllowlists ¶ added in v0.17.0
func NewArtifactAllowlists(client *client.DatabricksClient) *ArtifactAllowlistsAPI
func (*ArtifactAllowlistsAPI) Get ¶ added in v0.17.0
func (a *ArtifactAllowlistsAPI) Get(ctx context.Context, request GetArtifactAllowlistRequest) (*ArtifactAllowlistInfo, error)
func (*ArtifactAllowlistsAPI) GetByArtifactType ¶ added in v0.17.0
func (a *ArtifactAllowlistsAPI) GetByArtifactType(ctx context.Context, artifactType ArtifactType) (*ArtifactAllowlistInfo, error)
Get the artifact allowlist of a certain artifact type. The caller must be a metastore admin or have the **MANAGE ALLOWLIST** privilege on the metastore.
func (*ArtifactAllowlistsAPI) Update ¶ added in v0.17.0
func (a *ArtifactAllowlistsAPI) Update(ctx context.Context, request SetArtifactAllowlist) (*ArtifactAllowlistInfo, error)
type ArtifactAllowlistsInterface ¶ added in v0.29.0
type ArtifactAllowlistsInterface interface {
// Get the artifact allowlist of a certain artifact type. The caller must be a
// metastore admin or have the **MANAGE ALLOWLIST** privilege on the metastore.
Get(ctx context.Context, request GetArtifactAllowlistRequest) (*ArtifactAllowlistInfo, error)
// Get the artifact allowlist of a certain artifact type. The caller must be a
// metastore admin or have the **MANAGE ALLOWLIST** privilege on the metastore.
GetByArtifactType(ctx context.Context, artifactType ArtifactType) (*ArtifactAllowlistInfo, error)
// Set the artifact allowlist of a certain artifact type. The whole artifact
// allowlist is replaced with the new allowlist. The caller must be a metastore
// admin or have the **MANAGE ALLOWLIST** privilege on the metastore.
Update(ctx context.Context, request SetArtifactAllowlist) (*ArtifactAllowlistInfo, error)
}
type ArtifactAllowlistsService
deprecated
added in
v0.17.0
type ArtifactAllowlistsService interface {
// Get the artifact allowlist of a certain artifact type. The caller must be
// a metastore admin or have the **MANAGE ALLOWLIST** privilege on the
// metastore.
Get(ctx context.Context, request GetArtifactAllowlistRequest) (*ArtifactAllowlistInfo, error)
// Set the artifact allowlist of a certain artifact type. The whole artifact
// allowlist is replaced with the new allowlist. The caller must be a
// metastore admin or have the **MANAGE ALLOWLIST** privilege on the
// metastore.
Update(ctx context.Context, request SetArtifactAllowlist) (*ArtifactAllowlistInfo, error)
}
In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the `allowlist` in UC so that users can leverage these artifacts on compute configured with shared access mode.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type ArtifactMatcher ¶ added in v0.17.0
type ArtifactType ¶ added in v0.17.0
type ArtifactType string
The artifact type
const ArtifactTypeInitScript ArtifactType = `INIT_SCRIPT`
const ArtifactTypeLibraryJar ArtifactType = `LIBRARY_JAR`
const ArtifactTypeLibraryMaven ArtifactType = `LIBRARY_MAVEN`
func (*ArtifactType) Set ¶ added in v0.17.0
func (f *ArtifactType) Set(v string) error
Set raw string value and validate it against allowed values
func (*ArtifactType) String ¶ added in v0.17.0
func (f *ArtifactType) String() string
String representation for fmt.Print
func (*ArtifactType) Type ¶ added in v0.17.0
func (f *ArtifactType) Type() string
Type always returns ArtifactType to satisfy [pflag.Value] interface
func (*ArtifactType) Values ¶ added in v0.72.0
func (f *ArtifactType) Values() []ArtifactType
Values returns all possible values for ArtifactType.
There is no guarantee on the order of the values in the slice.
type AwsCredentials ¶ added in v0.47.0
type AwsCredentials struct {
// The access key ID that identifies the temporary credentials.
AccessKeyId string `json:"access_key_id,omitempty"`
// The Amazon Resource Name (ARN) of the S3 access point for temporary
// credentials related the external location.
AccessPoint string `json:"access_point,omitempty"`
// The secret access key that can be used to sign AWS API requests.
SecretAccessKey string `json:"secret_access_key,omitempty"`
// The token that users must pass to AWS API to use the temporary
// credentials.
SessionToken string `json:"session_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
AWS temporary credentials for API authentication. Read more at https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html.
func (AwsCredentials) MarshalJSON ¶ added in v0.47.0
func (s AwsCredentials) MarshalJSON() ([]byte, error)
func (*AwsCredentials) UnmarshalJSON ¶ added in v0.47.0
func (s *AwsCredentials) UnmarshalJSON(b []byte) error
type AwsIamRole ¶
type AwsIamRole struct {
// The external ID used in role assumption to prevent the confused deputy
// problem.
ExternalId string `json:"external_id,omitempty"`
// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary
// credentials.
RoleArn string `json:"role_arn,omitempty"`
// The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks.
// This is the identity that is going to assume the AWS IAM role.
UnityCatalogIamArn string `json:"unity_catalog_iam_arn,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The AWS IAM role configuration
func (AwsIamRole) MarshalJSON ¶ added in v0.23.0
func (s AwsIamRole) MarshalJSON() ([]byte, error)
func (*AwsIamRole) UnmarshalJSON ¶ added in v0.23.0
func (s *AwsIamRole) UnmarshalJSON(b []byte) error
type AwsIamRoleRequest ¶ added in v0.35.0
type AwsIamRoleRequest struct {
// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary
// credentials.
RoleArn string `json:"role_arn"`
}
The AWS IAM role configuration
type AwsIamRoleResponse ¶ added in v0.35.0
type AwsIamRoleResponse struct {
// The external ID used in role assumption to prevent the confused deputy
// problem.
ExternalId string `json:"external_id,omitempty"`
// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary
// credentials.
RoleArn string `json:"role_arn"`
// The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks.
// This is the identity that is going to assume the AWS IAM role.
UnityCatalogIamArn string `json:"unity_catalog_iam_arn,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The AWS IAM role configuration
func (AwsIamRoleResponse) MarshalJSON ¶ added in v0.35.0
func (s AwsIamRoleResponse) MarshalJSON() ([]byte, error)
func (*AwsIamRoleResponse) UnmarshalJSON ¶ added in v0.35.0
func (s *AwsIamRoleResponse) UnmarshalJSON(b []byte) error
type AwsSqsQueue ¶ added in v0.70.0
type AwsSqsQueue struct {
// Unique identifier included in the name of file events managed cloud
// resources.
ManagedResourceId string `json:"managed_resource_id,omitempty"`
// The AQS queue url in the format
// https://sqs.{region}.amazonaws.com/{account id}/{queue name} Required for
// provided_sqs.
QueueUrl string `json:"queue_url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (AwsSqsQueue) MarshalJSON ¶ added in v0.70.0
func (s AwsSqsQueue) MarshalJSON() ([]byte, error)
func (*AwsSqsQueue) UnmarshalJSON ¶ added in v0.70.0
func (s *AwsSqsQueue) UnmarshalJSON(b []byte) error
type AzureActiveDirectoryToken ¶ added in v0.51.0
type AzureActiveDirectoryToken struct {
// Opaque token that contains claims that you can use in Azure Active
// Directory to access cloud services.
AadToken string `json:"aad_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Azure Active Directory token, essentially the Oauth token for Azure Service Principal or Managed Identity. Read more at https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token
func (AzureActiveDirectoryToken) MarshalJSON ¶ added in v0.51.0
func (s AzureActiveDirectoryToken) MarshalJSON() ([]byte, error)
func (*AzureActiveDirectoryToken) UnmarshalJSON ¶ added in v0.51.0
func (s *AzureActiveDirectoryToken) UnmarshalJSON(b []byte) error
type AzureManagedIdentity ¶ added in v0.10.0
type AzureManagedIdentity struct {
// The Azure resource ID of the Azure Databricks Access Connector. Use the
// format
// `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`.
AccessConnectorId string `json:"access_connector_id"`
// The Databricks internal ID that represents this managed identity.
CredentialId string `json:"credential_id,omitempty"`
// The Azure resource ID of the managed identity. Use the format,
// `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}`
// This is only available for user-assgined identities. For system-assigned
// identities, the access_connector_id is used to identify the identity. If
// this field is not provided, then we assume the AzureManagedIdentity is
// using the system-assigned identity.
ManagedIdentityId string `json:"managed_identity_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The Azure managed identity configuration.
func (AzureManagedIdentity) MarshalJSON ¶ added in v0.23.0
func (s AzureManagedIdentity) MarshalJSON() ([]byte, error)
func (*AzureManagedIdentity) UnmarshalJSON ¶ added in v0.23.0
func (s *AzureManagedIdentity) UnmarshalJSON(b []byte) error
type AzureManagedIdentityRequest ¶ added in v0.38.0
type AzureManagedIdentityRequest struct {
// The Azure resource ID of the Azure Databricks Access Connector. Use the
// format
// `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`.
AccessConnectorId string `json:"access_connector_id"`
// The Azure resource ID of the managed identity. Use the format,
// `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}`
// This is only available for user-assgined identities. For system-assigned
// identities, the access_connector_id is used to identify the identity. If
// this field is not provided, then we assume the AzureManagedIdentity is
// using the system-assigned identity.
ManagedIdentityId string `json:"managed_identity_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The Azure managed identity configuration.
func (AzureManagedIdentityRequest) MarshalJSON ¶ added in v0.38.0
func (s AzureManagedIdentityRequest) MarshalJSON() ([]byte, error)
func (*AzureManagedIdentityRequest) UnmarshalJSON ¶ added in v0.38.0
func (s *AzureManagedIdentityRequest) UnmarshalJSON(b []byte) error
type AzureManagedIdentityResponse ¶ added in v0.38.0
type AzureManagedIdentityResponse struct {
// The Azure resource ID of the Azure Databricks Access Connector. Use the
// format
// `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`.
AccessConnectorId string `json:"access_connector_id"`
// The Databricks internal ID that represents this managed identity.
CredentialId string `json:"credential_id,omitempty"`
// The Azure resource ID of the managed identity. Use the format,
// `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}`
// This is only available for user-assgined identities. For system-assigned
// identities, the access_connector_id is used to identify the identity. If
// this field is not provided, then we assume the AzureManagedIdentity is
// using the system-assigned identity.
ManagedIdentityId string `json:"managed_identity_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The Azure managed identity configuration.
func (AzureManagedIdentityResponse) MarshalJSON ¶ added in v0.38.0
func (s AzureManagedIdentityResponse) MarshalJSON() ([]byte, error)
func (*AzureManagedIdentityResponse) UnmarshalJSON ¶ added in v0.38.0
func (s *AzureManagedIdentityResponse) UnmarshalJSON(b []byte) error
type AzureQueueStorage ¶ added in v0.70.0
type AzureQueueStorage struct {
// Unique identifier included in the name of file events managed cloud
// resources.
ManagedResourceId string `json:"managed_resource_id,omitempty"`
// The AQS queue url in the format https://{storage
// account}.queue.core.windows.net/{queue name} Required for provided_aqs.
QueueUrl string `json:"queue_url,omitempty"`
// The resource group for the queue, event grid subscription, and external
// location storage account. Only required for locations with a service
// principal storage credential
ResourceGroup string `json:"resource_group,omitempty"`
// Optional subscription id for the queue, event grid subscription, and
// external location storage account. Required for locations with a service
// principal storage credential
SubscriptionId string `json:"subscription_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (AzureQueueStorage) MarshalJSON ¶ added in v0.70.0
func (s AzureQueueStorage) MarshalJSON() ([]byte, error)
func (*AzureQueueStorage) UnmarshalJSON ¶ added in v0.70.0
func (s *AzureQueueStorage) UnmarshalJSON(b []byte) error
type AzureServicePrincipal ¶
type AzureServicePrincipal struct {
// The application ID of the application registration within the referenced
// AAD tenant.
ApplicationId string `json:"application_id"`
// The client secret generated for the above app ID in AAD.
ClientSecret string `json:"client_secret"`
// The directory ID corresponding to the Azure Active Directory (AAD) tenant
// of the application.
DirectoryId string `json:"directory_id"`
}
The Azure service principal configuration. Only applicable when purpose is **STORAGE**.
type AzureUserDelegationSas ¶ added in v0.47.0
type AzureUserDelegationSas struct {
// The signed URI (SAS Token) used to access blob services for a given path
SasToken string `json:"sas_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Azure temporary credentials for API authentication. Read more at https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas
func (AzureUserDelegationSas) MarshalJSON ¶ added in v0.47.0
func (s AzureUserDelegationSas) MarshalJSON() ([]byte, error)
func (*AzureUserDelegationSas) UnmarshalJSON ¶ added in v0.47.0
func (s *AzureUserDelegationSas) UnmarshalJSON(b []byte) error
type BatchCreateAccessRequestsRequest ¶ added in v0.81.0
type BatchCreateAccessRequestsRequest struct {
// A list of individual access requests, where each request corresponds to a
// set of permissions being requested on a list of securables for a
// specified principal.
//
// At most 30 requests per API call.
Requests []CreateAccessRequest `json:"requests,omitempty"`
}
type BatchCreateAccessRequestsResponse ¶ added in v0.81.0
type BatchCreateAccessRequestsResponse struct {
// The access request destinations for each securable object the principal
// requested.
Responses []CreateAccessRequestResponse `json:"responses,omitempty"`
}
type CancelRefreshRequest ¶ added in v0.31.0
type CatalogInfo ¶
type CatalogInfo struct {
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
CatalogType CatalogType `json:"catalog_type,omitempty"`
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// The name of the connection to an external data source.
ConnectionName string `json:"connection_name,omitempty"`
// Time at which this catalog was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of catalog creator.
CreatedBy string `json:"created_by,omitempty"`
EffectivePredictiveOptimizationFlag *EffectivePredictiveOptimizationFlag `json:"effective_predictive_optimization_flag,omitempty"`
// Whether predictive optimization should be enabled for this object and
// objects under it.
EnablePredictiveOptimization EnablePredictiveOptimization `json:"enable_predictive_optimization,omitempty"`
// The full name of the catalog. Corresponds with the name field.
FullName string `json:"full_name,omitempty"`
// Whether the current securable is accessible from all workspaces or a
// specific set of workspaces.
IsolationMode CatalogIsolationMode `json:"isolation_mode,omitempty"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// Name of catalog.
Name string `json:"name,omitempty"`
// A map of key-value properties attached to the securable.
Options map[string]string `json:"options,omitempty"`
// Username of current owner of catalog.
Owner string `json:"owner,omitempty"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
// The name of delta sharing provider.
//
// A Delta Sharing catalog is a catalog that is based on a Delta share on a
// remote sharing server.
ProviderName string `json:"provider_name,omitempty"`
ProvisioningInfo *ProvisioningInfo `json:"provisioning_info,omitempty"`
SecurableType SecurableType `json:"securable_type,omitempty"`
ShareName string `json:"share_name,omitempty"`
// Storage Location URL (full path) for managed tables within catalog.
StorageLocation string `json:"storage_location,omitempty"`
// Storage root URL for managed tables within catalog.
StorageRoot string `json:"storage_root,omitempty"`
// Time at which this catalog was last modified, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified catalog.
UpdatedBy string `json:"updated_by,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CatalogInfo) MarshalJSON ¶ added in v0.23.0
func (s CatalogInfo) MarshalJSON() ([]byte, error)
func (*CatalogInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *CatalogInfo) UnmarshalJSON(b []byte) error
type CatalogIsolationMode ¶ added in v0.43.0
type CatalogIsolationMode string
const CatalogIsolationModeIsolated CatalogIsolationMode = `ISOLATED`
const CatalogIsolationModeOpen CatalogIsolationMode = `OPEN`
func (*CatalogIsolationMode) Set ¶ added in v0.43.0
func (f *CatalogIsolationMode) Set(v string) error
Set raw string value and validate it against allowed values
func (*CatalogIsolationMode) String ¶ added in v0.43.0
func (f *CatalogIsolationMode) String() string
String representation for fmt.Print
func (*CatalogIsolationMode) Type ¶ added in v0.43.0
func (f *CatalogIsolationMode) Type() string
Type always returns CatalogIsolationMode to satisfy [pflag.Value] interface
func (*CatalogIsolationMode) Values ¶ added in v0.72.0
func (f *CatalogIsolationMode) Values() []CatalogIsolationMode
Values returns all possible values for CatalogIsolationMode.
There is no guarantee on the order of the values in the slice.
type CatalogType ¶
type CatalogType string
The type of the catalog.
const CatalogTypeDeltasharingCatalog CatalogType = `DELTASHARING_CATALOG`
const CatalogTypeForeignCatalog CatalogType = `FOREIGN_CATALOG`
const CatalogTypeInternalCatalog CatalogType = `INTERNAL_CATALOG`
const CatalogTypeManagedCatalog CatalogType = `MANAGED_CATALOG`
const CatalogTypeManagedOnlineCatalog CatalogType = `MANAGED_ONLINE_CATALOG`
const CatalogTypeSystemCatalog CatalogType = `SYSTEM_CATALOG`
func (*CatalogType) Set ¶
func (f *CatalogType) Set(v string) error
Set raw string value and validate it against allowed values
func (*CatalogType) String ¶
func (f *CatalogType) String() string
String representation for fmt.Print
func (*CatalogType) Type ¶
func (f *CatalogType) Type() string
Type always returns CatalogType to satisfy [pflag.Value] interface
func (*CatalogType) Values ¶ added in v0.72.0
func (f *CatalogType) Values() []CatalogType
Values returns all possible values for CatalogType.
There is no guarantee on the order of the values in the slice.
type CatalogsAPI ¶
type CatalogsAPI struct {
// contains filtered or unexported fields
}
A catalog is the first layer of Unity Catalog’s three-level namespace. It’s used to organize your data assets. Users can see all catalogs on which they have been assigned the USE_CATALOG data permission.
In Unity Catalog, admins and data stewards manage users and their access to data centrally across all of the workspaces in a Databricks account. Users in different workspaces can share access to the same data, depending on privileges granted centrally in Unity Catalog.
func NewCatalogs ¶
func NewCatalogs(client *client.DatabricksClient) *CatalogsAPI
func (*CatalogsAPI) Create ¶
func (a *CatalogsAPI) Create(ctx context.Context, request CreateCatalog) (*CatalogInfo, error)
Example (CatalogWorkspaceBindings) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: created.Name,
Force: true,
})
if err != nil {
panic(err)
}
Example (Catalogs) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: created.Name,
Force: true,
})
if err != nil {
panic(err)
}
Example (Schemas) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
newCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", newCatalog)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: newCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
Example (Tables) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
Example (Volumes) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
func (*CatalogsAPI) Delete ¶
func (a *CatalogsAPI) Delete(ctx context.Context, request DeleteCatalogRequest) error
func (*CatalogsAPI) DeleteByName ¶
func (a *CatalogsAPI) DeleteByName(ctx context.Context, name string) error
Deletes the catalog that matches the supplied name. The caller must be a metastore admin or the owner of the catalog.
func (*CatalogsAPI) Get ¶
func (a *CatalogsAPI) Get(ctx context.Context, request GetCatalogRequest) (*CatalogInfo, error)
Example (Catalogs) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.Catalogs.GetByName(ctx, created.Name)
if err != nil {
panic(err)
}
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: created.Name,
Force: true,
})
if err != nil {
panic(err)
}
func (*CatalogsAPI) GetByName ¶
func (a *CatalogsAPI) GetByName(ctx context.Context, name string) (*CatalogInfo, error)
Gets the specified catalog in a metastore. The caller must be a metastore admin, the owner of the catalog, or a user that has the **USE_CATALOG** privilege set for their account.
func (*CatalogsAPI) List ¶ added in v0.24.0
func (a *CatalogsAPI) List(ctx context.Context, request ListCatalogsRequest) listing.Iterator[CatalogInfo]
Gets an array of catalogs in the metastore. If the caller is the metastore admin, all catalogs will be retrieved. Otherwise, only catalogs owned by the caller (or for which the caller has the **USE_CATALOG** privilege) will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (Catalogs) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
all, err := w.Catalogs.ListAll(ctx, catalog.ListCatalogsRequest{})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", all)
func (*CatalogsAPI) ListAll ¶
func (a *CatalogsAPI) ListAll(ctx context.Context, request ListCatalogsRequest) ([]CatalogInfo, error)
Gets an array of catalogs in the metastore. If the caller is the metastore admin, all catalogs will be retrieved. Otherwise, only catalogs owned by the caller (or for which the caller has the **USE_CATALOG** privilege) will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*CatalogsAPI) Update ¶
func (a *CatalogsAPI) Update(ctx context.Context, request UpdateCatalog) (*CatalogInfo, error)
Example (CatalogWorkspaceBindings) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.Catalogs.Update(ctx, catalog.UpdateCatalog{
Name: created.Name,
IsolationMode: catalog.CatalogIsolationModeIsolated,
})
if err != nil {
panic(err)
}
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: created.Name,
Force: true,
})
if err != nil {
panic(err)
}
Example (Catalogs) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.Catalogs.Update(ctx, catalog.UpdateCatalog{
Name: created.Name,
Comment: "updated",
})
if err != nil {
panic(err)
}
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: created.Name,
Force: true,
})
if err != nil {
panic(err)
}
type CatalogsInterface ¶ added in v0.29.0
type CatalogsInterface interface {
// Creates a new catalog instance in the parent metastore if the caller is a
// metastore admin or has the **CREATE_CATALOG** privilege.
Create(ctx context.Context, request CreateCatalog) (*CatalogInfo, error)
// Deletes the catalog that matches the supplied name. The caller must be a
// metastore admin or the owner of the catalog.
Delete(ctx context.Context, request DeleteCatalogRequest) error
// Deletes the catalog that matches the supplied name. The caller must be a
// metastore admin or the owner of the catalog.
DeleteByName(ctx context.Context, name string) error
// Gets the specified catalog in a metastore. The caller must be a metastore
// admin, the owner of the catalog, or a user that has the **USE_CATALOG**
// privilege set for their account.
Get(ctx context.Context, request GetCatalogRequest) (*CatalogInfo, error)
// Gets the specified catalog in a metastore. The caller must be a metastore
// admin, the owner of the catalog, or a user that has the **USE_CATALOG**
// privilege set for their account.
GetByName(ctx context.Context, name string) (*CatalogInfo, error)
// Gets an array of catalogs in the metastore. If the caller is the metastore
// admin, all catalogs will be retrieved. Otherwise, only catalogs owned by the
// caller (or for which the caller has the **USE_CATALOG** privilege) will be
// retrieved. There is no guarantee of a specific ordering of the elements in
// the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListCatalogsRequest) listing.Iterator[CatalogInfo]
// Gets an array of catalogs in the metastore. If the caller is the metastore
// admin, all catalogs will be retrieved. Otherwise, only catalogs owned by the
// caller (or for which the caller has the **USE_CATALOG** privilege) will be
// retrieved. There is no guarantee of a specific ordering of the elements in
// the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListCatalogsRequest) ([]CatalogInfo, error)
// Updates the catalog that matches the supplied name. The caller must be either
// the owner of the catalog, or a metastore admin (when changing the owner field
// of the catalog).
Update(ctx context.Context, request UpdateCatalog) (*CatalogInfo, error)
}
type CatalogsService
deprecated
type CatalogsService interface {
// Creates a new catalog instance in the parent metastore if the caller is a
// metastore admin or has the **CREATE_CATALOG** privilege.
Create(ctx context.Context, request CreateCatalog) (*CatalogInfo, error)
// Deletes the catalog that matches the supplied name. The caller must be a
// metastore admin or the owner of the catalog.
Delete(ctx context.Context, request DeleteCatalogRequest) error
// Gets the specified catalog in a metastore. The caller must be a metastore
// admin, the owner of the catalog, or a user that has the **USE_CATALOG**
// privilege set for their account.
Get(ctx context.Context, request GetCatalogRequest) (*CatalogInfo, error)
// Gets an array of catalogs in the metastore. If the caller is the
// metastore admin, all catalogs will be retrieved. Otherwise, only catalogs
// owned by the caller (or for which the caller has the **USE_CATALOG**
// privilege) will be retrieved. There is no guarantee of a specific
// ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListCatalogsRequest) (*ListCatalogsResponse, error)
// Updates the catalog that matches the supplied name. The caller must be
// either the owner of the catalog, or a metastore admin (when changing the
// owner field of the catalog).
Update(ctx context.Context, request UpdateCatalog) (*CatalogInfo, error)
}
A catalog is the first layer of Unity Catalog’s three-level namespace. It’s used to organize your data assets. Users can see all catalogs on which they have been assigned the USE_CATALOG data permission.
In Unity Catalog, admins and data stewards manage users and their access to data centrally across all of the workspaces in a Databricks account. Users in different workspaces can share access to the same data, depending on privileges granted centrally in Unity Catalog.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type CloudflareApiToken ¶ added in v0.27.0
type CloudflareApiToken struct {
// The access key ID associated with the API token.
AccessKeyId string `json:"access_key_id"`
// The ID of the account associated with the API token.
AccountId string `json:"account_id"`
// The secret access token generated for the above access key ID.
SecretAccessKey string `json:"secret_access_key"`
}
The Cloudflare API token configuration. Read more at https://developers.cloudflare.com/r2/api/s3/tokens/
type ColumnInfo ¶
type ColumnInfo struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
Mask *ColumnMask `json:"mask,omitempty"`
// Name of Column.
Name string `json:"name,omitempty"`
// Whether field may be Null (default: true).
Nullable bool `json:"nullable,omitempty"`
// Partition index for column.
PartitionIndex int `json:"partition_index,omitempty"`
// Ordinal position of column (starting at position 0).
Position int `json:"position,omitempty"`
// Format of IntervalType.
TypeIntervalType string `json:"type_interval_type,omitempty"`
// Full data type specification, JSON-serialized.
TypeJson string `json:"type_json,omitempty"`
TypeName ColumnTypeName `json:"type_name,omitempty"`
// Digits of precision; required for DecimalTypes.
TypePrecision int `json:"type_precision,omitempty"`
// Digits to right of decimal; Required for DecimalTypes.
TypeScale int `json:"type_scale,omitempty"`
// Full data type specification as SQL/catalogString text.
TypeText string `json:"type_text,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ColumnInfo) MarshalJSON ¶ added in v0.23.0
func (s ColumnInfo) MarshalJSON() ([]byte, error)
func (*ColumnInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *ColumnInfo) UnmarshalJSON(b []byte) error
type ColumnMask ¶
type ColumnMask struct {
// The full name of the column mask SQL UDF.
FunctionName string `json:"function_name,omitempty"`
// The list of additional table columns to be passed as input to the column
// mask function. The first arg of the mask function should be of the type
// of the column being masked and the types of the rest of the args should
// match the types of columns in 'using_column_names'.
UsingColumnNames []string `json:"using_column_names,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ColumnMask) MarshalJSON ¶ added in v0.23.0
func (s ColumnMask) MarshalJSON() ([]byte, error)
func (*ColumnMask) UnmarshalJSON ¶ added in v0.23.0
func (s *ColumnMask) UnmarshalJSON(b []byte) error
type ColumnMaskOptions ¶ added in v0.80.0
type ColumnMaskOptions struct {
// The fully qualified name of the column mask function. The function is
// called on each row of the target table. The function's first argument and
// its return type should match the type of the masked column. Required on
// create and update.
FunctionName string `json:"function_name"`
// The alias of the column to be masked. The alias must refer to one of
// matched columns. The values of the column is passed to the column mask
// function as the first argument. Required on create and update.
OnColumn string `json:"on_column"`
// Optional list of column aliases or constant literals to be passed as
// additional arguments to the column mask function. The type of each column
// should match the positional argument of the column mask function.
Using []FunctionArgument `json:"using,omitempty"`
}
type ColumnRelationship ¶ added in v0.74.0
type ColumnRelationship struct {
Source string `json:"source,omitempty"`
Target string `json:"target,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ColumnRelationship) MarshalJSON ¶ added in v0.74.0
func (s ColumnRelationship) MarshalJSON() ([]byte, error)
func (*ColumnRelationship) UnmarshalJSON ¶ added in v0.74.0
func (s *ColumnRelationship) UnmarshalJSON(b []byte) error
type ColumnTypeName ¶
type ColumnTypeName string
const ColumnTypeNameArray ColumnTypeName = `ARRAY`
const ColumnTypeNameBinary ColumnTypeName = `BINARY`
const ColumnTypeNameBoolean ColumnTypeName = `BOOLEAN`
const ColumnTypeNameByte ColumnTypeName = `BYTE`
const ColumnTypeNameChar ColumnTypeName = `CHAR`
const ColumnTypeNameDate ColumnTypeName = `DATE`
const ColumnTypeNameDecimal ColumnTypeName = `DECIMAL`
const ColumnTypeNameDouble ColumnTypeName = `DOUBLE`
const ColumnTypeNameFloat ColumnTypeName = `FLOAT`
const ColumnTypeNameGeography ColumnTypeName = `GEOGRAPHY`
const ColumnTypeNameGeometry ColumnTypeName = `GEOMETRY`
const ColumnTypeNameInt ColumnTypeName = `INT`
const ColumnTypeNameInterval ColumnTypeName = `INTERVAL`
const ColumnTypeNameLong ColumnTypeName = `LONG`
const ColumnTypeNameMap ColumnTypeName = `MAP`
const ColumnTypeNameNull ColumnTypeName = `NULL`
const ColumnTypeNameShort ColumnTypeName = `SHORT`
const ColumnTypeNameString ColumnTypeName = `STRING`
const ColumnTypeNameStruct ColumnTypeName = `STRUCT`
const ColumnTypeNameTableType ColumnTypeName = `TABLE_TYPE`
const ColumnTypeNameTimestamp ColumnTypeName = `TIMESTAMP`
const ColumnTypeNameTimestampNtz ColumnTypeName = `TIMESTAMP_NTZ`
const ColumnTypeNameUserDefinedType ColumnTypeName = `USER_DEFINED_TYPE`
const ColumnTypeNameVariant ColumnTypeName = `VARIANT`
func (*ColumnTypeName) Set ¶
func (f *ColumnTypeName) Set(v string) error
Set raw string value and validate it against allowed values
func (*ColumnTypeName) String ¶
func (f *ColumnTypeName) String() string
String representation for fmt.Print
func (*ColumnTypeName) Type ¶
func (f *ColumnTypeName) Type() string
Type always returns ColumnTypeName to satisfy [pflag.Value] interface
func (*ColumnTypeName) Values ¶ added in v0.72.0
func (f *ColumnTypeName) Values() []ColumnTypeName
Values returns all possible values for ColumnTypeName.
There is no guarantee on the order of the values in the slice.
type ConnectionDependency ¶ added in v0.74.0
type ConnectionDependency struct {
// Full name of the dependent connection, in the form of
// __connection_name__.
ConnectionName string `json:"connection_name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A connection that is dependent on a SQL object.
func (ConnectionDependency) MarshalJSON ¶ added in v0.74.0
func (s ConnectionDependency) MarshalJSON() ([]byte, error)
func (*ConnectionDependency) UnmarshalJSON ¶ added in v0.74.0
func (s *ConnectionDependency) UnmarshalJSON(b []byte) error
type ConnectionInfo ¶ added in v0.10.0
type ConnectionInfo struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Unique identifier of the Connection.
ConnectionId string `json:"connection_id,omitempty"`
// The type of connection.
ConnectionType ConnectionType `json:"connection_type,omitempty"`
// Time at which this connection was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of connection creator.
CreatedBy string `json:"created_by,omitempty"`
// The type of credential.
CredentialType CredentialType `json:"credential_type,omitempty"`
// Full name of connection.
FullName string `json:"full_name,omitempty"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// Name of the connection.
Name string `json:"name,omitempty"`
// A map of key-value properties attached to the securable.
Options map[string]string `json:"options,omitempty"`
// Username of current owner of the connection.
Owner string `json:"owner,omitempty"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
ProvisioningInfo *ProvisioningInfo `json:"provisioning_info,omitempty"`
// If the connection is read only.
ReadOnly bool `json:"read_only,omitempty"`
SecurableType SecurableType `json:"securable_type,omitempty"`
// Time at which this connection was updated, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified connection.
UpdatedBy string `json:"updated_by,omitempty"`
// URL of the remote data source, extracted from options.
Url string `json:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Next ID: 23
func (ConnectionInfo) MarshalJSON ¶ added in v0.23.0
func (s ConnectionInfo) MarshalJSON() ([]byte, error)
func (*ConnectionInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *ConnectionInfo) UnmarshalJSON(b []byte) error
type ConnectionType ¶ added in v0.10.0
type ConnectionType string
Next Id: 52
const ConnectionTypeBigquery ConnectionType = `BIGQUERY`
const ConnectionTypeDatabricks ConnectionType = `DATABRICKS`
const ConnectionTypeGa4RawData ConnectionType = `GA4_RAW_DATA`
const ConnectionTypeGlue ConnectionType = `GLUE`
const ConnectionTypeHiveMetastore ConnectionType = `HIVE_METASTORE`
const ConnectionTypeHttp ConnectionType = `HTTP`
const ConnectionTypeMysql ConnectionType = `MYSQL`
const ConnectionTypeOracle ConnectionType = `ORACLE`
const ConnectionTypePostgresql ConnectionType = `POSTGRESQL`
const ConnectionTypePowerBi ConnectionType = `POWER_BI`
const ConnectionTypeRedshift ConnectionType = `REDSHIFT`
const ConnectionTypeSalesforce ConnectionType = `SALESFORCE`
const ConnectionTypeSalesforceDataCloud ConnectionType = `SALESFORCE_DATA_CLOUD`
const ConnectionTypeServicenow ConnectionType = `SERVICENOW`
const ConnectionTypeSnowflake ConnectionType = `SNOWFLAKE`
const ConnectionTypeSqldw ConnectionType = `SQLDW`
const ConnectionTypeSqlserver ConnectionType = `SQLSERVER`
const ConnectionTypeTeradata ConnectionType = `TERADATA`
const ConnectionTypeUnknownConnectionType ConnectionType = `UNKNOWN_CONNECTION_TYPE`
const ConnectionTypeWorkdayRaas ConnectionType = `WORKDAY_RAAS`
func (*ConnectionType) Set ¶ added in v0.10.0
func (f *ConnectionType) Set(v string) error
Set raw string value and validate it against allowed values
func (*ConnectionType) String ¶ added in v0.10.0
func (f *ConnectionType) String() string
String representation for fmt.Print
func (*ConnectionType) Type ¶ added in v0.10.0
func (f *ConnectionType) Type() string
Type always returns ConnectionType to satisfy [pflag.Value] interface
func (*ConnectionType) Values ¶ added in v0.72.0
func (f *ConnectionType) Values() []ConnectionType
Values returns all possible values for ConnectionType.
There is no guarantee on the order of the values in the slice.
type ConnectionsAPI ¶ added in v0.10.0
type ConnectionsAPI struct {
// contains filtered or unexported fields
}
Connections allow for creating a connection to an external data source.
A connection is an abstraction of an external data source that can be connected from Databricks Compute. Creating a connection object is the first step to managing external data sources within Unity Catalog, with the second step being creating a data object (catalog, schema, or table) using the connection. Data objects derived from a connection can be written to or read from similar to other Unity Catalog data objects based on cloud storage. Users may create different types of connections with each connection having a unique set of configuration options to support credential management and other settings.
func NewConnections ¶ added in v0.10.0
func NewConnections(client *client.DatabricksClient) *ConnectionsAPI
func (*ConnectionsAPI) ConnectionInfoNameToFullNameMap ¶ added in v0.10.0
func (a *ConnectionsAPI) ConnectionInfoNameToFullNameMap(ctx context.Context, request ListConnectionsRequest) (map[string]string, error)
ConnectionInfoNameToFullNameMap calls ConnectionsAPI.ListAll and creates a map of results with ConnectionInfo.Name as key and ConnectionInfo.FullName as value.
Returns an error if there's more than one ConnectionInfo with the same .Name.
Note: All ConnectionInfo instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*ConnectionsAPI) Create ¶ added in v0.10.0
func (a *ConnectionsAPI) Create(ctx context.Context, request CreateConnection) (*ConnectionInfo, error)
Example (Connections) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
connCreate, err := w.Connections.Create(ctx, catalog.CreateConnection{
Comment: "Go SDK Acceptance Test Connection",
ConnectionType: catalog.ConnectionTypeDatabricks,
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
Options: map[string]string{"host": fmt.Sprintf("%s-fake-workspace.cloud.databricks.com", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "httpPath": fmt.Sprintf("/sql/1.0/warehouses/%s", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "personalAccessToken": fmt.Sprintf("sdk-%x", time.Now().UnixNano())},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", connCreate)
// cleanup
err = w.Connections.Delete(ctx, catalog.DeleteConnectionRequest{
Name: connCreate.Name,
})
if err != nil {
panic(err)
}
func (*ConnectionsAPI) Delete ¶ added in v0.10.0
func (a *ConnectionsAPI) Delete(ctx context.Context, request DeleteConnectionRequest) error
func (*ConnectionsAPI) DeleteByName ¶ added in v0.32.0
func (a *ConnectionsAPI) DeleteByName(ctx context.Context, name string) error
Deletes the connection that matches the supplied name.
func (*ConnectionsAPI) Get ¶ added in v0.10.0
func (a *ConnectionsAPI) Get(ctx context.Context, request GetConnectionRequest) (*ConnectionInfo, error)
Example (Connections) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
connCreate, err := w.Connections.Create(ctx, catalog.CreateConnection{
Comment: "Go SDK Acceptance Test Connection",
ConnectionType: catalog.ConnectionTypeDatabricks,
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
Options: map[string]string{"host": fmt.Sprintf("%s-fake-workspace.cloud.databricks.com", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "httpPath": fmt.Sprintf("/sql/1.0/warehouses/%s", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "personalAccessToken": fmt.Sprintf("sdk-%x", time.Now().UnixNano())},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", connCreate)
connUpdate, err := w.Connections.Update(ctx, catalog.UpdateConnection{
Name: connCreate.Name,
Options: map[string]string{"host": fmt.Sprintf("%s-fake-workspace.cloud.databricks.com", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "httpPath": fmt.Sprintf("/sql/1.0/warehouses/%s", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "personalAccessToken": fmt.Sprintf("sdk-%x", time.Now().UnixNano())},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", connUpdate)
conn, err := w.Connections.Get(ctx, catalog.GetConnectionRequest{
Name: connUpdate.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", conn)
// cleanup
err = w.Connections.Delete(ctx, catalog.DeleteConnectionRequest{
Name: connCreate.Name,
})
if err != nil {
panic(err)
}
func (*ConnectionsAPI) GetByName ¶ added in v0.10.0
func (a *ConnectionsAPI) GetByName(ctx context.Context, name string) (*ConnectionInfo, error)
Gets a connection from it's name.
func (*ConnectionsAPI) List ¶ added in v0.24.0
func (a *ConnectionsAPI) List(ctx context.Context, request ListConnectionsRequest) listing.Iterator[ConnectionInfo]
List all connections.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (Connections) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
connList, err := w.Connections.ListAll(ctx, catalog.ListConnectionsRequest{})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", connList)
func (*ConnectionsAPI) ListAll ¶ added in v0.10.0
func (a *ConnectionsAPI) ListAll(ctx context.Context, request ListConnectionsRequest) ([]ConnectionInfo, error)
List all connections.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*ConnectionsAPI) Update ¶ added in v0.10.0
func (a *ConnectionsAPI) Update(ctx context.Context, request UpdateConnection) (*ConnectionInfo, error)
Example (Connections) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
connCreate, err := w.Connections.Create(ctx, catalog.CreateConnection{
Comment: "Go SDK Acceptance Test Connection",
ConnectionType: catalog.ConnectionTypeDatabricks,
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
Options: map[string]string{"host": fmt.Sprintf("%s-fake-workspace.cloud.databricks.com", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "httpPath": fmt.Sprintf("/sql/1.0/warehouses/%s", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "personalAccessToken": fmt.Sprintf("sdk-%x", time.Now().UnixNano())},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", connCreate)
connUpdate, err := w.Connections.Update(ctx, catalog.UpdateConnection{
Name: connCreate.Name,
Options: map[string]string{"host": fmt.Sprintf("%s-fake-workspace.cloud.databricks.com", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "httpPath": fmt.Sprintf("/sql/1.0/warehouses/%s", fmt.Sprintf("sdk-%x", time.Now().UnixNano())), "personalAccessToken": fmt.Sprintf("sdk-%x", time.Now().UnixNano())},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", connUpdate)
// cleanup
err = w.Connections.Delete(ctx, catalog.DeleteConnectionRequest{
Name: connCreate.Name,
})
if err != nil {
panic(err)
}
type ConnectionsInterface ¶ added in v0.29.0
type ConnectionsInterface interface {
// Creates a new connection
//
// Creates a new connection to an external data source. It allows users to
// specify connection details and configurations for interaction with the
// external server.
Create(ctx context.Context, request CreateConnection) (*ConnectionInfo, error)
// Deletes the connection that matches the supplied name.
Delete(ctx context.Context, request DeleteConnectionRequest) error
// Deletes the connection that matches the supplied name.
DeleteByName(ctx context.Context, name string) error
// Gets a connection from it's name.
Get(ctx context.Context, request GetConnectionRequest) (*ConnectionInfo, error)
// Gets a connection from it's name.
GetByName(ctx context.Context, name string) (*ConnectionInfo, error)
// List all connections.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListConnectionsRequest) listing.Iterator[ConnectionInfo]
// List all connections.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListConnectionsRequest) ([]ConnectionInfo, error)
// ConnectionInfoNameToFullNameMap calls [ConnectionsAPI.ListAll] and creates a map of results with [ConnectionInfo].Name as key and [ConnectionInfo].FullName as value.
//
// Returns an error if there's more than one [ConnectionInfo] with the same .Name.
//
// Note: All [ConnectionInfo] instances are loaded into memory before creating a map.
//
// This method is generated by Databricks SDK Code Generator.
ConnectionInfoNameToFullNameMap(ctx context.Context, request ListConnectionsRequest) (map[string]string, error)
// Updates the connection that matches the supplied name.
Update(ctx context.Context, request UpdateConnection) (*ConnectionInfo, error)
}
type ConnectionsService
deprecated
added in
v0.10.0
type ConnectionsService interface {
// Creates a new connection
//
// Creates a new connection to an external data source. It allows users to
// specify connection details and configurations for interaction with the
// external server.
Create(ctx context.Context, request CreateConnection) (*ConnectionInfo, error)
// Deletes the connection that matches the supplied name.
Delete(ctx context.Context, request DeleteConnectionRequest) error
// Gets a connection from it's name.
Get(ctx context.Context, request GetConnectionRequest) (*ConnectionInfo, error)
// List all connections.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListConnectionsRequest) (*ListConnectionsResponse, error)
// Updates the connection that matches the supplied name.
Update(ctx context.Context, request UpdateConnection) (*ConnectionInfo, error)
}
Connections allow for creating a connection to an external data source.
A connection is an abstraction of an external data source that can be connected from Databricks Compute. Creating a connection object is the first step to managing external data sources within Unity Catalog, with the second step being creating a data object (catalog, schema, or table) using the connection. Data objects derived from a connection can be written to or read from similar to other Unity Catalog data objects based on cloud storage. Users may create different types of connections with each connection having a unique set of configuration options to support credential management and other settings.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type ContinuousUpdateStatus ¶ added in v0.33.0
type ContinuousUpdateStatus struct {
// Progress of the initial data synchronization.
InitialPipelineSyncProgress *PipelineProgress `json:"initial_pipeline_sync_progress,omitempty"`
// The last source table Delta version that was synced to the online table.
// Note that this Delta version may not be completely synced to the online
// 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 online table.
Timestamp string `json:"timestamp,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Detailed status of an online table. Shown if the online table is in the ONLINE_CONTINUOUS_UPDATE or the ONLINE_UPDATING_PIPELINE_RESOURCES state.
func (ContinuousUpdateStatus) MarshalJSON ¶ added in v0.33.0
func (s ContinuousUpdateStatus) MarshalJSON() ([]byte, error)
func (*ContinuousUpdateStatus) UnmarshalJSON ¶ added in v0.33.0
func (s *ContinuousUpdateStatus) UnmarshalJSON(b []byte) error
type CreateAccessRequest ¶ added in v0.81.0
type CreateAccessRequest struct {
// Optional. The principal this request is for. Empty `behalf_of` defaults
// to the requester's identity.
//
// Principals must be unique across the API call.
BehalfOf *Principal `json:"behalf_of,omitempty"`
// Optional. Comment associated with the request.
//
// At most 200 characters, can only contain lowercase/uppercase letters
// (a-z, A-Z), numbers (0-9), punctuation, and spaces.
Comment string `json:"comment,omitempty"`
// List of securables and their corresponding requested UC privileges.
//
// At most 30 securables can be requested for a principal per batched call.
// Each securable can only be requested once per principal.
SecurablePermissions []SecurablePermissions `json:"securable_permissions,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateAccessRequest) MarshalJSON ¶ added in v0.81.0
func (s CreateAccessRequest) MarshalJSON() ([]byte, error)
func (*CreateAccessRequest) UnmarshalJSON ¶ added in v0.81.0
func (s *CreateAccessRequest) UnmarshalJSON(b []byte) error
type CreateAccessRequestResponse ¶ added in v0.81.0
type CreateAccessRequestResponse struct {
// The principal the request was made on behalf of.
BehalfOf *Principal `json:"behalf_of,omitempty"`
// The access request destinations for all the securables the principal
// requested.
RequestDestinations []AccessRequestDestinations `json:"request_destinations,omitempty"`
}
type CreateAccountsMetastore ¶ added in v0.86.0
type CreateAccountsMetastore struct {
// Whether to allow non-DBR clients to directly access entities under the
// metastore.
ExternalAccessEnabled bool `json:"external_access_enabled,omitempty"`
// The user-specified name of the metastore.
Name string `json:"name"`
// Cloud region which the metastore serves (e.g., `us-west-2`, `westus`).
Region string `json:"region,omitempty"`
// The storage root URL for metastore
StorageRoot string `json:"storage_root,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateAccountsMetastore) MarshalJSON ¶ added in v0.86.0
func (s CreateAccountsMetastore) MarshalJSON() ([]byte, error)
func (*CreateAccountsMetastore) UnmarshalJSON ¶ added in v0.86.0
func (s *CreateAccountsMetastore) UnmarshalJSON(b []byte) error
type CreateAccountsStorageCredential ¶ added in v0.86.0
type CreateAccountsStorageCredential struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRoleRequest `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentityRequest `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// The Cloudflare API token configuration.
CloudflareApiToken *CloudflareApiToken `json:"cloudflare_api_token,omitempty"`
// Comment associated with the credential.
Comment string `json:"comment,omitempty"`
// The Databricks managed GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccountRequest `json:"databricks_gcp_service_account,omitempty"`
// The credential name. The name must be unique among storage and service
// credentials within the metastore.
Name string `json:"name"`
// Whether the credential is usable only for read operations. Only
// applicable when purpose is **STORAGE**.
ReadOnly bool `json:"read_only,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateAccountsStorageCredential) MarshalJSON ¶ added in v0.86.0
func (s CreateAccountsStorageCredential) MarshalJSON() ([]byte, error)
func (*CreateAccountsStorageCredential) UnmarshalJSON ¶ added in v0.86.0
func (s *CreateAccountsStorageCredential) UnmarshalJSON(b []byte) error
type CreateCatalog ¶
type CreateCatalog struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// The name of the connection to an external data source.
ConnectionName string `json:"connection_name,omitempty"`
// Name of catalog.
Name string `json:"name"`
// A map of key-value properties attached to the securable.
Options map[string]string `json:"options,omitempty"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
// The name of delta sharing provider.
//
// A Delta Sharing catalog is a catalog that is based on a Delta share on a
// remote sharing server.
ProviderName string `json:"provider_name,omitempty"`
ShareName string `json:"share_name,omitempty"`
// Storage root URL for managed tables within catalog.
StorageRoot string `json:"storage_root,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateCatalog) MarshalJSON ¶ added in v0.23.0
func (s CreateCatalog) MarshalJSON() ([]byte, error)
func (*CreateCatalog) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateCatalog) UnmarshalJSON(b []byte) error
type CreateConnection ¶ added in v0.10.0
type CreateConnection struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// The type of connection.
ConnectionType ConnectionType `json:"connection_type"`
// Name of the connection.
Name string `json:"name"`
// A map of key-value properties attached to the securable.
Options map[string]string `json:"options"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
// If the connection is read only.
ReadOnly bool `json:"read_only,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateConnection) MarshalJSON ¶ added in v0.23.0
func (s CreateConnection) MarshalJSON() ([]byte, error)
func (*CreateConnection) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateConnection) UnmarshalJSON(b []byte) error
type CreateCredentialRequest ¶ added in v0.51.0
type CreateCredentialRequest struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentity `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// Comment associated with the credential.
Comment string `json:"comment,omitempty"`
// The Databricks managed GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccount `json:"databricks_gcp_service_account,omitempty"`
// The credential name. The name must be unique among storage and service
// credentials within the metastore.
Name string `json:"name"`
// Indicates the purpose of the credential.
Purpose CredentialPurpose `json:"purpose,omitempty"`
// Whether the credential is usable only for read operations. Only
// applicable when purpose is **STORAGE**.
ReadOnly bool `json:"read_only,omitempty"`
// Optional. Supplying true to this argument skips validation of the created
// set of credentials.
SkipValidation bool `json:"skip_validation,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateCredentialRequest) MarshalJSON ¶ added in v0.51.0
func (s CreateCredentialRequest) MarshalJSON() ([]byte, error)
func (*CreateCredentialRequest) UnmarshalJSON ¶ added in v0.51.0
func (s *CreateCredentialRequest) UnmarshalJSON(b []byte) error
type CreateEntityTagAssignmentRequest ¶ added in v0.81.0
type CreateEntityTagAssignmentRequest struct {
TagAssignment EntityTagAssignment `json:"tag_assignment"`
}
type CreateExternalLineageRelationshipRequest ¶ added in v0.74.0
type CreateExternalLineageRelationshipRequest struct {
ExternalLineageRelationship CreateRequestExternalLineage `json:"external_lineage_relationship"`
}
type CreateExternalLocation ¶
type CreateExternalLocation struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Name of the storage credential used with this location.
CredentialName string `json:"credential_name"`
// Whether to enable file events on this external location.
EnableFileEvents bool `json:"enable_file_events,omitempty"`
EncryptionDetails *EncryptionDetails `json:"encryption_details,omitempty"`
// Indicates whether fallback mode is enabled for this external location.
// When fallback mode is enabled, the access to the location falls back to
// cluster credentials if UC credentials are not sufficient.
Fallback bool `json:"fallback,omitempty"`
// File event queue settings. If `enable_file_events` is `true`, must be
// defined and have exactly one of the documented properties.
FileEventQueue *FileEventQueue `json:"file_event_queue,omitempty"`
// Name of the external location.
Name string `json:"name"`
// Indicates whether the external location is read-only.
ReadOnly bool `json:"read_only,omitempty"`
// Skips validation of the storage credential associated with the external
// location.
SkipValidation bool `json:"skip_validation,omitempty"`
// Path URL of the external location.
Url string `json:"url"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateExternalLocation) MarshalJSON ¶ added in v0.23.0
func (s CreateExternalLocation) MarshalJSON() ([]byte, error)
func (*CreateExternalLocation) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateExternalLocation) UnmarshalJSON(b []byte) error
type CreateExternalMetadataRequest ¶ added in v0.74.0
type CreateExternalMetadataRequest struct {
ExternalMetadata ExternalMetadata `json:"external_metadata"`
}
type CreateFunction ¶
type CreateFunction struct {
// Name of parent Catalog.
CatalogName string `json:"catalog_name"`
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Scalar function return data type.
DataType ColumnTypeName `json:"data_type"`
// External function language.
ExternalLanguage string `json:"external_language,omitempty"`
// External function name.
ExternalName string `json:"external_name,omitempty"`
// Pretty printed function data type.
FullDataType string `json:"full_data_type"`
// Function input parameters.
InputParams FunctionParameterInfos `json:"input_params"`
// Whether the function is deterministic.
IsDeterministic bool `json:"is_deterministic"`
// Function null call.
IsNullCall bool `json:"is_null_call"`
// Name of function, relative to parent schema.
Name string `json:"name"`
// Function parameter style. **S** is the value for SQL.
ParameterStyle CreateFunctionParameterStyle `json:"parameter_style"`
// JSON-serialized key-value pair map, encoded (escaped) as a string.
Properties string `json:"properties,omitempty"`
// Table function return parameters.
ReturnParams *FunctionParameterInfos `json:"return_params,omitempty"`
// Function language. When **EXTERNAL** is used, the language of the routine
// function should be specified in the **external_language** field, and the
// **return_params** of the function cannot be used (as **TABLE** return
// type is not supported), and the **sql_data_access** field must be
// **NO_SQL**.
RoutineBody CreateFunctionRoutineBody `json:"routine_body"`
// Function body.
RoutineDefinition string `json:"routine_definition"`
// function dependencies.
RoutineDependencies *DependencyList `json:"routine_dependencies,omitempty"`
// Name of parent Schema relative to its parent Catalog.
SchemaName string `json:"schema_name"`
// Function security type.
SecurityType CreateFunctionSecurityType `json:"security_type"`
// Specific name of the function; Reserved for future use.
SpecificName string `json:"specific_name"`
// Function SQL data access.
SqlDataAccess CreateFunctionSqlDataAccess `json:"sql_data_access"`
// List of schemes whose objects can be referenced without qualification.
SqlPath string `json:"sql_path,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateFunction) MarshalJSON ¶ added in v0.23.0
func (s CreateFunction) MarshalJSON() ([]byte, error)
func (*CreateFunction) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateFunction) UnmarshalJSON(b []byte) error
type CreateFunctionParameterStyle ¶
type CreateFunctionParameterStyle string
const CreateFunctionParameterStyleS CreateFunctionParameterStyle = `S`
func (*CreateFunctionParameterStyle) Set ¶
func (f *CreateFunctionParameterStyle) Set(v string) error
Set raw string value and validate it against allowed values
func (*CreateFunctionParameterStyle) String ¶
func (f *CreateFunctionParameterStyle) String() string
String representation for fmt.Print
func (*CreateFunctionParameterStyle) Type ¶
func (f *CreateFunctionParameterStyle) Type() string
Type always returns CreateFunctionParameterStyle to satisfy [pflag.Value] interface
func (*CreateFunctionParameterStyle) Values ¶ added in v0.72.0
func (f *CreateFunctionParameterStyle) Values() []CreateFunctionParameterStyle
Values returns all possible values for CreateFunctionParameterStyle.
There is no guarantee on the order of the values in the slice.
type CreateFunctionRequest ¶ added in v0.25.0
type CreateFunctionRequest struct {
// Partial __FunctionInfo__ specifying the function to be created.
FunctionInfo CreateFunction `json:"function_info"`
}
type CreateFunctionRoutineBody ¶
type CreateFunctionRoutineBody string
const CreateFunctionRoutineBodyExternal CreateFunctionRoutineBody = `EXTERNAL`
const CreateFunctionRoutineBodySql CreateFunctionRoutineBody = `SQL`
func (*CreateFunctionRoutineBody) Set ¶
func (f *CreateFunctionRoutineBody) Set(v string) error
Set raw string value and validate it against allowed values
func (*CreateFunctionRoutineBody) String ¶
func (f *CreateFunctionRoutineBody) String() string
String representation for fmt.Print
func (*CreateFunctionRoutineBody) Type ¶
func (f *CreateFunctionRoutineBody) Type() string
Type always returns CreateFunctionRoutineBody to satisfy [pflag.Value] interface
func (*CreateFunctionRoutineBody) Values ¶ added in v0.72.0
func (f *CreateFunctionRoutineBody) Values() []CreateFunctionRoutineBody
Values returns all possible values for CreateFunctionRoutineBody.
There is no guarantee on the order of the values in the slice.
type CreateFunctionSecurityType ¶
type CreateFunctionSecurityType string
const CreateFunctionSecurityTypeDefiner CreateFunctionSecurityType = `DEFINER`
func (*CreateFunctionSecurityType) Set ¶
func (f *CreateFunctionSecurityType) Set(v string) error
Set raw string value and validate it against allowed values
func (*CreateFunctionSecurityType) String ¶
func (f *CreateFunctionSecurityType) String() string
String representation for fmt.Print
func (*CreateFunctionSecurityType) Type ¶
func (f *CreateFunctionSecurityType) Type() string
Type always returns CreateFunctionSecurityType to satisfy [pflag.Value] interface
func (*CreateFunctionSecurityType) Values ¶ added in v0.72.0
func (f *CreateFunctionSecurityType) Values() []CreateFunctionSecurityType
Values returns all possible values for CreateFunctionSecurityType.
There is no guarantee on the order of the values in the slice.
type CreateFunctionSqlDataAccess ¶
type CreateFunctionSqlDataAccess string
const CreateFunctionSqlDataAccessContainsSql CreateFunctionSqlDataAccess = `CONTAINS_SQL`
const CreateFunctionSqlDataAccessNoSql CreateFunctionSqlDataAccess = `NO_SQL`
const CreateFunctionSqlDataAccessReadsSqlData CreateFunctionSqlDataAccess = `READS_SQL_DATA`
func (*CreateFunctionSqlDataAccess) Set ¶
func (f *CreateFunctionSqlDataAccess) Set(v string) error
Set raw string value and validate it against allowed values
func (*CreateFunctionSqlDataAccess) String ¶
func (f *CreateFunctionSqlDataAccess) String() string
String representation for fmt.Print
func (*CreateFunctionSqlDataAccess) Type ¶
func (f *CreateFunctionSqlDataAccess) Type() string
Type always returns CreateFunctionSqlDataAccess to satisfy [pflag.Value] interface
func (*CreateFunctionSqlDataAccess) Values ¶ added in v0.72.0
func (f *CreateFunctionSqlDataAccess) Values() []CreateFunctionSqlDataAccess
Values returns all possible values for CreateFunctionSqlDataAccess.
There is no guarantee on the order of the values in the slice.
type CreateMetastore ¶
type CreateMetastore struct {
// Whether to allow non-DBR clients to directly access entities under the
// metastore.
ExternalAccessEnabled bool `json:"external_access_enabled,omitempty"`
// The user-specified name of the metastore.
Name string `json:"name"`
// Cloud region which the metastore serves (e.g., `us-west-2`, `westus`).
Region string `json:"region,omitempty"`
// The storage root URL for metastore
StorageRoot string `json:"storage_root,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateMetastore) MarshalJSON ¶ added in v0.23.0
func (s CreateMetastore) MarshalJSON() ([]byte, error)
func (*CreateMetastore) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateMetastore) UnmarshalJSON(b []byte) error
type CreateMetastoreAssignment ¶
type CreateMetastoreAssignment struct {
// The name of the default catalog in the metastore. This field is
// deprecated. Please use "Default Namespace API" to configure the default
// catalog for a Databricks workspace.
DefaultCatalogName string `json:"default_catalog_name"`
// The unique ID of the metastore.
MetastoreId string `json:"metastore_id"`
// A workspace ID.
WorkspaceId int64 `json:"-" url:"-"`
}
type CreateMonitor ¶ added in v0.30.0
type CreateMonitor struct {
// [Create:REQ Update:IGN] Field for specifying the absolute path to a
// custom directory to store data-monitoring assets. Normally prepopulated
// to a default user location via UI and Python APIs.
AssetsDir string `json:"assets_dir"`
// [Create:OPT Update:OPT] Baseline table name. Baseline data is used to
// compute drift from the data in the monitored `table_name`. The baseline
// table and the monitored table shall have the same schema.
BaselineTableName string `json:"baseline_table_name,omitempty"`
// [Create:OPT Update:OPT] Custom metrics.
CustomMetrics []MonitorMetric `json:"custom_metrics,omitempty"`
// [Create:OPT Update:OPT] Data classification related config.
DataClassificationConfig *MonitorDataClassificationConfig `json:"data_classification_config,omitempty"`
InferenceLog *MonitorInferenceLog `json:"inference_log,omitempty"`
// [Create:ERR Update:IGN] The latest error message for a monitor failure.
LatestMonitorFailureMsg string `json:"latest_monitor_failure_msg,omitempty"`
// [Create:OPT Update:OPT] Field for specifying notification settings.
Notifications *MonitorNotifications `json:"notifications,omitempty"`
// [Create:REQ Update:REQ] Schema where output tables are created. Needs to
// be in 2-level format {catalog}.{schema}
OutputSchemaName string `json:"output_schema_name"`
// [Create:OPT Update:OPT] The monitor schedule.
Schedule *MonitorCronSchedule `json:"schedule,omitempty"`
// Whether to skip creating a default dashboard summarizing data quality
// metrics.
SkipBuiltinDashboard bool `json:"skip_builtin_dashboard,omitempty"`
// [Create:OPT Update:OPT] List of column expressions to slice data with for
// targeted analysis. The data is grouped by each expression independently,
// resulting in a separate slice for each predicate and its complements. For
// example `slicing_exprs=[“col_1”, “col_2 > 10”]` will generate the
// following slices: two slices for `col_2 > 10` (True and False), and one
// slice per unique value in `col1`. For high-cardinality columns, only the
// top 100 unique values by frequency will generate slices.
SlicingExprs []string `json:"slicing_exprs,omitempty"`
// Configuration for monitoring snapshot tables.
Snapshot *MonitorSnapshot `json:"snapshot,omitempty"`
// UC table name in format `catalog.schema.table_name`. This field
// corresponds to the {full_table_name_arg} arg in the endpoint path.
TableName string `json:"-" url:"-"`
// Configuration for monitoring time series tables.
TimeSeries *MonitorTimeSeries `json:"time_series,omitempty"`
// Optional argument to specify the warehouse for dashboard creation. If not
// specified, the first running warehouse will be used.
WarehouseId string `json:"warehouse_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateMonitor) MarshalJSON ¶ added in v0.30.0
func (s CreateMonitor) MarshalJSON() ([]byte, error)
func (*CreateMonitor) UnmarshalJSON ¶ added in v0.30.0
func (s *CreateMonitor) UnmarshalJSON(b []byte) error
type CreateOnlineTableRequest ¶ added in v0.35.0
type CreateOnlineTableRequest struct {
// Specification of the online table to be created.
Table OnlineTable `json:"table"`
}
type CreatePolicyRequest ¶ added in v0.80.0
type CreatePolicyRequest struct {
// Required. The policy to create.
PolicyInfo PolicyInfo `json:"policy_info"`
}
type CreateRegisteredModelRequest ¶ added in v0.18.0
type CreateRegisteredModelRequest struct {
// List of aliases associated with the registered model
Aliases []RegisteredModelAlias `json:"aliases,omitempty"`
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
// The name of the catalog where the schema and the registered model reside
CatalogName string `json:"catalog_name,omitempty"`
// The comment attached to the registered model
Comment string `json:"comment,omitempty"`
// Creation timestamp of the registered model in milliseconds since the Unix
// epoch
CreatedAt int64 `json:"created_at,omitempty"`
// The identifier of the user who created the registered model
CreatedBy string `json:"created_by,omitempty"`
// The three-level (fully qualified) name of the registered model
FullName string `json:"full_name,omitempty"`
// The unique identifier of the metastore
MetastoreId string `json:"metastore_id,omitempty"`
// The name of the registered model
Name string `json:"name,omitempty"`
// The identifier of the user who owns the registered model
Owner string `json:"owner,omitempty"`
// The name of the schema where the registered model resides
SchemaName string `json:"schema_name,omitempty"`
// The storage location on the cloud under which model version data files
// are stored
StorageLocation string `json:"storage_location,omitempty"`
// Last-update timestamp of the registered model in milliseconds since the
// Unix epoch
UpdatedAt int64 `json:"updated_at,omitempty"`
// The identifier of the user who updated the registered model last time
UpdatedBy string `json:"updated_by,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateRegisteredModelRequest) MarshalJSON ¶ added in v0.23.0
func (s CreateRegisteredModelRequest) MarshalJSON() ([]byte, error)
func (*CreateRegisteredModelRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateRegisteredModelRequest) UnmarshalJSON(b []byte) error
type CreateRequestExternalLineage ¶ added in v0.74.0
type CreateRequestExternalLineage struct {
// List of column relationships between source and target objects.
Columns []ColumnRelationship `json:"columns,omitempty"`
// Unique identifier of the external lineage relationship.
Id string `json:"id,omitempty"`
// Key-value properties associated with the external lineage relationship.
Properties map[string]string `json:"properties,omitempty"`
// Source object of the external lineage relationship.
Source ExternalLineageObject `json:"source"`
// Target object of the external lineage relationship.
Target ExternalLineageObject `json:"target"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateRequestExternalLineage) MarshalJSON ¶ added in v0.74.0
func (s CreateRequestExternalLineage) MarshalJSON() ([]byte, error)
func (*CreateRequestExternalLineage) UnmarshalJSON ¶ added in v0.74.0
func (s *CreateRequestExternalLineage) UnmarshalJSON(b []byte) error
type CreateSchema ¶
type CreateSchema struct {
// Name of parent catalog.
CatalogName string `json:"catalog_name"`
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Name of schema, relative to parent catalog.
Name string `json:"name"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
// Storage root URL for managed tables within schema.
StorageRoot string `json:"storage_root,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateSchema) MarshalJSON ¶ added in v0.23.0
func (s CreateSchema) MarshalJSON() ([]byte, error)
func (*CreateSchema) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateSchema) UnmarshalJSON(b []byte) error
type CreateStorageCredential ¶
type CreateStorageCredential struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRoleRequest `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentityRequest `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// The Cloudflare API token configuration.
CloudflareApiToken *CloudflareApiToken `json:"cloudflare_api_token,omitempty"`
// Comment associated with the credential.
Comment string `json:"comment,omitempty"`
// The Databricks managed GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccountRequest `json:"databricks_gcp_service_account,omitempty"`
// The credential name. The name must be unique among storage and service
// credentials within the metastore.
Name string `json:"name"`
// Whether the credential is usable only for read operations. Only
// applicable when purpose is **STORAGE**.
ReadOnly bool `json:"read_only,omitempty"`
// Supplying true to this argument skips validation of the created
// credential.
SkipValidation bool `json:"skip_validation,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateStorageCredential) MarshalJSON ¶ added in v0.23.0
func (s CreateStorageCredential) MarshalJSON() ([]byte, error)
func (*CreateStorageCredential) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateStorageCredential) UnmarshalJSON(b []byte) error
type CreateTableConstraint ¶
type CreateTableConstraint struct {
Constraint TableConstraint `json:"constraint"`
// The full name of the table referenced by the constraint.
FullNameArg string `json:"full_name_arg"`
}
type CreateTableRequest ¶ added in v0.80.0
type CreateTableRequest struct {
// Name of parent catalog.
CatalogName string `json:"catalog_name"`
// The array of __ColumnInfo__ definitions of the table's columns.
Columns []ColumnInfo `json:"columns,omitempty"`
DataSourceFormat DataSourceFormat `json:"data_source_format"`
// Name of table, relative to parent schema.
Name string `json:"name"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
// Name of parent schema relative to its parent catalog.
SchemaName string `json:"schema_name"`
// Storage root URL for table (for **MANAGED**, **EXTERNAL** tables).
StorageLocation string `json:"storage_location"`
TableType TableType `json:"table_type"`
}
type CreateVolumeRequestContent ¶
type CreateVolumeRequestContent struct {
// The name of the catalog where the schema and the volume are
CatalogName string `json:"catalog_name"`
// The comment attached to the volume
Comment string `json:"comment,omitempty"`
// The name of the volume
Name string `json:"name"`
// The name of the schema where the volume is
SchemaName string `json:"schema_name"`
// The storage location on the cloud
StorageLocation string `json:"storage_location,omitempty"`
// The type of the volume. An external volume is located in the specified
// external location. A managed volume is located in the default location
// which is specified by the parent schema, or the parent catalog, or the
// Metastore. [Learn more]
//
// [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external
VolumeType VolumeType `json:"volume_type"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateVolumeRequestContent) MarshalJSON ¶ added in v0.23.0
func (s CreateVolumeRequestContent) MarshalJSON() ([]byte, error)
func (*CreateVolumeRequestContent) UnmarshalJSON ¶ added in v0.23.0
func (s *CreateVolumeRequestContent) UnmarshalJSON(b []byte) error
type CredentialDependency ¶ added in v0.74.0
type CredentialDependency struct {
// Full name of the dependent credential, in the form of
// __credential_name__.
CredentialName string `json:"credential_name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A credential that is dependent on a SQL object.
func (CredentialDependency) MarshalJSON ¶ added in v0.74.0
func (s CredentialDependency) MarshalJSON() ([]byte, error)
func (*CredentialDependency) UnmarshalJSON ¶ added in v0.74.0
func (s *CredentialDependency) UnmarshalJSON(b []byte) error
type CredentialInfo ¶ added in v0.51.0
type CredentialInfo struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentity `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// Comment associated with the credential.
Comment string `json:"comment,omitempty"`
// Time at which this credential was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of credential creator.
CreatedBy string `json:"created_by,omitempty"`
// The Databricks managed GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccount `json:"databricks_gcp_service_account,omitempty"`
// The full name of the credential.
FullName string `json:"full_name,omitempty"`
// The unique identifier of the credential.
Id string `json:"id,omitempty"`
// Whether the current securable is accessible from all workspaces or a
// specific set of workspaces.
IsolationMode IsolationMode `json:"isolation_mode,omitempty"`
// Unique identifier of the parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// The credential name. The name must be unique among storage and service
// credentials within the metastore.
Name string `json:"name,omitempty"`
// Username of current owner of credential.
Owner string `json:"owner,omitempty"`
// Indicates the purpose of the credential.
Purpose CredentialPurpose `json:"purpose,omitempty"`
// Whether the credential is usable only for read operations. Only
// applicable when purpose is **STORAGE**.
ReadOnly bool `json:"read_only,omitempty"`
// Time at which this credential was last modified, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified the credential.
UpdatedBy string `json:"updated_by,omitempty"`
// Whether this credential is the current metastore's root storage
// credential. Only applicable when purpose is **STORAGE**.
UsedForManagedStorage bool `json:"used_for_managed_storage,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CredentialInfo) MarshalJSON ¶ added in v0.51.0
func (s CredentialInfo) MarshalJSON() ([]byte, error)
func (*CredentialInfo) UnmarshalJSON ¶ added in v0.51.0
func (s *CredentialInfo) UnmarshalJSON(b []byte) error
type CredentialPurpose ¶ added in v0.51.0
type CredentialPurpose string
const CredentialPurposeService CredentialPurpose = `SERVICE`
const CredentialPurposeStorage CredentialPurpose = `STORAGE`
func (*CredentialPurpose) Set ¶ added in v0.51.0
func (f *CredentialPurpose) Set(v string) error
Set raw string value and validate it against allowed values
func (*CredentialPurpose) String ¶ added in v0.51.0
func (f *CredentialPurpose) String() string
String representation for fmt.Print
func (*CredentialPurpose) Type ¶ added in v0.51.0
func (f *CredentialPurpose) Type() string
Type always returns CredentialPurpose to satisfy [pflag.Value] interface
func (*CredentialPurpose) Values ¶ added in v0.72.0
func (f *CredentialPurpose) Values() []CredentialPurpose
Values returns all possible values for CredentialPurpose.
There is no guarantee on the order of the values in the slice.
type CredentialType ¶ added in v0.10.0
type CredentialType string
Next Id: 14
const CredentialTypeAnyStaticCredential CredentialType = `ANY_STATIC_CREDENTIAL`
const CredentialTypeBearerToken CredentialType = `BEARER_TOKEN`
const CredentialTypeOauthAccessToken CredentialType = `OAUTH_ACCESS_TOKEN`
const CredentialTypeOauthM2m CredentialType = `OAUTH_M2M`
const CredentialTypeOauthMtls CredentialType = `OAUTH_MTLS`
const CredentialTypeOauthRefreshToken CredentialType = `OAUTH_REFRESH_TOKEN`
const CredentialTypeOauthResourceOwnerPassword CredentialType = `OAUTH_RESOURCE_OWNER_PASSWORD`
const CredentialTypeOauthU2m CredentialType = `OAUTH_U2M`
const CredentialTypeOauthU2mMapping CredentialType = `OAUTH_U2M_MAPPING`
const CredentialTypeOidcToken CredentialType = `OIDC_TOKEN`
const CredentialTypePemPrivateKey CredentialType = `PEM_PRIVATE_KEY`
const CredentialTypeServiceCredential CredentialType = `SERVICE_CREDENTIAL`
const CredentialTypeUnknownCredentialType CredentialType = `UNKNOWN_CREDENTIAL_TYPE`
const CredentialTypeUsernamePassword CredentialType = `USERNAME_PASSWORD`
func (*CredentialType) Set ¶ added in v0.10.0
func (f *CredentialType) Set(v string) error
Set raw string value and validate it against allowed values
func (*CredentialType) String ¶ added in v0.10.0
func (f *CredentialType) String() string
String representation for fmt.Print
func (*CredentialType) Type ¶ added in v0.10.0
func (f *CredentialType) Type() string
Type always returns CredentialType to satisfy [pflag.Value] interface
func (*CredentialType) Values ¶ added in v0.72.0
func (f *CredentialType) Values() []CredentialType
Values returns all possible values for CredentialType.
There is no guarantee on the order of the values in the slice.
type CredentialValidationResult ¶ added in v0.51.0
type CredentialValidationResult struct {
// Error message would exist when the result does not equal to **PASS**.
Message string `json:"message,omitempty"`
// The results of the tested operation.
Result ValidateCredentialResult `json:"result,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CredentialValidationResult) MarshalJSON ¶ added in v0.51.0
func (s CredentialValidationResult) MarshalJSON() ([]byte, error)
func (*CredentialValidationResult) UnmarshalJSON ¶ added in v0.51.0
func (s *CredentialValidationResult) UnmarshalJSON(b []byte) error
type CredentialsAPI ¶ added in v0.51.0
type CredentialsAPI struct {
// contains filtered or unexported fields
}
A credential represents an authentication and authorization mechanism for accessing services on your cloud tenant. Each credential is subject to Unity Catalog access-control policies that control which users and groups can access the credential.
To create credentials, you must be a Databricks account admin or have the `CREATE SERVICE CREDENTIAL` privilege. The user who creates the credential can delegate ownership to another user or group to manage permissions on it.
func NewCredentials ¶ added in v0.51.0
func NewCredentials(client *client.DatabricksClient) *CredentialsAPI
func (*CredentialsAPI) CreateCredential ¶ added in v0.51.0
func (a *CredentialsAPI) CreateCredential(ctx context.Context, request CreateCredentialRequest) (*CredentialInfo, error)
func (*CredentialsAPI) DeleteCredential ¶ added in v0.51.0
func (a *CredentialsAPI) DeleteCredential(ctx context.Context, request DeleteCredentialRequest) error
func (*CredentialsAPI) DeleteCredentialByNameArg ¶ added in v0.51.0
func (a *CredentialsAPI) DeleteCredentialByNameArg(ctx context.Context, nameArg string) error
Deletes a service or storage credential from the metastore. The caller must be an owner of the credential.
func (*CredentialsAPI) GenerateTemporaryServiceCredential ¶ added in v0.51.0
func (a *CredentialsAPI) GenerateTemporaryServiceCredential(ctx context.Context, request GenerateTemporaryServiceCredentialRequest) (*TemporaryCredentials, error)
func (*CredentialsAPI) GetCredential ¶ added in v0.51.0
func (a *CredentialsAPI) GetCredential(ctx context.Context, request GetCredentialRequest) (*CredentialInfo, error)
func (*CredentialsAPI) GetCredentialByNameArg ¶ added in v0.51.0
func (a *CredentialsAPI) GetCredentialByNameArg(ctx context.Context, nameArg string) (*CredentialInfo, error)
Gets a service or storage credential from the metastore. The caller must be a metastore admin, the owner of the credential, or have any permission on the credential.
func (*CredentialsAPI) ListCredentials ¶ added in v0.51.0
func (a *CredentialsAPI) ListCredentials(ctx context.Context, request ListCredentialsRequest) listing.Iterator[CredentialInfo]
Gets an array of credentials (as __CredentialInfo__ objects).
The array is limited to only the credentials that the caller has permission to access. If the caller is a metastore admin, retrieval of credentials is unrestricted. There is no guarantee of a specific ordering of the elements in the array.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*CredentialsAPI) ListCredentialsAll ¶ added in v0.51.0
func (a *CredentialsAPI) ListCredentialsAll(ctx context.Context, request ListCredentialsRequest) ([]CredentialInfo, error)
Gets an array of credentials (as __CredentialInfo__ objects).
The array is limited to only the credentials that the caller has permission to access. If the caller is a metastore admin, retrieval of credentials is unrestricted. There is no guarantee of a specific ordering of the elements in the array.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*CredentialsAPI) UpdateCredential ¶ added in v0.51.0
func (a *CredentialsAPI) UpdateCredential(ctx context.Context, request UpdateCredentialRequest) (*CredentialInfo, error)
func (*CredentialsAPI) ValidateCredential ¶ added in v0.51.0
func (a *CredentialsAPI) ValidateCredential(ctx context.Context, request ValidateCredentialRequest) (*ValidateCredentialResponse, error)
type CredentialsInterface ¶ added in v0.51.0
type CredentialsInterface interface {
// Creates a new credential. The type of credential to be created is determined
// by the **purpose** field, which should be either **SERVICE** or **STORAGE**.
//
// The caller must be a metastore admin or have the metastore privilege
// **CREATE_STORAGE_CREDENTIAL** for storage credentials, or
// **CREATE_SERVICE_CREDENTIAL** for service credentials.
CreateCredential(ctx context.Context, request CreateCredentialRequest) (*CredentialInfo, error)
// Deletes a service or storage credential from the metastore. The caller must
// be an owner of the credential.
DeleteCredential(ctx context.Context, request DeleteCredentialRequest) error
// Deletes a service or storage credential from the metastore. The caller must
// be an owner of the credential.
DeleteCredentialByNameArg(ctx context.Context, nameArg string) error
// Returns a set of temporary credentials generated using the specified service
// credential. The caller must be a metastore admin or have the metastore
// privilege **ACCESS** on the service credential.
GenerateTemporaryServiceCredential(ctx context.Context, request GenerateTemporaryServiceCredentialRequest) (*TemporaryCredentials, error)
// Gets a service or storage credential from the metastore. The caller must be a
// metastore admin, the owner of the credential, or have any permission on the
// credential.
GetCredential(ctx context.Context, request GetCredentialRequest) (*CredentialInfo, error)
// Gets a service or storage credential from the metastore. The caller must be a
// metastore admin, the owner of the credential, or have any permission on the
// credential.
GetCredentialByNameArg(ctx context.Context, nameArg string) (*CredentialInfo, error)
// Gets an array of credentials (as __CredentialInfo__ objects).
//
// The array is limited to only the credentials that the caller has permission
// to access. If the caller is a metastore admin, retrieval of credentials is
// unrestricted. There is no guarantee of a specific ordering of the elements in
// the array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListCredentials(ctx context.Context, request ListCredentialsRequest) listing.Iterator[CredentialInfo]
// Gets an array of credentials (as __CredentialInfo__ objects).
//
// The array is limited to only the credentials that the caller has permission
// to access. If the caller is a metastore admin, retrieval of credentials is
// unrestricted. There is no guarantee of a specific ordering of the elements in
// the array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListCredentialsAll(ctx context.Context, request ListCredentialsRequest) ([]CredentialInfo, error)
// Updates a service or storage credential on the metastore.
//
// The caller must be the owner of the credential or a metastore admin or have
// the `MANAGE` permission. If the caller is a metastore admin, only the
// __owner__ field can be changed.
UpdateCredential(ctx context.Context, request UpdateCredentialRequest) (*CredentialInfo, error)
// Validates a credential.
//
// For service credentials (purpose is **SERVICE**), either the
// __credential_name__ or the cloud-specific credential must be provided.
//
// For storage credentials (purpose is **STORAGE**), at least one of
// __external_location_name__ and __url__ need to be provided. If only one of
// them is provided, it will be used for validation. And if both are provided,
// the __url__ will be used for validation, and __external_location_name__ will
// be ignored when checking overlapping urls. Either the __credential_name__ or
// the cloud-specific credential must be provided.
//
// The caller must be a metastore admin or the credential owner or have the
// required permission on the metastore and the credential (e.g.,
// **CREATE_EXTERNAL_LOCATION** when purpose is **STORAGE**).
ValidateCredential(ctx context.Context, request ValidateCredentialRequest) (*ValidateCredentialResponse, error)
}
type CredentialsService
deprecated
added in
v0.51.0
type CredentialsService interface {
// Creates a new credential. The type of credential to be created is
// determined by the **purpose** field, which should be either **SERVICE**
// or **STORAGE**.
//
// The caller must be a metastore admin or have the metastore privilege
// **CREATE_STORAGE_CREDENTIAL** for storage credentials, or
// **CREATE_SERVICE_CREDENTIAL** for service credentials.
CreateCredential(ctx context.Context, request CreateCredentialRequest) (*CredentialInfo, error)
// Deletes a service or storage credential from the metastore. The caller
// must be an owner of the credential.
DeleteCredential(ctx context.Context, request DeleteCredentialRequest) error
// Returns a set of temporary credentials generated using the specified
// service credential. The caller must be a metastore admin or have the
// metastore privilege **ACCESS** on the service credential.
GenerateTemporaryServiceCredential(ctx context.Context, request GenerateTemporaryServiceCredentialRequest) (*TemporaryCredentials, error)
// Gets a service or storage credential from the metastore. The caller must
// be a metastore admin, the owner of the credential, or have any permission
// on the credential.
GetCredential(ctx context.Context, request GetCredentialRequest) (*CredentialInfo, error)
// Gets an array of credentials (as __CredentialInfo__ objects).
//
// The array is limited to only the credentials that the caller has
// permission to access. If the caller is a metastore admin, retrieval of
// credentials is unrestricted. There is no guarantee of a specific ordering
// of the elements in the array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain
// zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
ListCredentials(ctx context.Context, request ListCredentialsRequest) (*ListCredentialsResponse, error)
// Updates a service or storage credential on the metastore.
//
// The caller must be the owner of the credential or a metastore admin or
// have the `MANAGE` permission. If the caller is a metastore admin, only
// the __owner__ field can be changed.
UpdateCredential(ctx context.Context, request UpdateCredentialRequest) (*CredentialInfo, error)
// Validates a credential.
//
// For service credentials (purpose is **SERVICE**), either the
// __credential_name__ or the cloud-specific credential must be provided.
//
// For storage credentials (purpose is **STORAGE**), at least one of
// __external_location_name__ and __url__ need to be provided. If only one
// of them is provided, it will be used for validation. And if both are
// provided, the __url__ will be used for validation, and
// __external_location_name__ will be ignored when checking overlapping
// urls. Either the __credential_name__ or the cloud-specific credential
// must be provided.
//
// The caller must be a metastore admin or the credential owner or have the
// required permission on the metastore and the credential (e.g.,
// **CREATE_EXTERNAL_LOCATION** when purpose is **STORAGE**).
ValidateCredential(ctx context.Context, request ValidateCredentialRequest) (*ValidateCredentialResponse, error)
}
A credential represents an authentication and authorization mechanism for accessing services on your cloud tenant. Each credential is subject to Unity Catalog access-control policies that control which users and groups can access the credential.
To create credentials, you must be a Databricks account admin or have the `CREATE SERVICE CREDENTIAL` privilege. The user who creates the credential can delegate ownership to another user or group to manage permissions on it.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type DataSourceFormat ¶
type DataSourceFormat string
Data source format
const DataSourceFormatAvro DataSourceFormat = `AVRO`
const DataSourceFormatBigqueryFormat DataSourceFormat = `BIGQUERY_FORMAT`
const DataSourceFormatCsv DataSourceFormat = `CSV`
const DataSourceFormatDatabricksFormat DataSourceFormat = `DATABRICKS_FORMAT`
const DataSourceFormatDatabricksRowStoreFormat DataSourceFormat = `DATABRICKS_ROW_STORE_FORMAT`
const DataSourceFormatDelta DataSourceFormat = `DELTA`
const DataSourceFormatDeltaUniformHudi DataSourceFormat = `DELTA_UNIFORM_HUDI`
const DataSourceFormatDeltaUniformIceberg DataSourceFormat = `DELTA_UNIFORM_ICEBERG`
const DataSourceFormatDeltasharing DataSourceFormat = `DELTASHARING`
const DataSourceFormatHive DataSourceFormat = `HIVE`
const DataSourceFormatIceberg DataSourceFormat = `ICEBERG`
const DataSourceFormatJson DataSourceFormat = `JSON`
const DataSourceFormatMongodbFormat DataSourceFormat = `MONGODB_FORMAT`
const DataSourceFormatMysqlFormat DataSourceFormat = `MYSQL_FORMAT`
const DataSourceFormatNetsuiteFormat DataSourceFormat = `NETSUITE_FORMAT`
const DataSourceFormatOracleFormat DataSourceFormat = `ORACLE_FORMAT`
const DataSourceFormatOrc DataSourceFormat = `ORC`
const DataSourceFormatParquet DataSourceFormat = `PARQUET`
const DataSourceFormatPostgresqlFormat DataSourceFormat = `POSTGRESQL_FORMAT`
const DataSourceFormatRedshiftFormat DataSourceFormat = `REDSHIFT_FORMAT`
const DataSourceFormatSalesforceDataCloudFormat DataSourceFormat = `SALESFORCE_DATA_CLOUD_FORMAT`
const DataSourceFormatSalesforceFormat DataSourceFormat = `SALESFORCE_FORMAT`
const DataSourceFormatSnowflakeFormat DataSourceFormat = `SNOWFLAKE_FORMAT`
const DataSourceFormatSqldwFormat DataSourceFormat = `SQLDW_FORMAT`
const DataSourceFormatSqlserverFormat DataSourceFormat = `SQLSERVER_FORMAT`
const DataSourceFormatTeradataFormat DataSourceFormat = `TERADATA_FORMAT`
const DataSourceFormatText DataSourceFormat = `TEXT`
const DataSourceFormatUnityCatalog DataSourceFormat = `UNITY_CATALOG`
const DataSourceFormatVectorIndexFormat DataSourceFormat = `VECTOR_INDEX_FORMAT`
const DataSourceFormatWorkdayRaasFormat DataSourceFormat = `WORKDAY_RAAS_FORMAT`
func (*DataSourceFormat) Set ¶
func (f *DataSourceFormat) Set(v string) error
Set raw string value and validate it against allowed values
func (*DataSourceFormat) String ¶
func (f *DataSourceFormat) String() string
String representation for fmt.Print
func (*DataSourceFormat) Type ¶
func (f *DataSourceFormat) Type() string
Type always returns DataSourceFormat to satisfy [pflag.Value] interface
func (*DataSourceFormat) Values ¶ added in v0.72.0
func (f *DataSourceFormat) Values() []DataSourceFormat
Values returns all possible values for DataSourceFormat.
There is no guarantee on the order of the values in the slice.
type DatabricksGcpServiceAccount ¶ added in v0.53.0
type DatabricksGcpServiceAccount struct {
// The Databricks internal ID that represents this managed identity.
CredentialId string `json:"credential_id,omitempty"`
// The email of the service account.
Email string `json:"email,omitempty"`
// The ID that represents the private key for this Service Account
PrivateKeyId string `json:"private_key_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
GCP long-lived credential. Databricks-created Google Cloud Storage service account.
func (DatabricksGcpServiceAccount) MarshalJSON ¶ added in v0.53.0
func (s DatabricksGcpServiceAccount) MarshalJSON() ([]byte, error)
func (*DatabricksGcpServiceAccount) UnmarshalJSON ¶ added in v0.53.0
func (s *DatabricksGcpServiceAccount) UnmarshalJSON(b []byte) error
type DatabricksGcpServiceAccountRequest ¶ added in v0.34.0
type DatabricksGcpServiceAccountRequest struct {
}
GCP long-lived credential. Databricks-created Google Cloud Storage service account.
type DatabricksGcpServiceAccountResponse ¶ added in v0.10.0
type DatabricksGcpServiceAccountResponse struct {
// The Databricks internal ID that represents this managed identity.
CredentialId string `json:"credential_id,omitempty"`
// The email of the service account.
Email string `json:"email,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
GCP long-lived credential. Databricks-created Google Cloud Storage service account.
func (DatabricksGcpServiceAccountResponse) MarshalJSON ¶ added in v0.23.0
func (s DatabricksGcpServiceAccountResponse) MarshalJSON() ([]byte, error)
func (*DatabricksGcpServiceAccountResponse) UnmarshalJSON ¶ added in v0.23.0
func (s *DatabricksGcpServiceAccountResponse) UnmarshalJSON(b []byte) error
type DeleteAccountMetastoreRequest ¶
type DeleteAccountMetastoreRequest struct {
// Force deletion even if the metastore is not empty. Default is false.
Force bool `json:"-" url:"force,omitempty"`
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteAccountMetastoreRequest) MarshalJSON ¶ added in v0.23.0
func (s DeleteAccountMetastoreRequest) MarshalJSON() ([]byte, error)
func (*DeleteAccountMetastoreRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *DeleteAccountMetastoreRequest) UnmarshalJSON(b []byte) error
type DeleteAccountStorageCredentialRequest ¶ added in v0.9.0
type DeleteAccountStorageCredentialRequest struct {
// Force deletion even if the Storage Credential is not empty. Default is
// false.
Force bool `json:"-" url:"force,omitempty"`
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
// Name of the storage credential.
StorageCredentialName string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteAccountStorageCredentialRequest) MarshalJSON ¶ added in v0.23.0
func (s DeleteAccountStorageCredentialRequest) MarshalJSON() ([]byte, error)
func (*DeleteAccountStorageCredentialRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *DeleteAccountStorageCredentialRequest) UnmarshalJSON(b []byte) error
type DeleteAliasRequest ¶ added in v0.18.0
type DeleteCatalogRequest ¶
type DeleteCatalogRequest struct {
// Force deletion even if the catalog is not empty.
Force bool `json:"-" url:"force,omitempty"`
// The name of the catalog.
Name string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteCatalogRequest) MarshalJSON ¶ added in v0.23.0
func (s DeleteCatalogRequest) MarshalJSON() ([]byte, error)
func (*DeleteCatalogRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *DeleteCatalogRequest) UnmarshalJSON(b []byte) error
type DeleteConnectionRequest ¶ added in v0.10.0
type DeleteConnectionRequest struct {
// The name of the connection to be deleted.
Name string `json:"-" url:"-"`
}
type DeleteCredentialRequest ¶ added in v0.51.0
type DeleteCredentialRequest struct {
// Force an update even if there are dependent services (when purpose is
// **SERVICE**) or dependent external locations and external tables (when
// purpose is **STORAGE**).
Force bool `json:"-" url:"force,omitempty"`
// Name of the credential.
NameArg string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteCredentialRequest) MarshalJSON ¶ added in v0.51.0
func (s DeleteCredentialRequest) MarshalJSON() ([]byte, error)
func (*DeleteCredentialRequest) UnmarshalJSON ¶ added in v0.51.0
func (s *DeleteCredentialRequest) UnmarshalJSON(b []byte) error
type DeleteEntityTagAssignmentRequest ¶ added in v0.81.0
type DeleteEntityTagAssignmentRequest struct {
// The fully qualified name of the entity to which the tag is assigned
EntityName string `json:"-" url:"-"`
// The type of the entity to which the tag is assigned. Allowed values are:
// catalogs, schemas, tables, columns, volumes.
EntityType string `json:"-" url:"-"`
// Required. The key of the tag to delete
TagKey string `json:"-" url:"-"`
}
type DeleteExternalLineageRelationshipRequest ¶ added in v0.74.0
type DeleteExternalLineageRelationshipRequest struct {
ExternalLineageRelationship DeleteRequestExternalLineage `json:"-" url:"external_lineage_relationship"`
}
type DeleteExternalLocationRequest ¶
type DeleteExternalLocationRequest struct {
// Force deletion even if there are dependent external tables or mounts.
Force bool `json:"-" url:"force,omitempty"`
// Name of the external location.
Name string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteExternalLocationRequest) MarshalJSON ¶ added in v0.23.0
func (s DeleteExternalLocationRequest) MarshalJSON() ([]byte, error)
func (*DeleteExternalLocationRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *DeleteExternalLocationRequest) UnmarshalJSON(b []byte) error
type DeleteExternalMetadataRequest ¶ added in v0.74.0
type DeleteExternalMetadataRequest struct {
Name string `json:"-" url:"-"`
}
type DeleteFunctionRequest ¶
type DeleteFunctionRequest struct {
// Force deletion even if the function is notempty.
Force bool `json:"-" url:"force,omitempty"`
// The fully-qualified name of the function (of the form
// __catalog_name__.__schema_name__.__function__name__) .
Name string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteFunctionRequest) MarshalJSON ¶ added in v0.23.0
func (s DeleteFunctionRequest) MarshalJSON() ([]byte, error)
func (*DeleteFunctionRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *DeleteFunctionRequest) UnmarshalJSON(b []byte) error
type DeleteMetastoreRequest ¶
type DeleteMetastoreRequest struct {
// Force deletion even if the metastore is not empty. Default is false.
Force bool `json:"-" url:"force,omitempty"`
// Unique ID of the metastore.
Id string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteMetastoreRequest) MarshalJSON ¶ added in v0.23.0
func (s DeleteMetastoreRequest) MarshalJSON() ([]byte, error)
func (*DeleteMetastoreRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *DeleteMetastoreRequest) UnmarshalJSON(b []byte) error
type DeleteModelVersionRequest ¶ added in v0.18.0
type DeleteMonitorResponse ¶ added in v0.77.0
type DeleteMonitorResponse struct {
}
type DeleteOnlineTableRequest ¶ added in v0.33.0
type DeleteOnlineTableRequest struct {
// Full three-part (catalog, schema, table) name of the table.
Name string `json:"-" url:"-"`
}
type DeletePolicyRequest ¶ added in v0.80.0
type DeletePolicyRequest struct {
// Required. The name of the policy to delete
Name string `json:"-" url:"-"`
// Required. The fully qualified name of the securable to delete the policy
// from.
OnSecurableFullname string `json:"-" url:"-"`
// Required. The type of the securable to delete the policy from.
OnSecurableType string `json:"-" url:"-"`
}
type DeletePolicyResponse ¶ added in v0.80.0
type DeletePolicyResponse struct {
}
type DeleteQualityMonitorRequest ¶ added in v0.41.0
type DeleteQualityMonitorRequest struct {
// UC table name in format `catalog.schema.table_name`. This field
// corresponds to the {full_table_name_arg} arg in the endpoint path.
TableName string `json:"-" url:"-"`
}
type DeleteRegisteredModelRequest ¶ added in v0.18.0
type DeleteRegisteredModelRequest struct {
// The three-level (fully qualified) name of the registered model
FullName string `json:"-" url:"-"`
}
type DeleteRequestExternalLineage ¶ added in v0.74.0
type DeleteRequestExternalLineage struct {
// Unique identifier of the external lineage relationship.
Id string `json:"id,omitempty" url:"id,omitempty"`
// Source object of the external lineage relationship.
Source ExternalLineageObject `json:"source" url:"source"`
// Target object of the external lineage relationship.
Target ExternalLineageObject `json:"target" url:"target"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteRequestExternalLineage) MarshalJSON ¶ added in v0.74.0
func (s DeleteRequestExternalLineage) MarshalJSON() ([]byte, error)
func (*DeleteRequestExternalLineage) UnmarshalJSON ¶ added in v0.74.0
func (s *DeleteRequestExternalLineage) UnmarshalJSON(b []byte) error
type DeleteSchemaRequest ¶
type DeleteSchemaRequest struct {
// Force deletion even if the schema is not empty.
Force bool `json:"-" url:"force,omitempty"`
// Full name of the schema.
FullName string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteSchemaRequest) MarshalJSON ¶ added in v0.44.0
func (s DeleteSchemaRequest) MarshalJSON() ([]byte, error)
func (*DeleteSchemaRequest) UnmarshalJSON ¶ added in v0.44.0
func (s *DeleteSchemaRequest) UnmarshalJSON(b []byte) error
type DeleteStorageCredentialRequest ¶
type DeleteStorageCredentialRequest struct {
// Force an update even if there are dependent external locations or
// external tables (when purpose is **STORAGE**) or dependent services (when
// purpose is **SERVICE**).
Force bool `json:"-" url:"force,omitempty"`
// Name of the storage credential.
Name string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteStorageCredentialRequest) MarshalJSON ¶ added in v0.23.0
func (s DeleteStorageCredentialRequest) MarshalJSON() ([]byte, error)
func (*DeleteStorageCredentialRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *DeleteStorageCredentialRequest) UnmarshalJSON(b []byte) error
type DeleteTableConstraintRequest ¶
type DeleteTableConstraintRequest struct {
// If true, try deleting all child constraints of the current constraint. If
// false, reject this operation if the current constraint has any child
// constraints.
Cascade bool `json:"-" url:"cascade"`
// The name of the constraint to delete.
ConstraintName string `json:"-" url:"constraint_name"`
// Full name of the table referenced by the constraint.
FullName string `json:"-" url:"-"`
}
type DeleteTableRequest ¶
type DeleteTableRequest struct {
// Full name of the table.
FullName string `json:"-" url:"-"`
}
type DeleteVolumeRequest ¶
type DeleteVolumeRequest struct {
// The three-level (fully qualified) name of the volume
Name string `json:"-" url:"-"`
}
type DeltaRuntimePropertiesKvPairs ¶ added in v0.9.0
type DeltaRuntimePropertiesKvPairs struct {
// A map of key-value properties attached to the securable.
DeltaRuntimeProperties map[string]string `json:"delta_runtime_properties"`
}
Properties pertaining to the current state of the delta table as given by the commit server. This does not contain **delta.*** (input) properties in __TableInfo.properties__.
type DeltaSharingScopeEnum ¶ added in v0.72.0
type DeltaSharingScopeEnum string
const DeltaSharingScopeEnumInternal DeltaSharingScopeEnum = `INTERNAL`
const DeltaSharingScopeEnumInternalAndExternal DeltaSharingScopeEnum = `INTERNAL_AND_EXTERNAL`
func (*DeltaSharingScopeEnum) Set ¶ added in v0.72.0
func (f *DeltaSharingScopeEnum) Set(v string) error
Set raw string value and validate it against allowed values
func (*DeltaSharingScopeEnum) String ¶ added in v0.72.0
func (f *DeltaSharingScopeEnum) String() string
String representation for fmt.Print
func (*DeltaSharingScopeEnum) Type ¶ added in v0.72.0
func (f *DeltaSharingScopeEnum) Type() string
Type always returns DeltaSharingScopeEnum to satisfy [pflag.Value] interface
func (*DeltaSharingScopeEnum) Values ¶ added in v0.72.0
func (f *DeltaSharingScopeEnum) Values() []DeltaSharingScopeEnum
Values returns all possible values for DeltaSharingScopeEnum.
There is no guarantee on the order of the values in the slice.
type Dependency ¶
type Dependency struct {
Connection *ConnectionDependency `json:"connection,omitempty"`
Credential *CredentialDependency `json:"credential,omitempty"`
Function *FunctionDependency `json:"function,omitempty"`
Table *TableDependency `json:"table,omitempty"`
}
A dependency of a SQL object. One of the following fields must be defined: __table__, __function__, __connection__, or __credential__.
type DependencyList ¶ added in v0.25.0
type DependencyList struct {
// Array of dependencies.
Dependencies []Dependency `json:"dependencies,omitempty"`
}
A list of dependencies.
type DestinationType ¶ added in v0.81.0
type DestinationType string
const DestinationTypeEmail DestinationType = `EMAIL`
const DestinationTypeGenericWebhook DestinationType = `GENERIC_WEBHOOK`
const DestinationTypeMicrosoftTeams DestinationType = `MICROSOFT_TEAMS`
const DestinationTypeSlack DestinationType = `SLACK`
const DestinationTypeUrl DestinationType = `URL`
func (*DestinationType) Set ¶ added in v0.81.0
func (f *DestinationType) Set(v string) error
Set raw string value and validate it against allowed values
func (*DestinationType) String ¶ added in v0.81.0
func (f *DestinationType) String() string
String representation for fmt.Print
func (*DestinationType) Type ¶ added in v0.81.0
func (f *DestinationType) Type() string
Type always returns DestinationType to satisfy [pflag.Value] interface
func (*DestinationType) Values ¶ added in v0.81.0
func (f *DestinationType) Values() []DestinationType
Values returns all possible values for DestinationType.
There is no guarantee on the order of the values in the slice.
type DisableRequest ¶ added in v0.10.0
type EffectivePermissionsList ¶
type EffectivePermissionsList struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
// The privileges conveyed to each principal (either directly or via
// inheritance)
PrivilegeAssignments []EffectivePrivilegeAssignment `json:"privilege_assignments,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (EffectivePermissionsList) MarshalJSON ¶ added in v0.72.0
func (s EffectivePermissionsList) MarshalJSON() ([]byte, error)
func (*EffectivePermissionsList) UnmarshalJSON ¶ added in v0.72.0
func (s *EffectivePermissionsList) UnmarshalJSON(b []byte) error
type EffectivePredictiveOptimizationFlag ¶ added in v0.17.0
type EffectivePredictiveOptimizationFlag struct {
// The name of the object from which the flag was inherited. If there was no
// inheritance, this field is left blank.
InheritedFromName string `json:"inherited_from_name,omitempty"`
// The type of the object from which the flag was inherited. If there was no
// inheritance, this field is left blank.
InheritedFromType EffectivePredictiveOptimizationFlagInheritedFromType `json:"inherited_from_type,omitempty"`
// Whether predictive optimization should be enabled for this object and
// objects under it.
Value EnablePredictiveOptimization `json:"value"`
ForceSendFields []string `json:"-" url:"-"`
}
func (EffectivePredictiveOptimizationFlag) MarshalJSON ¶ added in v0.23.0
func (s EffectivePredictiveOptimizationFlag) MarshalJSON() ([]byte, error)
func (*EffectivePredictiveOptimizationFlag) UnmarshalJSON ¶ added in v0.23.0
func (s *EffectivePredictiveOptimizationFlag) UnmarshalJSON(b []byte) error
type EffectivePredictiveOptimizationFlagInheritedFromType ¶ added in v0.17.0
type EffectivePredictiveOptimizationFlagInheritedFromType string
const EffectivePredictiveOptimizationFlagInheritedFromTypeCatalog EffectivePredictiveOptimizationFlagInheritedFromType = `CATALOG`
const EffectivePredictiveOptimizationFlagInheritedFromTypeSchema EffectivePredictiveOptimizationFlagInheritedFromType = `SCHEMA`
func (*EffectivePredictiveOptimizationFlagInheritedFromType) Set ¶ added in v0.17.0
func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Set(v string) error
Set raw string value and validate it against allowed values
func (*EffectivePredictiveOptimizationFlagInheritedFromType) String ¶ added in v0.17.0
func (f *EffectivePredictiveOptimizationFlagInheritedFromType) String() string
String representation for fmt.Print
func (*EffectivePredictiveOptimizationFlagInheritedFromType) Type ¶ added in v0.17.0
func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Type() string
Type always returns EffectivePredictiveOptimizationFlagInheritedFromType to satisfy [pflag.Value] interface
func (*EffectivePredictiveOptimizationFlagInheritedFromType) Values ¶ added in v0.72.0
func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Values() []EffectivePredictiveOptimizationFlagInheritedFromType
Values returns all possible values for EffectivePredictiveOptimizationFlagInheritedFromType.
There is no guarantee on the order of the values in the slice.
type EffectivePrivilege ¶
type EffectivePrivilege struct {
// The full name of the object that conveys this privilege via inheritance.
// This field is omitted when privilege is not inherited (it's assigned to
// the securable itself).
InheritedFromName string `json:"inherited_from_name,omitempty"`
// The type of the object that conveys this privilege via inheritance. This
// field is omitted when privilege is not inherited (it's assigned to the
// securable itself).
InheritedFromType SecurableType `json:"inherited_from_type,omitempty"`
// The privilege assigned to the principal.
Privilege Privilege `json:"privilege,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (EffectivePrivilege) MarshalJSON ¶ added in v0.23.0
func (s EffectivePrivilege) MarshalJSON() ([]byte, error)
func (*EffectivePrivilege) UnmarshalJSON ¶ added in v0.23.0
func (s *EffectivePrivilege) UnmarshalJSON(b []byte) error
type EffectivePrivilegeAssignment ¶
type EffectivePrivilegeAssignment struct {
// The principal (user email address or group name).
Principal string `json:"principal,omitempty"`
// The privileges conveyed to the principal (either directly or via
// inheritance).
Privileges []EffectivePrivilege `json:"privileges,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (EffectivePrivilegeAssignment) MarshalJSON ¶ added in v0.23.0
func (s EffectivePrivilegeAssignment) MarshalJSON() ([]byte, error)
func (*EffectivePrivilegeAssignment) UnmarshalJSON ¶ added in v0.23.0
func (s *EffectivePrivilegeAssignment) UnmarshalJSON(b []byte) error
type EnablePredictiveOptimization ¶ added in v0.17.0
type EnablePredictiveOptimization string
const EnablePredictiveOptimizationDisable EnablePredictiveOptimization = `DISABLE`
const EnablePredictiveOptimizationEnable EnablePredictiveOptimization = `ENABLE`
const EnablePredictiveOptimizationInherit EnablePredictiveOptimization = `INHERIT`
func (*EnablePredictiveOptimization) Set ¶ added in v0.17.0
func (f *EnablePredictiveOptimization) Set(v string) error
Set raw string value and validate it against allowed values
func (*EnablePredictiveOptimization) String ¶ added in v0.17.0
func (f *EnablePredictiveOptimization) String() string
String representation for fmt.Print
func (*EnablePredictiveOptimization) Type ¶ added in v0.17.0
func (f *EnablePredictiveOptimization) Type() string
Type always returns EnablePredictiveOptimization to satisfy [pflag.Value] interface
func (*EnablePredictiveOptimization) Values ¶ added in v0.72.0
func (f *EnablePredictiveOptimization) Values() []EnablePredictiveOptimization
Values returns all possible values for EnablePredictiveOptimization.
There is no guarantee on the order of the values in the slice.
type EnableRequest ¶ added in v0.11.0
type EnableRequest struct {
// the catalog for which the system schema is to enabled in
CatalogName string `json:"catalog_name,omitempty"`
// The metastore ID under which the system schema lives.
MetastoreId string `json:"-" url:"-"`
// Full name of the system schema.
SchemaName string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (EnableRequest) MarshalJSON ¶ added in v0.69.0
func (s EnableRequest) MarshalJSON() ([]byte, error)
func (*EnableRequest) UnmarshalJSON ¶ added in v0.69.0
func (s *EnableRequest) UnmarshalJSON(b []byte) error
type EncryptionDetails ¶ added in v0.14.0
type EncryptionDetails struct {
// Server-Side Encryption properties for clients communicating with AWS s3.
SseEncryptionDetails *SseEncryptionDetails `json:"sse_encryption_details,omitempty"`
}
Encryption options that apply to clients connecting to cloud storage.
type EntityTagAssignment ¶ added in v0.81.0
type EntityTagAssignment struct {
// The fully qualified name of the entity to which the tag is assigned
EntityName string `json:"entity_name"`
// The type of the entity to which the tag is assigned. Allowed values are:
// catalogs, schemas, tables, columns, volumes.
EntityType string `json:"entity_type"`
// The key of the tag
TagKey string `json:"tag_key"`
// The value of the tag
TagValue string `json:"tag_value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Represents a tag assignment to an entity
func (EntityTagAssignment) MarshalJSON ¶ added in v0.81.0
func (s EntityTagAssignment) MarshalJSON() ([]byte, error)
func (*EntityTagAssignment) UnmarshalJSON ¶ added in v0.81.0
func (s *EntityTagAssignment) UnmarshalJSON(b []byte) error
type EntityTagAssignmentsAPI ¶ added in v0.81.0
type EntityTagAssignmentsAPI struct {
// contains filtered or unexported fields
}
Tags are attributes that include keys and optional values that you can use to organize and categorize entities in Unity Catalog. Entity tagging is currently supported on catalogs, schemas, tables (including views), columns, volumes. With these APIs, users can create, update, delete, and list tag assignments across Unity Catalog entities
func NewEntityTagAssignments ¶ added in v0.81.0
func NewEntityTagAssignments(client *client.DatabricksClient) *EntityTagAssignmentsAPI
func (*EntityTagAssignmentsAPI) Create ¶ added in v0.81.0
func (a *EntityTagAssignmentsAPI) Create(ctx context.Context, request CreateEntityTagAssignmentRequest) (*EntityTagAssignment, error)
func (*EntityTagAssignmentsAPI) Delete ¶ added in v0.81.0
func (a *EntityTagAssignmentsAPI) Delete(ctx context.Context, request DeleteEntityTagAssignmentRequest) error
func (*EntityTagAssignmentsAPI) Get ¶ added in v0.81.0
func (a *EntityTagAssignmentsAPI) Get(ctx context.Context, request GetEntityTagAssignmentRequest) (*EntityTagAssignment, error)
func (*EntityTagAssignmentsAPI) List ¶ added in v0.81.0
func (a *EntityTagAssignmentsAPI) List(ctx context.Context, request ListEntityTagAssignmentsRequest) listing.Iterator[EntityTagAssignment]
List tag assignments for an Unity Catalog entity
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*EntityTagAssignmentsAPI) ListAll ¶ added in v0.81.0
func (a *EntityTagAssignmentsAPI) ListAll(ctx context.Context, request ListEntityTagAssignmentsRequest) ([]EntityTagAssignment, error)
List tag assignments for an Unity Catalog entity
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*EntityTagAssignmentsAPI) Update ¶ added in v0.81.0
func (a *EntityTagAssignmentsAPI) Update(ctx context.Context, request UpdateEntityTagAssignmentRequest) (*EntityTagAssignment, error)
type EntityTagAssignmentsInterface ¶ added in v0.81.0
type EntityTagAssignmentsInterface interface {
// Creates a tag assignment for an Unity Catalog entity.
//
// To add tags to Unity Catalog entities, you must own the entity or have the
// following privileges: - **APPLY TAG** on the entity - **USE SCHEMA** on the
// entity's parent schema - **USE CATALOG** on the entity's parent catalog
//
// To add a governed tag to Unity Catalog entities, you must also have the
// **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy
// permissions].
//
// [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
Create(ctx context.Context, request CreateEntityTagAssignmentRequest) (*EntityTagAssignment, error)
// Deletes a tag assignment for an Unity Catalog entity by its key.
//
// To delete tags from Unity Catalog entities, you must own the entity or have
// the following privileges: - **APPLY TAG** on the entity - **USE_SCHEMA** on
// the entity's parent schema - **USE_CATALOG** on the entity's parent catalog
//
// To delete a governed tag from Unity Catalog entities, you must also have the
// **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy
// permissions].
//
// [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
Delete(ctx context.Context, request DeleteEntityTagAssignmentRequest) error
// Gets a tag assignment for an Unity Catalog entity by tag key.
Get(ctx context.Context, request GetEntityTagAssignmentRequest) (*EntityTagAssignment, error)
// List tag assignments for an Unity Catalog entity
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListEntityTagAssignmentsRequest) listing.Iterator[EntityTagAssignment]
// List tag assignments for an Unity Catalog entity
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListEntityTagAssignmentsRequest) ([]EntityTagAssignment, error)
// Updates an existing tag assignment for an Unity Catalog entity.
//
// To update tags to Unity Catalog entities, you must own the entity or have the
// following privileges: - **APPLY TAG** on the entity - **USE SCHEMA** on the
// entity's parent schema - **USE CATALOG** on the entity's parent catalog
//
// To update a governed tag to Unity Catalog entities, you must also have the
// **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy
// permissions].
//
// [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
Update(ctx context.Context, request UpdateEntityTagAssignmentRequest) (*EntityTagAssignment, error)
}
type EntityTagAssignmentsService
deprecated
added in
v0.81.0
type EntityTagAssignmentsService interface {
// Creates a tag assignment for an Unity Catalog entity.
//
// To add tags to Unity Catalog entities, you must own the entity or have
// the following privileges: - **APPLY TAG** on the entity - **USE SCHEMA**
// on the entity's parent schema - **USE CATALOG** on the entity's parent
// catalog
//
// To add a governed tag to Unity Catalog entities, you must also have the
// **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag
// policy permissions].
//
// [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
Create(ctx context.Context, request CreateEntityTagAssignmentRequest) (*EntityTagAssignment, error)
// Deletes a tag assignment for an Unity Catalog entity by its key.
//
// To delete tags from Unity Catalog entities, you must own the entity or
// have the following privileges: - **APPLY TAG** on the entity -
// **USE_SCHEMA** on the entity's parent schema - **USE_CATALOG** on the
// entity's parent catalog
//
// To delete a governed tag from Unity Catalog entities, you must also have
// the **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage
// tag policy permissions].
//
// [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
Delete(ctx context.Context, request DeleteEntityTagAssignmentRequest) error
// Gets a tag assignment for an Unity Catalog entity by tag key.
Get(ctx context.Context, request GetEntityTagAssignmentRequest) (*EntityTagAssignment, error)
// List tag assignments for an Unity Catalog entity
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain
// zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
List(ctx context.Context, request ListEntityTagAssignmentsRequest) (*ListEntityTagAssignmentsResponse, error)
// Updates an existing tag assignment for an Unity Catalog entity.
//
// To update tags to Unity Catalog entities, you must own the entity or have
// the following privileges: - **APPLY TAG** on the entity - **USE SCHEMA**
// on the entity's parent schema - **USE CATALOG** on the entity's parent
// catalog
//
// To update a governed tag to Unity Catalog entities, you must also have
// the **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage
// tag policy permissions].
//
// [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
Update(ctx context.Context, request UpdateEntityTagAssignmentRequest) (*EntityTagAssignment, error)
}
Tags are attributes that include keys and optional values that you can use to organize and categorize entities in Unity Catalog. Entity tagging is currently supported on catalogs, schemas, tables (including views), columns, volumes. With these APIs, users can create, update, delete, and list tag assignments across Unity Catalog entities
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type ExistsRequest ¶ added in v0.30.0
type ExistsRequest struct {
// Full name of the table.
FullName string `json:"-" url:"-"`
}
type ExternalLineageAPI ¶ added in v0.74.0
type ExternalLineageAPI struct {
// contains filtered or unexported fields
}
External Lineage APIs enable defining and managing lineage relationships between Databricks objects and external systems. These APIs allow users to capture data flows connecting Databricks tables, models, and file paths with external metadata objects.
With these APIs, users can create, update, delete, and list lineage relationships with support for column-level mappings and custom properties.
func NewExternalLineage ¶ added in v0.74.0
func NewExternalLineage(client *client.DatabricksClient) *ExternalLineageAPI
func (*ExternalLineageAPI) CreateExternalLineageRelationship ¶ added in v0.74.0
func (a *ExternalLineageAPI) CreateExternalLineageRelationship(ctx context.Context, request CreateExternalLineageRelationshipRequest) (*ExternalLineageRelationship, error)
func (*ExternalLineageAPI) DeleteExternalLineageRelationship ¶ added in v0.74.0
func (a *ExternalLineageAPI) DeleteExternalLineageRelationship(ctx context.Context, request DeleteExternalLineageRelationshipRequest) error
func (*ExternalLineageAPI) ListExternalLineageRelationships ¶ added in v0.74.0
func (a *ExternalLineageAPI) ListExternalLineageRelationships(ctx context.Context, request ListExternalLineageRelationshipsRequest) listing.Iterator[ExternalLineageInfo]
Lists external lineage relationships of a Databricks object or external metadata given a supplied direction.
func (*ExternalLineageAPI) ListExternalLineageRelationshipsAll ¶ added in v0.74.0
func (a *ExternalLineageAPI) ListExternalLineageRelationshipsAll(ctx context.Context, request ListExternalLineageRelationshipsRequest) ([]ExternalLineageInfo, error)
Lists external lineage relationships of a Databricks object or external metadata given a supplied direction.
func (*ExternalLineageAPI) UpdateExternalLineageRelationship ¶ added in v0.74.0
func (a *ExternalLineageAPI) UpdateExternalLineageRelationship(ctx context.Context, request UpdateExternalLineageRelationshipRequest) (*ExternalLineageRelationship, error)
type ExternalLineageExternalMetadata ¶ added in v0.74.0
type ExternalLineageExternalMetadata struct {
Name string `json:"name,omitempty" url:"name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ExternalLineageExternalMetadata) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageExternalMetadata) MarshalJSON() ([]byte, error)
func (*ExternalLineageExternalMetadata) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageExternalMetadata) UnmarshalJSON(b []byte) error
type ExternalLineageExternalMetadataInfo ¶ added in v0.74.0
type ExternalLineageExternalMetadataInfo struct {
// Type of entity represented by the external metadata object.
EntityType string `json:"entity_type,omitempty"`
// Timestamp of the lineage event.
EventTime string `json:"event_time,omitempty"`
// Name of the external metadata object.
Name string `json:"name,omitempty"`
// Type of external system.
SystemType SystemType `json:"system_type,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Represents the external metadata object in the lineage event.
func (ExternalLineageExternalMetadataInfo) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageExternalMetadataInfo) MarshalJSON() ([]byte, error)
func (*ExternalLineageExternalMetadataInfo) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageExternalMetadataInfo) UnmarshalJSON(b []byte) error
type ExternalLineageFileInfo ¶ added in v0.74.0
type ExternalLineageFileInfo struct {
// Timestamp of the lineage event.
EventTime string `json:"event_time,omitempty"`
// URL of the path.
Path string `json:"path,omitempty"`
// The full name of the securable on the path.
SecurableName string `json:"securable_name,omitempty"`
// The securable type of the securable on the path.
SecurableType string `json:"securable_type,omitempty"`
// The storage location associated with securable on the path.
StorageLocation string `json:"storage_location,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Represents the path information in the lineage event.
func (ExternalLineageFileInfo) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageFileInfo) MarshalJSON() ([]byte, error)
func (*ExternalLineageFileInfo) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageFileInfo) UnmarshalJSON(b []byte) error
type ExternalLineageInfo ¶ added in v0.74.0
type ExternalLineageInfo struct {
// Information about the edge metadata of the external lineage relationship.
ExternalLineageInfo *ExternalLineageRelationshipInfo `json:"external_lineage_info,omitempty"`
// Information about external metadata involved in the lineage relationship.
ExternalMetadataInfo *ExternalLineageExternalMetadataInfo `json:"external_metadata_info,omitempty"`
// Information about the file involved in the lineage relationship.
FileInfo *ExternalLineageFileInfo `json:"file_info,omitempty"`
// Information about the model version involved in the lineage relationship.
ModelInfo *ExternalLineageModelVersionInfo `json:"model_info,omitempty"`
// Information about the table involved in the lineage relationship.
TableInfo *ExternalLineageTableInfo `json:"table_info,omitempty"`
}
Lineage response containing lineage information of a data asset.
type ExternalLineageInterface ¶ added in v0.74.0
type ExternalLineageInterface interface {
// Creates an external lineage relationship between a Databricks or external
// metadata object and another external metadata object.
CreateExternalLineageRelationship(ctx context.Context, request CreateExternalLineageRelationshipRequest) (*ExternalLineageRelationship, error)
// Deletes an external lineage relationship between a Databricks or external
// metadata object and another external metadata object.
DeleteExternalLineageRelationship(ctx context.Context, request DeleteExternalLineageRelationshipRequest) error
// Lists external lineage relationships of a Databricks object or external
// metadata given a supplied direction.
//
// This method is generated by Databricks SDK Code Generator.
ListExternalLineageRelationships(ctx context.Context, request ListExternalLineageRelationshipsRequest) listing.Iterator[ExternalLineageInfo]
// Lists external lineage relationships of a Databricks object or external
// metadata given a supplied direction.
//
// This method is generated by Databricks SDK Code Generator.
ListExternalLineageRelationshipsAll(ctx context.Context, request ListExternalLineageRelationshipsRequest) ([]ExternalLineageInfo, error)
// Updates an external lineage relationship between a Databricks or external
// metadata object and another external metadata object.
UpdateExternalLineageRelationship(ctx context.Context, request UpdateExternalLineageRelationshipRequest) (*ExternalLineageRelationship, error)
}
type ExternalLineageModelVersion ¶ added in v0.74.0
type ExternalLineageModelVersion struct {
Name string `json:"name,omitempty" url:"name,omitempty"`
Version string `json:"version,omitempty" url:"version,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ExternalLineageModelVersion) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageModelVersion) MarshalJSON() ([]byte, error)
func (*ExternalLineageModelVersion) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageModelVersion) UnmarshalJSON(b []byte) error
type ExternalLineageModelVersionInfo ¶ added in v0.74.0
type ExternalLineageModelVersionInfo struct {
// Timestamp of the lineage event.
EventTime string `json:"event_time,omitempty"`
// Name of the model.
ModelName string `json:"model_name,omitempty"`
// Version number of the model.
Version int64 `json:"version,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Represents the model version information in the lineage event.
func (ExternalLineageModelVersionInfo) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageModelVersionInfo) MarshalJSON() ([]byte, error)
func (*ExternalLineageModelVersionInfo) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageModelVersionInfo) UnmarshalJSON(b []byte) error
type ExternalLineageObject ¶ added in v0.74.0
type ExternalLineageObject struct {
ExternalMetadata *ExternalLineageExternalMetadata `json:"external_metadata,omitempty" url:"external_metadata,omitempty"`
ModelVersion *ExternalLineageModelVersion `json:"model_version,omitempty" url:"model_version,omitempty"`
Path *ExternalLineagePath `json:"path,omitempty" url:"path,omitempty"`
Table *ExternalLineageTable `json:"table,omitempty" url:"table,omitempty"`
}
type ExternalLineagePath ¶ added in v0.74.0
type ExternalLineagePath struct {
Url string `json:"url,omitempty" url:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ExternalLineagePath) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineagePath) MarshalJSON() ([]byte, error)
func (*ExternalLineagePath) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineagePath) UnmarshalJSON(b []byte) error
type ExternalLineageRelationship ¶ added in v0.74.0
type ExternalLineageRelationship struct {
// List of column relationships between source and target objects.
Columns []ColumnRelationship `json:"columns,omitempty"`
// Unique identifier of the external lineage relationship.
Id string `json:"id,omitempty"`
// Key-value properties associated with the external lineage relationship.
Properties map[string]string `json:"properties,omitempty"`
// Source object of the external lineage relationship.
Source ExternalLineageObject `json:"source"`
// Target object of the external lineage relationship.
Target ExternalLineageObject `json:"target"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ExternalLineageRelationship) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageRelationship) MarshalJSON() ([]byte, error)
func (*ExternalLineageRelationship) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageRelationship) UnmarshalJSON(b []byte) error
type ExternalLineageRelationshipInfo ¶ added in v0.74.0
type ExternalLineageRelationshipInfo struct {
// List of column relationships between source and target objects.
Columns []ColumnRelationship `json:"columns,omitempty"`
// Unique identifier of the external lineage relationship.
Id string `json:"id,omitempty"`
// Key-value properties associated with the external lineage relationship.
Properties map[string]string `json:"properties,omitempty"`
// Source object of the external lineage relationship.
Source ExternalLineageObject `json:"source"`
// Target object of the external lineage relationship.
Target ExternalLineageObject `json:"target"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ExternalLineageRelationshipInfo) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageRelationshipInfo) MarshalJSON() ([]byte, error)
func (*ExternalLineageRelationshipInfo) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageRelationshipInfo) UnmarshalJSON(b []byte) error
type ExternalLineageService
deprecated
added in
v0.74.0
type ExternalLineageService interface {
// Creates an external lineage relationship between a Databricks or external
// metadata object and another external metadata object.
CreateExternalLineageRelationship(ctx context.Context, request CreateExternalLineageRelationshipRequest) (*ExternalLineageRelationship, error)
// Deletes an external lineage relationship between a Databricks or external
// metadata object and another external metadata object.
DeleteExternalLineageRelationship(ctx context.Context, request DeleteExternalLineageRelationshipRequest) error
// Lists external lineage relationships of a Databricks object or external
// metadata given a supplied direction.
ListExternalLineageRelationships(ctx context.Context, request ListExternalLineageRelationshipsRequest) (*ListExternalLineageRelationshipsResponse, error)
// Updates an external lineage relationship between a Databricks or external
// metadata object and another external metadata object.
UpdateExternalLineageRelationship(ctx context.Context, request UpdateExternalLineageRelationshipRequest) (*ExternalLineageRelationship, error)
}
External Lineage APIs enable defining and managing lineage relationships between Databricks objects and external systems. These APIs allow users to capture data flows connecting Databricks tables, models, and file paths with external metadata objects.
With these APIs, users can create, update, delete, and list lineage relationships with support for column-level mappings and custom properties.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type ExternalLineageTable ¶ added in v0.74.0
type ExternalLineageTable struct {
Name string `json:"name,omitempty" url:"name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ExternalLineageTable) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageTable) MarshalJSON() ([]byte, error)
func (*ExternalLineageTable) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageTable) UnmarshalJSON(b []byte) error
type ExternalLineageTableInfo ¶ added in v0.74.0
type ExternalLineageTableInfo struct {
// Name of Catalog.
CatalogName string `json:"catalog_name,omitempty"`
// Timestamp of the lineage event.
EventTime string `json:"event_time,omitempty"`
// Name of Table.
Name string `json:"name,omitempty"`
// Name of Schema.
SchemaName string `json:"schema_name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Represents the table information in the lineage event.
func (ExternalLineageTableInfo) MarshalJSON ¶ added in v0.74.0
func (s ExternalLineageTableInfo) MarshalJSON() ([]byte, error)
func (*ExternalLineageTableInfo) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalLineageTableInfo) UnmarshalJSON(b []byte) error
type ExternalLocationInfo ¶
type ExternalLocationInfo struct {
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Time at which this external location was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of external location creator.
CreatedBy string `json:"created_by,omitempty"`
// Unique ID of the location's storage credential.
CredentialId string `json:"credential_id,omitempty"`
// Name of the storage credential used with this location.
CredentialName string `json:"credential_name,omitempty"`
// Whether to enable file events on this external location.
EnableFileEvents bool `json:"enable_file_events,omitempty"`
EncryptionDetails *EncryptionDetails `json:"encryption_details,omitempty"`
// Indicates whether fallback mode is enabled for this external location.
// When fallback mode is enabled, the access to the location falls back to
// cluster credentials if UC credentials are not sufficient.
Fallback bool `json:"fallback,omitempty"`
// File event queue settings. If `enable_file_events` is `true`, must be
// defined and have exactly one of the documented properties.
FileEventQueue *FileEventQueue `json:"file_event_queue,omitempty"`
IsolationMode IsolationMode `json:"isolation_mode,omitempty"`
// Unique identifier of metastore hosting the external location.
MetastoreId string `json:"metastore_id,omitempty"`
// Name of the external location.
Name string `json:"name,omitempty"`
// The owner of the external location.
Owner string `json:"owner,omitempty"`
// Indicates whether the external location is read-only.
ReadOnly bool `json:"read_only,omitempty"`
// Time at which external location this was last modified, in epoch
// milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified the external location.
UpdatedBy string `json:"updated_by,omitempty"`
// Path URL of the external location.
Url string `json:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ExternalLocationInfo) MarshalJSON ¶ added in v0.23.0
func (s ExternalLocationInfo) MarshalJSON() ([]byte, error)
func (*ExternalLocationInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *ExternalLocationInfo) UnmarshalJSON(b []byte) error
type ExternalLocationsAPI ¶
type ExternalLocationsAPI struct {
// contains filtered or unexported fields
}
An external location is an object that combines a cloud storage path with a storage credential that authorizes access to the cloud storage path. Each external location is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to an external location in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.
Databricks recommends using external locations rather than using storage credentials directly.
To create external locations, you must be a metastore admin or a user with the **CREATE_EXTERNAL_LOCATION** privilege.
func NewExternalLocations ¶
func NewExternalLocations(client *client.DatabricksClient) *ExternalLocationsAPI
func (*ExternalLocationsAPI) Create ¶
func (a *ExternalLocationsAPI) Create(ctx context.Context, request CreateExternalLocation) (*ExternalLocationInfo, error)
Example (ExternalLocationsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
credential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", credential)
created, err := w.ExternalLocations.Create(ctx, catalog.CreateExternalLocation{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CredentialName: credential.Name,
Url: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, credential.Name)
if err != nil {
panic(err)
}
err = w.ExternalLocations.DeleteByName(ctx, created.Name)
if err != nil {
panic(err)
}
Example (Volumes) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
storageCredential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
Comment: "created via SDK",
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", storageCredential)
externalLocation, err := w.ExternalLocations.Create(ctx, catalog.CreateExternalLocation{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CredentialName: storageCredential.Name,
Comment: "created via SDK",
Url: "s3://" + os.Getenv("TEST_BUCKET") + "/" + fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", externalLocation)
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, storageCredential.Name)
if err != nil {
panic(err)
}
err = w.ExternalLocations.DeleteByName(ctx, externalLocation.Name)
if err != nil {
panic(err)
}
func (*ExternalLocationsAPI) Delete ¶
func (a *ExternalLocationsAPI) Delete(ctx context.Context, request DeleteExternalLocationRequest) error
func (*ExternalLocationsAPI) DeleteByName ¶
func (a *ExternalLocationsAPI) DeleteByName(ctx context.Context, name string) error
Deletes the specified external location from the metastore. The caller must be the owner of the external location.
func (*ExternalLocationsAPI) Get ¶
func (a *ExternalLocationsAPI) Get(ctx context.Context, request GetExternalLocationRequest) (*ExternalLocationInfo, error)
Example (ExternalLocationsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
credential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", credential)
created, err := w.ExternalLocations.Create(ctx, catalog.CreateExternalLocation{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CredentialName: credential.Name,
Url: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.ExternalLocations.GetByName(ctx, created.Name)
if err != nil {
panic(err)
}
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, credential.Name)
if err != nil {
panic(err)
}
err = w.ExternalLocations.DeleteByName(ctx, created.Name)
if err != nil {
panic(err)
}
func (*ExternalLocationsAPI) GetByName ¶
func (a *ExternalLocationsAPI) GetByName(ctx context.Context, name string) (*ExternalLocationInfo, error)
Gets an external location from the metastore. The caller must be either a metastore admin, the owner of the external location, or a user that has some privilege on the external location.
func (*ExternalLocationsAPI) List ¶ added in v0.24.0
func (a *ExternalLocationsAPI) List(ctx context.Context, request ListExternalLocationsRequest) listing.Iterator[ExternalLocationInfo]
Gets an array of external locations (__ExternalLocationInfo__ objects) from the metastore. The caller must be a metastore admin, the owner of the external location, or a user that has some privilege on the external location. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (ExternalLocationsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
all, err := w.ExternalLocations.ListAll(ctx, catalog.ListExternalLocationsRequest{})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", all)
func (*ExternalLocationsAPI) ListAll ¶
func (a *ExternalLocationsAPI) ListAll(ctx context.Context, request ListExternalLocationsRequest) ([]ExternalLocationInfo, error)
Gets an array of external locations (__ExternalLocationInfo__ objects) from the metastore. The caller must be a metastore admin, the owner of the external location, or a user that has some privilege on the external location. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*ExternalLocationsAPI) Update ¶
func (a *ExternalLocationsAPI) Update(ctx context.Context, request UpdateExternalLocation) (*ExternalLocationInfo, error)
Example (ExternalLocationsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
credential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", credential)
created, err := w.ExternalLocations.Create(ctx, catalog.CreateExternalLocation{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CredentialName: credential.Name,
Url: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.ExternalLocations.Update(ctx, catalog.UpdateExternalLocation{
Name: created.Name,
CredentialName: credential.Name,
Url: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, credential.Name)
if err != nil {
panic(err)
}
err = w.ExternalLocations.DeleteByName(ctx, created.Name)
if err != nil {
panic(err)
}
type ExternalLocationsInterface ¶ added in v0.29.0
type ExternalLocationsInterface interface {
// Creates a new external location entry in the metastore. The caller must be a
// metastore admin or have the **CREATE_EXTERNAL_LOCATION** privilege on both
// the metastore and the associated storage credential.
Create(ctx context.Context, request CreateExternalLocation) (*ExternalLocationInfo, error)
// Deletes the specified external location from the metastore. The caller must
// be the owner of the external location.
Delete(ctx context.Context, request DeleteExternalLocationRequest) error
// Deletes the specified external location from the metastore. The caller must
// be the owner of the external location.
DeleteByName(ctx context.Context, name string) error
// Gets an external location from the metastore. The caller must be either a
// metastore admin, the owner of the external location, or a user that has some
// privilege on the external location.
Get(ctx context.Context, request GetExternalLocationRequest) (*ExternalLocationInfo, error)
// Gets an external location from the metastore. The caller must be either a
// metastore admin, the owner of the external location, or a user that has some
// privilege on the external location.
GetByName(ctx context.Context, name string) (*ExternalLocationInfo, error)
// Gets an array of external locations (__ExternalLocationInfo__ objects) from
// the metastore. The caller must be a metastore admin, the owner of the
// external location, or a user that has some privilege on the external
// location. There is no guarantee of a specific ordering of the elements in the
// array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListExternalLocationsRequest) listing.Iterator[ExternalLocationInfo]
// Gets an array of external locations (__ExternalLocationInfo__ objects) from
// the metastore. The caller must be a metastore admin, the owner of the
// external location, or a user that has some privilege on the external
// location. There is no guarantee of a specific ordering of the elements in the
// array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListExternalLocationsRequest) ([]ExternalLocationInfo, error)
// Updates an external location in the metastore. The caller must be the owner
// of the external location, or be a metastore admin. In the second case, the
// admin can only update the name of the external location.
Update(ctx context.Context, request UpdateExternalLocation) (*ExternalLocationInfo, error)
}
type ExternalLocationsService
deprecated
type ExternalLocationsService interface {
// Creates a new external location entry in the metastore. The caller must
// be a metastore admin or have the **CREATE_EXTERNAL_LOCATION** privilege
// on both the metastore and the associated storage credential.
Create(ctx context.Context, request CreateExternalLocation) (*ExternalLocationInfo, error)
// Deletes the specified external location from the metastore. The caller
// must be the owner of the external location.
Delete(ctx context.Context, request DeleteExternalLocationRequest) error
// Gets an external location from the metastore. The caller must be either a
// metastore admin, the owner of the external location, or a user that has
// some privilege on the external location.
Get(ctx context.Context, request GetExternalLocationRequest) (*ExternalLocationInfo, error)
// Gets an array of external locations (__ExternalLocationInfo__ objects)
// from the metastore. The caller must be a metastore admin, the owner of
// the external location, or a user that has some privilege on the external
// location. There is no guarantee of a specific ordering of the elements in
// the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListExternalLocationsRequest) (*ListExternalLocationsResponse, error)
// Updates an external location in the metastore. The caller must be the
// owner of the external location, or be a metastore admin. In the second
// case, the admin can only update the name of the external location.
Update(ctx context.Context, request UpdateExternalLocation) (*ExternalLocationInfo, error)
}
An external location is an object that combines a cloud storage path with a storage credential that authorizes access to the cloud storage path. Each external location is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to an external location in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.
Databricks recommends using external locations rather than using storage credentials directly.
To create external locations, you must be a metastore admin or a user with the **CREATE_EXTERNAL_LOCATION** privilege.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type ExternalMetadata ¶ added in v0.74.0
type ExternalMetadata struct {
// List of columns associated with the external metadata object.
Columns []string `json:"columns,omitempty"`
// Time at which this external metadata object was created.
CreateTime string `json:"create_time,omitempty"`
// Username of external metadata object creator.
CreatedBy string `json:"created_by,omitempty"`
// User-provided free-form text description.
Description string `json:"description,omitempty"`
// Type of entity within the external system.
EntityType string `json:"entity_type"`
// Unique identifier of the external metadata object.
Id string `json:"id,omitempty"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// Name of the external metadata object.
Name string `json:"name"`
// Owner of the external metadata object.
Owner string `json:"owner,omitempty"`
// A map of key-value properties attached to the external metadata object.
Properties map[string]string `json:"properties,omitempty"`
// Type of external system.
SystemType SystemType `json:"system_type"`
// Time at which this external metadata object was last modified.
UpdateTime string `json:"update_time,omitempty"`
// Username of user who last modified external metadata object.
UpdatedBy string `json:"updated_by,omitempty"`
// URL associated with the external metadata object.
Url string `json:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ExternalMetadata) MarshalJSON ¶ added in v0.74.0
func (s ExternalMetadata) MarshalJSON() ([]byte, error)
func (*ExternalMetadata) UnmarshalJSON ¶ added in v0.74.0
func (s *ExternalMetadata) UnmarshalJSON(b []byte) error
type ExternalMetadataAPI ¶ added in v0.74.0
type ExternalMetadataAPI struct {
// contains filtered or unexported fields
}
External Metadata objects enable customers to register and manage metadata about external systems within Unity Catalog.
These APIs provide a standardized way to create, update, retrieve, list, and delete external metadata objects. Fine-grained authorization ensures that only users with appropriate permissions can view and manage external metadata objects.
func NewExternalMetadata ¶ added in v0.74.0
func NewExternalMetadata(client *client.DatabricksClient) *ExternalMetadataAPI
func (*ExternalMetadataAPI) CreateExternalMetadata ¶ added in v0.74.0
func (a *ExternalMetadataAPI) CreateExternalMetadata(ctx context.Context, request CreateExternalMetadataRequest) (*ExternalMetadata, error)
func (*ExternalMetadataAPI) DeleteExternalMetadata ¶ added in v0.74.0
func (a *ExternalMetadataAPI) DeleteExternalMetadata(ctx context.Context, request DeleteExternalMetadataRequest) error
func (*ExternalMetadataAPI) DeleteExternalMetadataByName ¶ added in v0.74.0
func (a *ExternalMetadataAPI) DeleteExternalMetadataByName(ctx context.Context, name string) error
Deletes the external metadata object that matches the supplied name. The caller must be a metastore admin, the owner of the external metadata object, or a user that has the **MANAGE** privilege.
func (*ExternalMetadataAPI) GetExternalMetadata ¶ added in v0.74.0
func (a *ExternalMetadataAPI) GetExternalMetadata(ctx context.Context, request GetExternalMetadataRequest) (*ExternalMetadata, error)
func (*ExternalMetadataAPI) GetExternalMetadataByName ¶ added in v0.74.0
func (a *ExternalMetadataAPI) GetExternalMetadataByName(ctx context.Context, name string) (*ExternalMetadata, error)
Gets the specified external metadata object in a metastore. The caller must be a metastore admin, the owner of the external metadata object, or a user that has the **BROWSE** privilege.
func (*ExternalMetadataAPI) ListExternalMetadata ¶ added in v0.74.0
func (a *ExternalMetadataAPI) ListExternalMetadata(ctx context.Context, request ListExternalMetadataRequest) listing.Iterator[ExternalMetadata]
Gets an array of external metadata objects in the metastore. If the caller is the metastore admin, all external metadata objects will be retrieved. Otherwise, only external metadata objects that the caller has **BROWSE** on will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
func (*ExternalMetadataAPI) ListExternalMetadataAll ¶ added in v0.74.0
func (a *ExternalMetadataAPI) ListExternalMetadataAll(ctx context.Context, request ListExternalMetadataRequest) ([]ExternalMetadata, error)
Gets an array of external metadata objects in the metastore. If the caller is the metastore admin, all external metadata objects will be retrieved. Otherwise, only external metadata objects that the caller has **BROWSE** on will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
func (*ExternalMetadataAPI) UpdateExternalMetadata ¶ added in v0.74.0
func (a *ExternalMetadataAPI) UpdateExternalMetadata(ctx context.Context, request UpdateExternalMetadataRequest) (*ExternalMetadata, error)
type ExternalMetadataInterface ¶ added in v0.74.0
type ExternalMetadataInterface interface {
// Creates a new external metadata object in the parent metastore if the caller
// is a metastore admin or has the **CREATE_EXTERNAL_METADATA** privilege.
// Grants **BROWSE** to all account users upon creation by default.
CreateExternalMetadata(ctx context.Context, request CreateExternalMetadataRequest) (*ExternalMetadata, error)
// Deletes the external metadata object that matches the supplied name. The
// caller must be a metastore admin, the owner of the external metadata object,
// or a user that has the **MANAGE** privilege.
DeleteExternalMetadata(ctx context.Context, request DeleteExternalMetadataRequest) error
// Deletes the external metadata object that matches the supplied name. The
// caller must be a metastore admin, the owner of the external metadata object,
// or a user that has the **MANAGE** privilege.
DeleteExternalMetadataByName(ctx context.Context, name string) error
// Gets the specified external metadata object in a metastore. The caller must
// be a metastore admin, the owner of the external metadata object, or a user
// that has the **BROWSE** privilege.
GetExternalMetadata(ctx context.Context, request GetExternalMetadataRequest) (*ExternalMetadata, error)
// Gets the specified external metadata object in a metastore. The caller must
// be a metastore admin, the owner of the external metadata object, or a user
// that has the **BROWSE** privilege.
GetExternalMetadataByName(ctx context.Context, name string) (*ExternalMetadata, error)
// Gets an array of external metadata objects in the metastore. If the caller is
// the metastore admin, all external metadata objects will be retrieved.
// Otherwise, only external metadata objects that the caller has **BROWSE** on
// will be retrieved. There is no guarantee of a specific ordering of the
// elements in the array.
//
// This method is generated by Databricks SDK Code Generator.
ListExternalMetadata(ctx context.Context, request ListExternalMetadataRequest) listing.Iterator[ExternalMetadata]
// Gets an array of external metadata objects in the metastore. If the caller is
// the metastore admin, all external metadata objects will be retrieved.
// Otherwise, only external metadata objects that the caller has **BROWSE** on
// will be retrieved. There is no guarantee of a specific ordering of the
// elements in the array.
//
// This method is generated by Databricks SDK Code Generator.
ListExternalMetadataAll(ctx context.Context, request ListExternalMetadataRequest) ([]ExternalMetadata, error)
// Updates the external metadata object that matches the supplied name. The
// caller can only update either the owner or other metadata fields in one
// request. The caller must be a metastore admin, the owner of the external
// metadata object, or a user that has the **MODIFY** privilege. If the caller
// is updating the owner, they must also have the **MANAGE** privilege.
UpdateExternalMetadata(ctx context.Context, request UpdateExternalMetadataRequest) (*ExternalMetadata, error)
}
type ExternalMetadataService
deprecated
added in
v0.74.0
type ExternalMetadataService interface {
// Creates a new external metadata object in the parent metastore if the
// caller is a metastore admin or has the **CREATE_EXTERNAL_METADATA**
// privilege. Grants **BROWSE** to all account users upon creation by
// default.
CreateExternalMetadata(ctx context.Context, request CreateExternalMetadataRequest) (*ExternalMetadata, error)
// Deletes the external metadata object that matches the supplied name. The
// caller must be a metastore admin, the owner of the external metadata
// object, or a user that has the **MANAGE** privilege.
DeleteExternalMetadata(ctx context.Context, request DeleteExternalMetadataRequest) error
// Gets the specified external metadata object in a metastore. The caller
// must be a metastore admin, the owner of the external metadata object, or
// a user that has the **BROWSE** privilege.
GetExternalMetadata(ctx context.Context, request GetExternalMetadataRequest) (*ExternalMetadata, error)
// Gets an array of external metadata objects in the metastore. If the
// caller is the metastore admin, all external metadata objects will be
// retrieved. Otherwise, only external metadata objects that the caller has
// **BROWSE** on will be retrieved. There is no guarantee of a specific
// ordering of the elements in the array.
ListExternalMetadata(ctx context.Context, request ListExternalMetadataRequest) (*ListExternalMetadataResponse, error)
// Updates the external metadata object that matches the supplied name. The
// caller can only update either the owner or other metadata fields in one
// request. The caller must be a metastore admin, the owner of the external
// metadata object, or a user that has the **MODIFY** privilege. If the
// caller is updating the owner, they must also have the **MANAGE**
// privilege.
UpdateExternalMetadata(ctx context.Context, request UpdateExternalMetadataRequest) (*ExternalMetadata, error)
}
External Metadata objects enable customers to register and manage metadata about external systems within Unity Catalog.
These APIs provide a standardized way to create, update, retrieve, list, and delete external metadata objects. Fine-grained authorization ensures that only users with appropriate permissions can view and manage external metadata objects.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type FailedStatus ¶ added in v0.33.0
type FailedStatus struct {
// The last source table Delta version that was synced to the online table.
// Note that this Delta version may only be partially synced to the online
// table. Only populated if the table is still online 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 online table. Only populated if the table is still online
// and available for serving.
Timestamp string `json:"timestamp,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Detailed status of an online table. Shown if the online table is in the OFFLINE_FAILED or the ONLINE_PIPELINE_FAILED state.
func (FailedStatus) MarshalJSON ¶ added in v0.33.0
func (s FailedStatus) MarshalJSON() ([]byte, error)
func (*FailedStatus) UnmarshalJSON ¶ added in v0.33.0
func (s *FailedStatus) UnmarshalJSON(b []byte) error
type FileEventQueue ¶ added in v0.70.0
type FileEventQueue struct {
ManagedAqs *AzureQueueStorage `json:"managed_aqs,omitempty"`
ManagedPubsub *GcpPubsub `json:"managed_pubsub,omitempty"`
ManagedSqs *AwsSqsQueue `json:"managed_sqs,omitempty"`
ProvidedAqs *AzureQueueStorage `json:"provided_aqs,omitempty"`
ProvidedPubsub *GcpPubsub `json:"provided_pubsub,omitempty"`
ProvidedSqs *AwsSqsQueue `json:"provided_sqs,omitempty"`
}
type ForeignKeyConstraint ¶
type ForeignKeyConstraint struct {
// Column names for this constraint.
ChildColumns []string `json:"child_columns"`
// The name of the constraint.
Name string `json:"name"`
// Column names for this constraint.
ParentColumns []string `json:"parent_columns"`
// The full name of the parent constraint.
ParentTable string `json:"parent_table"`
// True if the constraint is RELY, false or unset if NORELY.
Rely bool `json:"rely,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ForeignKeyConstraint) MarshalJSON ¶ added in v0.73.0
func (s ForeignKeyConstraint) MarshalJSON() ([]byte, error)
func (*ForeignKeyConstraint) UnmarshalJSON ¶ added in v0.73.0
func (s *ForeignKeyConstraint) UnmarshalJSON(b []byte) error
type FunctionArgument ¶ added in v0.80.0
type FunctionArgument struct {
// The alias of a matched column.
Alias string `json:"alias,omitempty"`
// A constant literal.
Constant string `json:"constant,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (FunctionArgument) MarshalJSON ¶ added in v0.80.0
func (s FunctionArgument) MarshalJSON() ([]byte, error)
func (*FunctionArgument) UnmarshalJSON ¶ added in v0.80.0
func (s *FunctionArgument) UnmarshalJSON(b []byte) error
type FunctionDependency ¶
type FunctionDependency struct {
// Full name of the dependent function, in the form of
// __catalog_name__.__schema_name__.__function_name__.
FunctionFullName string `json:"function_full_name"`
}
A function that is dependent on a SQL object.
type FunctionInfo ¶
type FunctionInfo struct {
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
// Name of parent Catalog.
CatalogName string `json:"catalog_name,omitempty"`
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Time at which this function was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of function creator.
CreatedBy string `json:"created_by,omitempty"`
// Scalar function return data type.
DataType ColumnTypeName `json:"data_type,omitempty"`
// External function language.
ExternalLanguage string `json:"external_language,omitempty"`
// External function name.
ExternalName string `json:"external_name,omitempty"`
// Pretty printed function data type.
FullDataType string `json:"full_data_type,omitempty"`
// Full name of Function, in form of
// **catalog_name**.**schema_name**.**function_name**
FullName string `json:"full_name,omitempty"`
// Id of Function, relative to parent schema.
FunctionId string `json:"function_id,omitempty"`
// Function input parameters.
InputParams *FunctionParameterInfos `json:"input_params,omitempty"`
// Whether the function is deterministic.
IsDeterministic bool `json:"is_deterministic,omitempty"`
// Function null call.
IsNullCall bool `json:"is_null_call,omitempty"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// Name of function, relative to parent schema.
Name string `json:"name,omitempty"`
// Username of current owner of the function.
Owner string `json:"owner,omitempty"`
// Function parameter style. **S** is the value for SQL.
ParameterStyle FunctionInfoParameterStyle `json:"parameter_style,omitempty"`
// JSON-serialized key-value pair map, encoded (escaped) as a string.
Properties string `json:"properties,omitempty"`
// Table function return parameters.
ReturnParams *FunctionParameterInfos `json:"return_params,omitempty"`
// Function language. When **EXTERNAL** is used, the language of the routine
// function should be specified in the **external_language** field, and the
// **return_params** of the function cannot be used (as **TABLE** return
// type is not supported), and the **sql_data_access** field must be
// **NO_SQL**.
RoutineBody FunctionInfoRoutineBody `json:"routine_body,omitempty"`
// Function body.
RoutineDefinition string `json:"routine_definition,omitempty"`
// function dependencies.
RoutineDependencies *DependencyList `json:"routine_dependencies,omitempty"`
// Name of parent Schema relative to its parent Catalog.
SchemaName string `json:"schema_name,omitempty"`
// Function security type.
SecurityType FunctionInfoSecurityType `json:"security_type,omitempty"`
// Specific name of the function; Reserved for future use.
SpecificName string `json:"specific_name,omitempty"`
// Function SQL data access.
SqlDataAccess FunctionInfoSqlDataAccess `json:"sql_data_access,omitempty"`
// List of schemes whose objects can be referenced without qualification.
SqlPath string `json:"sql_path,omitempty"`
// Time at which this function was last modified, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified the function.
UpdatedBy string `json:"updated_by,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (FunctionInfo) MarshalJSON ¶ added in v0.23.0
func (s FunctionInfo) MarshalJSON() ([]byte, error)
func (*FunctionInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *FunctionInfo) UnmarshalJSON(b []byte) error
type FunctionInfoParameterStyle ¶
type FunctionInfoParameterStyle string
const FunctionInfoParameterStyleS FunctionInfoParameterStyle = `S`
func (*FunctionInfoParameterStyle) Set ¶
func (f *FunctionInfoParameterStyle) Set(v string) error
Set raw string value and validate it against allowed values
func (*FunctionInfoParameterStyle) String ¶
func (f *FunctionInfoParameterStyle) String() string
String representation for fmt.Print
func (*FunctionInfoParameterStyle) Type ¶
func (f *FunctionInfoParameterStyle) Type() string
Type always returns FunctionInfoParameterStyle to satisfy [pflag.Value] interface
func (*FunctionInfoParameterStyle) Values ¶ added in v0.72.0
func (f *FunctionInfoParameterStyle) Values() []FunctionInfoParameterStyle
Values returns all possible values for FunctionInfoParameterStyle.
There is no guarantee on the order of the values in the slice.
type FunctionInfoRoutineBody ¶
type FunctionInfoRoutineBody string
const FunctionInfoRoutineBodyExternal FunctionInfoRoutineBody = `EXTERNAL`
const FunctionInfoRoutineBodySql FunctionInfoRoutineBody = `SQL`
func (*FunctionInfoRoutineBody) Set ¶
func (f *FunctionInfoRoutineBody) Set(v string) error
Set raw string value and validate it against allowed values
func (*FunctionInfoRoutineBody) String ¶
func (f *FunctionInfoRoutineBody) String() string
String representation for fmt.Print
func (*FunctionInfoRoutineBody) Type ¶
func (f *FunctionInfoRoutineBody) Type() string
Type always returns FunctionInfoRoutineBody to satisfy [pflag.Value] interface
func (*FunctionInfoRoutineBody) Values ¶ added in v0.72.0
func (f *FunctionInfoRoutineBody) Values() []FunctionInfoRoutineBody
Values returns all possible values for FunctionInfoRoutineBody.
There is no guarantee on the order of the values in the slice.
type FunctionInfoSecurityType ¶
type FunctionInfoSecurityType string
const FunctionInfoSecurityTypeDefiner FunctionInfoSecurityType = `DEFINER`
func (*FunctionInfoSecurityType) Set ¶
func (f *FunctionInfoSecurityType) Set(v string) error
Set raw string value and validate it against allowed values
func (*FunctionInfoSecurityType) String ¶
func (f *FunctionInfoSecurityType) String() string
String representation for fmt.Print
func (*FunctionInfoSecurityType) Type ¶
func (f *FunctionInfoSecurityType) Type() string
Type always returns FunctionInfoSecurityType to satisfy [pflag.Value] interface
func (*FunctionInfoSecurityType) Values ¶ added in v0.72.0
func (f *FunctionInfoSecurityType) Values() []FunctionInfoSecurityType
Values returns all possible values for FunctionInfoSecurityType.
There is no guarantee on the order of the values in the slice.
type FunctionInfoSqlDataAccess ¶
type FunctionInfoSqlDataAccess string
const FunctionInfoSqlDataAccessContainsSql FunctionInfoSqlDataAccess = `CONTAINS_SQL`
const FunctionInfoSqlDataAccessNoSql FunctionInfoSqlDataAccess = `NO_SQL`
const FunctionInfoSqlDataAccessReadsSqlData FunctionInfoSqlDataAccess = `READS_SQL_DATA`
func (*FunctionInfoSqlDataAccess) Set ¶
func (f *FunctionInfoSqlDataAccess) Set(v string) error
Set raw string value and validate it against allowed values
func (*FunctionInfoSqlDataAccess) String ¶
func (f *FunctionInfoSqlDataAccess) String() string
String representation for fmt.Print
func (*FunctionInfoSqlDataAccess) Type ¶
func (f *FunctionInfoSqlDataAccess) Type() string
Type always returns FunctionInfoSqlDataAccess to satisfy [pflag.Value] interface
func (*FunctionInfoSqlDataAccess) Values ¶ added in v0.72.0
func (f *FunctionInfoSqlDataAccess) Values() []FunctionInfoSqlDataAccess
Values returns all possible values for FunctionInfoSqlDataAccess.
There is no guarantee on the order of the values in the slice.
type FunctionParameterInfo ¶
type FunctionParameterInfo struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Name of Parameter.
Name string `json:"name"`
// Default value of the parameter.
ParameterDefault string `json:"parameter_default,omitempty"`
// Function parameter mode.
ParameterMode FunctionParameterMode `json:"parameter_mode,omitempty"`
// Function parameter type.
ParameterType FunctionParameterType `json:"parameter_type,omitempty"`
// Ordinal position of column (starting at position 0).
Position int `json:"position"`
// Format of IntervalType.
TypeIntervalType string `json:"type_interval_type,omitempty"`
// Full data type spec, JSON-serialized.
TypeJson string `json:"type_json,omitempty"`
// Name of type (INT, STRUCT, MAP, etc.)
TypeName ColumnTypeName `json:"type_name"`
// Digits of precision; required on Create for DecimalTypes.
TypePrecision int `json:"type_precision,omitempty"`
// Digits to right of decimal; Required on Create for DecimalTypes.
TypeScale int `json:"type_scale,omitempty"`
// Full data type spec, SQL/catalogString text.
TypeText string `json:"type_text"`
ForceSendFields []string `json:"-" url:"-"`
}
func (FunctionParameterInfo) MarshalJSON ¶ added in v0.23.0
func (s FunctionParameterInfo) MarshalJSON() ([]byte, error)
func (*FunctionParameterInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *FunctionParameterInfo) UnmarshalJSON(b []byte) error
type FunctionParameterInfos ¶ added in v0.25.0
type FunctionParameterInfos struct {
Parameters []FunctionParameterInfo `json:"parameters,omitempty"`
}
type FunctionParameterMode ¶
type FunctionParameterMode string
const FunctionParameterModeIn FunctionParameterMode = `IN`
func (*FunctionParameterMode) Set ¶
func (f *FunctionParameterMode) Set(v string) error
Set raw string value and validate it against allowed values
func (*FunctionParameterMode) String ¶
func (f *FunctionParameterMode) String() string
String representation for fmt.Print
func (*FunctionParameterMode) Type ¶
func (f *FunctionParameterMode) Type() string
Type always returns FunctionParameterMode to satisfy [pflag.Value] interface
func (*FunctionParameterMode) Values ¶ added in v0.72.0
func (f *FunctionParameterMode) Values() []FunctionParameterMode
Values returns all possible values for FunctionParameterMode.
There is no guarantee on the order of the values in the slice.
type FunctionParameterType ¶
type FunctionParameterType string
const FunctionParameterTypeColumn FunctionParameterType = `COLUMN`
const FunctionParameterTypeParam FunctionParameterType = `PARAM`
func (*FunctionParameterType) Set ¶
func (f *FunctionParameterType) Set(v string) error
Set raw string value and validate it against allowed values
func (*FunctionParameterType) String ¶
func (f *FunctionParameterType) String() string
String representation for fmt.Print
func (*FunctionParameterType) Type ¶
func (f *FunctionParameterType) Type() string
Type always returns FunctionParameterType to satisfy [pflag.Value] interface
func (*FunctionParameterType) Values ¶ added in v0.72.0
func (f *FunctionParameterType) Values() []FunctionParameterType
Values returns all possible values for FunctionParameterType.
There is no guarantee on the order of the values in the slice.
type FunctionsAPI ¶
type FunctionsAPI struct {
// contains filtered or unexported fields
}
Functions implement User-Defined Functions (UDFs) in Unity Catalog.
The function implementation can be any SQL expression or Query, and it can be invoked wherever a table reference is allowed in a query. In Unity Catalog, a function resides at the same level as a table, so it can be referenced with the form __catalog_name__.__schema_name__.__function_name__.
func NewFunctions ¶
func NewFunctions(client *client.DatabricksClient) *FunctionsAPI
func (*FunctionsAPI) Create ¶
func (a *FunctionsAPI) Create(ctx context.Context, request CreateFunctionRequest) (*FunctionInfo, error)
func (*FunctionsAPI) Delete ¶
func (a *FunctionsAPI) Delete(ctx context.Context, request DeleteFunctionRequest) error
func (*FunctionsAPI) DeleteByName ¶
func (a *FunctionsAPI) DeleteByName(ctx context.Context, name string) error
Deletes the function that matches the supplied name. For the deletion to succeed, the user must satisfy one of the following conditions: - Is the owner of the function's parent catalog - Is the owner of the function's parent schema and have the **USE_CATALOG** privilege on its parent catalog - Is the owner of the function itself and have both the **USE_CATALOG** privilege on its parent catalog and the **USE_SCHEMA** privilege on its parent schema
func (*FunctionsAPI) FunctionInfoNameToFullNameMap ¶ added in v0.10.0
func (a *FunctionsAPI) FunctionInfoNameToFullNameMap(ctx context.Context, request ListFunctionsRequest) (map[string]string, error)
FunctionInfoNameToFullNameMap calls FunctionsAPI.ListAll and creates a map of results with FunctionInfo.Name as key and FunctionInfo.FullName as value.
Returns an error if there's more than one FunctionInfo with the same .Name.
Note: All FunctionInfo instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*FunctionsAPI) Get ¶
func (a *FunctionsAPI) Get(ctx context.Context, request GetFunctionRequest) (*FunctionInfo, error)
func (*FunctionsAPI) GetByName ¶
func (a *FunctionsAPI) GetByName(ctx context.Context, name string) (*FunctionInfo, error)
Gets a function from within a parent catalog and schema. For the fetch to succeed, the user must satisfy one of the following requirements: - Is a metastore admin - Is an owner of the function's parent catalog - Have the **USE_CATALOG** privilege on the function's parent catalog and be the owner of the function - Have the **USE_CATALOG** privilege on the function's parent catalog, the **USE_SCHEMA** privilege on the function's parent schema, and the **EXECUTE** privilege on the function itself
func (*FunctionsAPI) List ¶
func (a *FunctionsAPI) List(ctx context.Context, request ListFunctionsRequest) listing.Iterator[FunctionInfo]
List functions within the specified parent catalog and schema. If the user is a metastore admin, all functions are returned in the output list. Otherwise, the user must have the **USE_CATALOG** privilege on the catalog and the **USE_SCHEMA** privilege on the schema, and the output list contains only functions for which either the user has the **EXECUTE** privilege or the user is the owner. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*FunctionsAPI) ListAll ¶ added in v0.10.0
func (a *FunctionsAPI) ListAll(ctx context.Context, request ListFunctionsRequest) ([]FunctionInfo, error)
List functions within the specified parent catalog and schema. If the user is a metastore admin, all functions are returned in the output list. Otherwise, the user must have the **USE_CATALOG** privilege on the catalog and the **USE_SCHEMA** privilege on the schema, and the output list contains only functions for which either the user has the **EXECUTE** privilege or the user is the owner. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*FunctionsAPI) Update ¶
func (a *FunctionsAPI) Update(ctx context.Context, request UpdateFunction) (*FunctionInfo, error)
type FunctionsInterface ¶ added in v0.29.0
type FunctionsInterface interface {
// **WARNING: This API is experimental and will change in future versions**
//
// Creates a new function
//
// The user must have the following permissions in order for the function to be
// created: - **USE_CATALOG** on the function's parent catalog - **USE_SCHEMA**
// and **CREATE_FUNCTION** on the function's parent schema
Create(ctx context.Context, request CreateFunctionRequest) (*FunctionInfo, error)
// Deletes the function that matches the supplied name. For the deletion to
// succeed, the user must satisfy one of the following conditions: - Is the
// owner of the function's parent catalog - Is the owner of the function's
// parent schema and have the **USE_CATALOG** privilege on its parent catalog -
// Is the owner of the function itself and have both the **USE_CATALOG**
// privilege on its parent catalog and the **USE_SCHEMA** privilege on its
// parent schema
Delete(ctx context.Context, request DeleteFunctionRequest) error
// Deletes the function that matches the supplied name. For the deletion to
// succeed, the user must satisfy one of the following conditions: - Is the
// owner of the function's parent catalog - Is the owner of the function's
// parent schema and have the **USE_CATALOG** privilege on its parent catalog -
// Is the owner of the function itself and have both the **USE_CATALOG**
// privilege on its parent catalog and the **USE_SCHEMA** privilege on its
// parent schema
DeleteByName(ctx context.Context, name string) error
// Gets a function from within a parent catalog and schema. For the fetch to
// succeed, the user must satisfy one of the following requirements: - Is a
// metastore admin - Is an owner of the function's parent catalog - Have the
// **USE_CATALOG** privilege on the function's parent catalog and be the owner
// of the function - Have the **USE_CATALOG** privilege on the function's parent
// catalog, the **USE_SCHEMA** privilege on the function's parent schema, and
// the **EXECUTE** privilege on the function itself
Get(ctx context.Context, request GetFunctionRequest) (*FunctionInfo, error)
// Gets a function from within a parent catalog and schema. For the fetch to
// succeed, the user must satisfy one of the following requirements: - Is a
// metastore admin - Is an owner of the function's parent catalog - Have the
// **USE_CATALOG** privilege on the function's parent catalog and be the owner
// of the function - Have the **USE_CATALOG** privilege on the function's parent
// catalog, the **USE_SCHEMA** privilege on the function's parent schema, and
// the **EXECUTE** privilege on the function itself
GetByName(ctx context.Context, name string) (*FunctionInfo, error)
// List functions within the specified parent catalog and schema. If the user is
// a metastore admin, all functions are returned in the output list. Otherwise,
// the user must have the **USE_CATALOG** privilege on the catalog and the
// **USE_SCHEMA** privilege on the schema, and the output list contains only
// functions for which either the user has the **EXECUTE** privilege or the user
// is the owner. There is no guarantee of a specific ordering of the elements in
// the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListFunctionsRequest) listing.Iterator[FunctionInfo]
// List functions within the specified parent catalog and schema. If the user is
// a metastore admin, all functions are returned in the output list. Otherwise,
// the user must have the **USE_CATALOG** privilege on the catalog and the
// **USE_SCHEMA** privilege on the schema, and the output list contains only
// functions for which either the user has the **EXECUTE** privilege or the user
// is the owner. There is no guarantee of a specific ordering of the elements in
// the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListFunctionsRequest) ([]FunctionInfo, error)
// FunctionInfoNameToFullNameMap calls [FunctionsAPI.ListAll] and creates a map of results with [FunctionInfo].Name as key and [FunctionInfo].FullName as value.
//
// Returns an error if there's more than one [FunctionInfo] with the same .Name.
//
// Note: All [FunctionInfo] instances are loaded into memory before creating a map.
//
// This method is generated by Databricks SDK Code Generator.
FunctionInfoNameToFullNameMap(ctx context.Context, request ListFunctionsRequest) (map[string]string, error)
// Updates the function that matches the supplied name. Only the owner of the
// function can be updated. If the user is not a metastore admin, the user must
// be a member of the group that is the new function owner. - Is a metastore
// admin - Is the owner of the function's parent catalog - Is the owner of the
// function's parent schema and has the **USE_CATALOG** privilege on its parent
// catalog - Is the owner of the function itself and has the **USE_CATALOG**
// privilege on its parent catalog as well as the **USE_SCHEMA** privilege on
// the function's parent schema.
Update(ctx context.Context, request UpdateFunction) (*FunctionInfo, error)
}
type FunctionsService
deprecated
type FunctionsService interface {
// **WARNING: This API is experimental and will change in future versions**
//
// Creates a new function
//
// The user must have the following permissions in order for the function to
// be created: - **USE_CATALOG** on the function's parent catalog -
// **USE_SCHEMA** and **CREATE_FUNCTION** on the function's parent schema
Create(ctx context.Context, request CreateFunctionRequest) (*FunctionInfo, error)
// Deletes the function that matches the supplied name. For the deletion to
// succeed, the user must satisfy one of the following conditions: - Is the
// owner of the function's parent catalog - Is the owner of the function's
// parent schema and have the **USE_CATALOG** privilege on its parent
// catalog - Is the owner of the function itself and have both the
// **USE_CATALOG** privilege on its parent catalog and the **USE_SCHEMA**
// privilege on its parent schema
Delete(ctx context.Context, request DeleteFunctionRequest) error
// Gets a function from within a parent catalog and schema. For the fetch to
// succeed, the user must satisfy one of the following requirements: - Is a
// metastore admin - Is an owner of the function's parent catalog - Have the
// **USE_CATALOG** privilege on the function's parent catalog and be the
// owner of the function - Have the **USE_CATALOG** privilege on the
// function's parent catalog, the **USE_SCHEMA** privilege on the function's
// parent schema, and the **EXECUTE** privilege on the function itself
Get(ctx context.Context, request GetFunctionRequest) (*FunctionInfo, error)
// List functions within the specified parent catalog and schema. If the
// user is a metastore admin, all functions are returned in the output list.
// Otherwise, the user must have the **USE_CATALOG** privilege on the
// catalog and the **USE_SCHEMA** privilege on the schema, and the output
// list contains only functions for which either the user has the
// **EXECUTE** privilege or the user is the owner. There is no guarantee of
// a specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListFunctionsRequest) (*ListFunctionsResponse, error)
// Updates the function that matches the supplied name. Only the owner of
// the function can be updated. If the user is not a metastore admin, the
// user must be a member of the group that is the new function owner. - Is a
// metastore admin - Is the owner of the function's parent catalog - Is the
// owner of the function's parent schema and has the **USE_CATALOG**
// privilege on its parent catalog - Is the owner of the function itself and
// has the **USE_CATALOG** privilege on its parent catalog as well as the
// **USE_SCHEMA** privilege on the function's parent schema.
Update(ctx context.Context, request UpdateFunction) (*FunctionInfo, error)
}
Functions implement User-Defined Functions (UDFs) in Unity Catalog.
The function implementation can be any SQL expression or Query, and it can be invoked wherever a table reference is allowed in a query. In Unity Catalog, a function resides at the same level as a table, so it can be referenced with the form __catalog_name__.__schema_name__.__function_name__.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type GcpOauthToken ¶ added in v0.47.0
type GcpOauthToken struct {
OauthToken string `json:"oauth_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
GCP temporary credentials for API authentication. Read more at https://developers.google.com/identity/protocols/oauth2/service-account
func (GcpOauthToken) MarshalJSON ¶ added in v0.47.0
func (s GcpOauthToken) MarshalJSON() ([]byte, error)
func (*GcpOauthToken) UnmarshalJSON ¶ added in v0.47.0
func (s *GcpOauthToken) UnmarshalJSON(b []byte) error
type GcpPubsub ¶ added in v0.70.0
type GcpPubsub struct {
// Unique identifier included in the name of file events managed cloud
// resources.
ManagedResourceId string `json:"managed_resource_id,omitempty"`
// The Pub/Sub subscription name in the format
// projects/{project}/subscriptions/{subscription name} Required for
// provided_pubsub.
SubscriptionName string `json:"subscription_name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GcpPubsub) MarshalJSON ¶ added in v0.70.0
func (*GcpPubsub) UnmarshalJSON ¶ added in v0.70.0
type GenerateTemporaryPathCredentialRequest ¶ added in v0.80.0
type GenerateTemporaryPathCredentialRequest struct {
// Optional. When set to true, the service will not validate that the
// generated credentials can perform write operations, therefore no new
// paths will be created and the response will not contain valid
// credentials. Defaults to false.
DryRun bool `json:"dry_run,omitempty"`
// The operation being performed on the path.
Operation PathOperation `json:"operation"`
// URL for path-based access.
Url string `json:"url"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenerateTemporaryPathCredentialRequest) MarshalJSON ¶ added in v0.80.0
func (s GenerateTemporaryPathCredentialRequest) MarshalJSON() ([]byte, error)
func (*GenerateTemporaryPathCredentialRequest) UnmarshalJSON ¶ added in v0.80.0
func (s *GenerateTemporaryPathCredentialRequest) UnmarshalJSON(b []byte) error
type GenerateTemporaryPathCredentialResponse ¶ added in v0.80.0
type GenerateTemporaryPathCredentialResponse struct {
AwsTempCredentials *AwsCredentials `json:"aws_temp_credentials,omitempty"`
AzureAad *AzureActiveDirectoryToken `json:"azure_aad,omitempty"`
AzureUserDelegationSas *AzureUserDelegationSas `json:"azure_user_delegation_sas,omitempty"`
// Server time when the credential will expire, in epoch milliseconds. The
// API client is advised to cache the credential given this expiration time.
ExpirationTime int64 `json:"expiration_time,omitempty"`
GcpOauthToken *GcpOauthToken `json:"gcp_oauth_token,omitempty"`
R2TempCredentials *R2Credentials `json:"r2_temp_credentials,omitempty"`
// The URL of the storage path accessible by the temporary credential.
Url string `json:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenerateTemporaryPathCredentialResponse) MarshalJSON ¶ added in v0.80.0
func (s GenerateTemporaryPathCredentialResponse) MarshalJSON() ([]byte, error)
func (*GenerateTemporaryPathCredentialResponse) UnmarshalJSON ¶ added in v0.80.0
func (s *GenerateTemporaryPathCredentialResponse) UnmarshalJSON(b []byte) error
type GenerateTemporaryServiceCredentialAzureOptions ¶ added in v0.51.0
type GenerateTemporaryServiceCredentialAzureOptions struct {
// The resources to which the temporary Azure credential should apply. These
// resources are the scopes that are passed to the token provider (see
// https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python)
Resources []string `json:"resources,omitempty"`
}
The Azure cloud options to customize the requested temporary credential
type GenerateTemporaryServiceCredentialGcpOptions ¶ added in v0.53.0
type GenerateTemporaryServiceCredentialGcpOptions struct {
// The scopes to which the temporary GCP credential should apply. These
// resources are the scopes that are passed to the token provider (see
// https://google-auth.readthedocs.io/en/latest/reference/google.auth.html#google.auth.credentials.Credentials)
Scopes []string `json:"scopes,omitempty"`
}
The GCP cloud options to customize the requested temporary credential
type GenerateTemporaryServiceCredentialRequest ¶ added in v0.51.0
type GenerateTemporaryServiceCredentialRequest struct {
AzureOptions *GenerateTemporaryServiceCredentialAzureOptions `json:"azure_options,omitempty"`
// The name of the service credential used to generate a temporary
// credential
CredentialName string `json:"credential_name"`
GcpOptions *GenerateTemporaryServiceCredentialGcpOptions `json:"gcp_options,omitempty"`
}
type GenerateTemporaryTableCredentialRequest ¶ added in v0.47.0
type GenerateTemporaryTableCredentialRequest struct {
// The operation performed against the table data, either READ or
// READ_WRITE. If READ_WRITE is specified, the credentials returned will
// have write permissions, otherwise, it will be read only.
Operation TableOperation `json:"operation,omitempty"`
// UUID of the table to read or write.
TableId string `json:"table_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenerateTemporaryTableCredentialRequest) MarshalJSON ¶ added in v0.47.0
func (s GenerateTemporaryTableCredentialRequest) MarshalJSON() ([]byte, error)
func (*GenerateTemporaryTableCredentialRequest) UnmarshalJSON ¶ added in v0.47.0
func (s *GenerateTemporaryTableCredentialRequest) UnmarshalJSON(b []byte) error
type GenerateTemporaryTableCredentialResponse ¶ added in v0.47.0
type GenerateTemporaryTableCredentialResponse struct {
AwsTempCredentials *AwsCredentials `json:"aws_temp_credentials,omitempty"`
AzureAad *AzureActiveDirectoryToken `json:"azure_aad,omitempty"`
AzureUserDelegationSas *AzureUserDelegationSas `json:"azure_user_delegation_sas,omitempty"`
// Server time when the credential will expire, in epoch milliseconds. The
// API client is advised to cache the credential given this expiration time.
ExpirationTime int64 `json:"expiration_time,omitempty"`
GcpOauthToken *GcpOauthToken `json:"gcp_oauth_token,omitempty"`
R2TempCredentials *R2Credentials `json:"r2_temp_credentials,omitempty"`
// The URL of the storage path accessible by the temporary credential.
Url string `json:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenerateTemporaryTableCredentialResponse) MarshalJSON ¶ added in v0.47.0
func (s GenerateTemporaryTableCredentialResponse) MarshalJSON() ([]byte, error)
func (*GenerateTemporaryTableCredentialResponse) UnmarshalJSON ¶ added in v0.47.0
func (s *GenerateTemporaryTableCredentialResponse) UnmarshalJSON(b []byte) error
type GetAccessRequestDestinationsRequest ¶ added in v0.81.0
type GetAccountMetastoreAssignmentRequest ¶
type GetAccountMetastoreAssignmentRequest struct {
// Workspace ID.
WorkspaceId int64 `json:"-" url:"-"`
}
type GetAccountMetastoreRequest ¶
type GetAccountMetastoreRequest struct {
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
}
type GetArtifactAllowlistRequest ¶ added in v0.17.0
type GetArtifactAllowlistRequest struct {
// The artifact type of the allowlist.
ArtifactType ArtifactType `json:"-" url:"-"`
}
type GetBindingsRequest ¶ added in v0.23.0
type GetBindingsRequest struct {
// Maximum number of workspace bindings to return. - When set to 0, the page
// length is set to a server configured value (recommended); - When set to a
// value greater than 0, the page length is the minimum of this value and a
// server configured value; - When set to a value less than 0, an invalid
// parameter error is returned; - If not set, all the workspace bindings are
// returned (not recommended).
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
// The name of the securable.
SecurableName string `json:"-" url:"-"`
// The type of the securable to bind to a workspace (catalog,
// storage_credential, credential, or external_location).
SecurableType string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetBindingsRequest) MarshalJSON ¶ added in v0.44.0
func (s GetBindingsRequest) MarshalJSON() ([]byte, error)
func (*GetBindingsRequest) UnmarshalJSON ¶ added in v0.44.0
func (s *GetBindingsRequest) UnmarshalJSON(b []byte) error
type GetByAliasRequest ¶ added in v0.18.0
type GetByAliasRequest struct {
// The name of the alias
Alias string `json:"-" url:"-"`
// The three-level (fully qualified) name of the registered model
FullName string `json:"-" url:"-"`
// Whether to include aliases associated with the model version in the
// response
IncludeAliases bool `json:"-" url:"include_aliases,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetByAliasRequest) MarshalJSON ¶ added in v0.44.0
func (s GetByAliasRequest) MarshalJSON() ([]byte, error)
func (*GetByAliasRequest) UnmarshalJSON ¶ added in v0.44.0
func (s *GetByAliasRequest) UnmarshalJSON(b []byte) error
type GetCatalogRequest ¶
type GetCatalogRequest struct {
// Whether to include catalogs in the response for which the principal can
// only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// The name of the catalog.
Name string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetCatalogRequest) MarshalJSON ¶ added in v0.35.0
func (s GetCatalogRequest) MarshalJSON() ([]byte, error)
func (*GetCatalogRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *GetCatalogRequest) UnmarshalJSON(b []byte) error
type GetCatalogWorkspaceBindingsResponse ¶ added in v0.69.0
type GetCatalogWorkspaceBindingsResponse struct {
// A list of workspace IDs
Workspaces []int64 `json:"workspaces,omitempty"`
}
type GetConnectionRequest ¶ added in v0.10.0
type GetConnectionRequest struct {
// Name of the connection.
Name string `json:"-" url:"-"`
}
type GetCredentialRequest ¶ added in v0.51.0
type GetCredentialRequest struct {
// Name of the credential.
NameArg string `json:"-" url:"-"`
}
type GetEffectiveRequest ¶
type GetEffectiveRequest struct {
// Full name of securable.
FullName string `json:"-" url:"-"`
// Specifies the maximum number of privileges to return (page length). Every
// EffectivePrivilegeAssignment present in a single page response is
// guaranteed to contain all the effective privileges granted on (or
// inherited by) the requested Securable for the respective principal.
//
// If not set, all the effective permissions are returned. If set to -
// lesser than 0: invalid parameter error - 0: page length is set to a
// server configured value - lesser than 150 but greater than 0: invalid
// parameter error (this is to ensure that server is able to return at least
// one complete EffectivePrivilegeAssignment in a single page response) -
// greater than (or equal to) 150: page length is the minimum of this value
// and a server configured value
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque token for the next page of results (pagination).
PageToken string `json:"-" url:"page_token,omitempty"`
// If provided, only the effective permissions for the specified principal
// (user or group) are returned.
Principal string `json:"-" url:"principal,omitempty"`
// Type of securable.
SecurableType string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetEffectiveRequest) MarshalJSON ¶ added in v0.23.0
func (s GetEffectiveRequest) MarshalJSON() ([]byte, error)
func (*GetEffectiveRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *GetEffectiveRequest) UnmarshalJSON(b []byte) error
type GetEntityTagAssignmentRequest ¶ added in v0.81.0
type GetEntityTagAssignmentRequest struct {
// The fully qualified name of the entity to which the tag is assigned
EntityName string `json:"-" url:"-"`
// The type of the entity to which the tag is assigned. Allowed values are:
// catalogs, schemas, tables, columns, volumes.
EntityType string `json:"-" url:"-"`
// Required. The key of the tag
TagKey string `json:"-" url:"-"`
}
type GetExternalLocationRequest ¶
type GetExternalLocationRequest struct {
// Whether to include external locations in the response for which the
// principal can only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Name of the external location.
Name string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetExternalLocationRequest) MarshalJSON ¶ added in v0.35.0
func (s GetExternalLocationRequest) MarshalJSON() ([]byte, error)
func (*GetExternalLocationRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *GetExternalLocationRequest) UnmarshalJSON(b []byte) error
type GetExternalMetadataRequest ¶ added in v0.74.0
type GetExternalMetadataRequest struct {
Name string `json:"-" url:"-"`
}
type GetFunctionRequest ¶
type GetFunctionRequest struct {
// Whether to include functions in the response for which the principal can
// only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// The fully-qualified name of the function (of the form
// __catalog_name__.__schema_name__.__function__name__).
Name string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetFunctionRequest) MarshalJSON ¶ added in v0.35.0
func (s GetFunctionRequest) MarshalJSON() ([]byte, error)
func (*GetFunctionRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *GetFunctionRequest) UnmarshalJSON(b []byte) error
type GetGrantRequest ¶
type GetGrantRequest struct {
// Full name of securable.
FullName string `json:"-" url:"-"`
// Specifies the maximum number of privileges to return (page length). Every
// PrivilegeAssignment present in a single page response is guaranteed to
// contain all the privileges granted on the requested Securable for the
// respective principal.
//
// If not set, all the permissions are returned. If set to - lesser than 0:
// invalid parameter error - 0: page length is set to a server configured
// value - lesser than 150 but greater than 0: invalid parameter error (this
// is to ensure that server is able to return at least one complete
// PrivilegeAssignment in a single page response) - greater than (or equal
// to) 150: page length is the minimum of this value and a server configured
// value
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
// If provided, only the permissions for the specified principal (user or
// group) are returned.
Principal string `json:"-" url:"principal,omitempty"`
// Type of securable.
SecurableType string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetGrantRequest) MarshalJSON ¶ added in v0.23.0
func (s GetGrantRequest) MarshalJSON() ([]byte, error)
func (*GetGrantRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *GetGrantRequest) UnmarshalJSON(b []byte) error
type GetMetastoreRequest ¶
type GetMetastoreRequest struct {
// Unique ID of the metastore.
Id string `json:"-" url:"-"`
}
type GetMetastoreSummaryResponse ¶
type GetMetastoreSummaryResponse struct {
// Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`).
Cloud string `json:"cloud,omitempty"`
// Time at which this metastore was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of metastore creator.
CreatedBy string `json:"created_by,omitempty"`
// Unique identifier of the metastore's (Default) Data Access Configuration.
DefaultDataAccessConfigId string `json:"default_data_access_config_id,omitempty"`
// The organization name of a Delta Sharing entity, to be used in
// Databricks-to-Databricks Delta Sharing as the official name.
DeltaSharingOrganizationName string `json:"delta_sharing_organization_name,omitempty"`
// The lifetime of delta sharing recipient token in seconds.
DeltaSharingRecipientTokenLifetimeInSeconds int64 `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
// The scope of Delta Sharing enabled for the metastore.
DeltaSharingScope DeltaSharingScopeEnum `json:"delta_sharing_scope,omitempty"`
// Whether to allow non-DBR clients to directly access entities under the
// metastore.
ExternalAccessEnabled bool `json:"external_access_enabled,omitempty"`
// Globally unique metastore ID across clouds and regions, of the form
// `cloud:region:metastore_id`.
GlobalMetastoreId string `json:"global_metastore_id,omitempty"`
// Unique identifier of metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// The user-specified name of the metastore.
Name string `json:"name,omitempty"`
// The owner of the metastore.
Owner string `json:"owner,omitempty"`
// Privilege model version of the metastore, of the form `major.minor`
// (e.g., `1.0`).
PrivilegeModelVersion string `json:"privilege_model_version,omitempty"`
// Cloud region which the metastore serves (e.g., `us-west-2`, `westus`).
Region string `json:"region,omitempty"`
// The storage root URL for metastore
StorageRoot string `json:"storage_root,omitempty"`
// UUID of storage credential to access the metastore storage_root.
StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
// Name of the storage credential to access the metastore storage_root.
StorageRootCredentialName string `json:"storage_root_credential_name,omitempty"`
// Time at which the metastore was last modified, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified the metastore.
UpdatedBy string `json:"updated_by,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetMetastoreSummaryResponse) MarshalJSON ¶ added in v0.23.0
func (s GetMetastoreSummaryResponse) MarshalJSON() ([]byte, error)
func (*GetMetastoreSummaryResponse) UnmarshalJSON ¶ added in v0.23.0
func (s *GetMetastoreSummaryResponse) UnmarshalJSON(b []byte) error
type GetModelVersionRequest ¶ added in v0.18.0
type GetModelVersionRequest struct {
// The three-level (fully qualified) name of the model version
FullName string `json:"-" url:"-"`
// Whether to include aliases associated with the model version in the
// response
IncludeAliases bool `json:"-" url:"include_aliases,omitempty"`
// Whether to include model versions in the response for which the principal
// can only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// The integer version number of the model version
Version int `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetModelVersionRequest) MarshalJSON ¶ added in v0.35.0
func (s GetModelVersionRequest) MarshalJSON() ([]byte, error)
func (*GetModelVersionRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *GetModelVersionRequest) UnmarshalJSON(b []byte) error
type GetOnlineTableRequest ¶ added in v0.33.0
type GetOnlineTableRequest struct {
// Full three-part (catalog, schema, table) name of the table.
Name string `json:"-" url:"-"`
}
type GetPermissionsResponse ¶ added in v0.72.0
type GetPermissionsResponse struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
// The privileges assigned to each principal
PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetPermissionsResponse) MarshalJSON ¶ added in v0.72.0
func (s GetPermissionsResponse) MarshalJSON() ([]byte, error)
func (*GetPermissionsResponse) UnmarshalJSON ¶ added in v0.72.0
func (s *GetPermissionsResponse) UnmarshalJSON(b []byte) error
type GetPolicyRequest ¶ added in v0.80.0
type GetPolicyRequest struct {
// Required. The name of the policy to retrieve.
Name string `json:"-" url:"-"`
// Required. The fully qualified name of securable to retrieve policy for.
OnSecurableFullname string `json:"-" url:"-"`
// Required. The type of the securable to retrieve the policy for.
OnSecurableType string `json:"-" url:"-"`
}
type GetQualityMonitorRequest ¶ added in v0.41.0
type GetQualityMonitorRequest struct {
// UC table name in format `catalog.schema.table_name`. This field
// corresponds to the {full_table_name_arg} arg in the endpoint path.
TableName string `json:"-" url:"-"`
}
type GetQuotaRequest ¶ added in v0.45.0
type GetQuotaRequest struct {
// Full name of the parent resource. Provide the metastore ID if the parent
// is a metastore.
ParentFullName string `json:"-" url:"-"`
// Securable type of the quota parent.
ParentSecurableType string `json:"-" url:"-"`
// Name of the quota. Follows the pattern of the quota type, with "-quota"
// added as a suffix.
QuotaName string `json:"-" url:"-"`
}
type GetQuotaResponse ¶ added in v0.45.0
type GetQuotaResponse struct {
// The returned QuotaInfo.
QuotaInfo *QuotaInfo `json:"quota_info,omitempty"`
}
type GetRefreshRequest ¶ added in v0.31.0
type GetRegisteredModelRequest ¶ added in v0.18.0
type GetRegisteredModelRequest struct {
// The three-level (fully qualified) name of the registered model
FullName string `json:"-" url:"-"`
// Whether to include registered model aliases in the response
IncludeAliases bool `json:"-" url:"include_aliases,omitempty"`
// Whether to include registered models in the response for which the
// principal can only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetRegisteredModelRequest) MarshalJSON ¶ added in v0.35.0
func (s GetRegisteredModelRequest) MarshalJSON() ([]byte, error)
func (*GetRegisteredModelRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *GetRegisteredModelRequest) UnmarshalJSON(b []byte) error
type GetSchemaRequest ¶
type GetSchemaRequest struct {
// Full name of the schema.
FullName string `json:"-" url:"-"`
// Whether to include schemas in the response for which the principal can
// only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetSchemaRequest) MarshalJSON ¶ added in v0.35.0
func (s GetSchemaRequest) MarshalJSON() ([]byte, error)
func (*GetSchemaRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *GetSchemaRequest) UnmarshalJSON(b []byte) error
type GetStorageCredentialRequest ¶
type GetStorageCredentialRequest struct {
// Name of the storage credential.
Name string `json:"-" url:"-"`
}
type GetTableRequest ¶
type GetTableRequest struct {
// Full name of the table.
FullName string `json:"-" url:"-"`
// Whether to include tables in the response for which the principal can
// only access selective metadata for.
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Whether delta metadata should be included in the response.
IncludeDeltaMetadata bool `json:"-" url:"include_delta_metadata,omitempty"`
// Whether to include a manifest containing table capabilities in the
// response.
IncludeManifestCapabilities bool `json:"-" url:"include_manifest_capabilities,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetTableRequest) MarshalJSON ¶ added in v0.23.0
func (s GetTableRequest) MarshalJSON() ([]byte, error)
func (*GetTableRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *GetTableRequest) UnmarshalJSON(b []byte) error
type GetWorkspaceBindingRequest ¶ added in v0.9.0
type GetWorkspaceBindingRequest struct {
// The name of the catalog.
Name string `json:"-" url:"-"`
}
type GetWorkspaceBindingsResponse ¶ added in v0.69.0
type GetWorkspaceBindingsResponse struct {
// List of workspace bindings
Bindings []WorkspaceBinding `json:"bindings,omitempty"`
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetWorkspaceBindingsResponse) MarshalJSON ¶ added in v0.69.0
func (s GetWorkspaceBindingsResponse) MarshalJSON() ([]byte, error)
func (*GetWorkspaceBindingsResponse) UnmarshalJSON ¶ added in v0.69.0
func (s *GetWorkspaceBindingsResponse) UnmarshalJSON(b []byte) error
type GrantsAPI ¶
type GrantsAPI struct {
// contains filtered or unexported fields
}
In Unity Catalog, data is secure by default. Initially, users have no access to data in a metastore. Access can be granted by either a metastore admin, the owner of an object, or the owner of the catalog or schema that contains the object. Securable objects in Unity Catalog are hierarchical and privileges are inherited downward.
Securable objects in Unity Catalog are hierarchical and privileges are inherited downward. This means that granting a privilege on the catalog automatically grants the privilege to all current and future objects within the catalog. Similarly, privileges granted on a schema are inherited by all current and future objects within that schema.
func NewGrants ¶
func NewGrants(client *client.DatabricksClient) *GrantsAPI
func (*GrantsAPI) Get ¶
func (a *GrantsAPI) Get(ctx context.Context, request GetGrantRequest) (*GetPermissionsResponse, error)
func (*GrantsAPI) GetBySecurableTypeAndFullName ¶
func (a *GrantsAPI) GetBySecurableTypeAndFullName(ctx context.Context, securableType string, fullName string) (*GetPermissionsResponse, error)
Gets the permissions for a securable. Does not include inherited permissions.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*GrantsAPI) GetEffective ¶
func (a *GrantsAPI) GetEffective(ctx context.Context, request GetEffectiveRequest) (*EffectivePermissionsList, error)
Example (Tables) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
tableName := fmt.Sprintf("sdk-%x", time.Now().UnixNano())
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
_, err = w.StatementExecution.ExecuteAndWait(ctx, sql.ExecuteStatementRequest{
WarehouseId: os.Getenv("TEST_DEFAULT_WAREHOUSE_ID"),
Catalog: createdCatalog.Name,
Schema: createdSchema.Name,
Statement: fmt.Sprintf("CREATE TABLE %s AS SELECT 2+2 as four", tableName),
})
if err != nil {
panic(err)
}
tableFullName := fmt.Sprintf("%s.%s.%s", createdCatalog.Name, createdSchema.Name, tableName)
createdTable, err := w.Tables.GetByFullName(ctx, tableFullName)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdTable)
grants, err := w.Grants.GetEffectiveBySecurableTypeAndFullName(ctx, string(catalog.SecurableTypeTable), createdTable.FullName)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", grants)
// cleanup
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Tables.DeleteByFullName(ctx, tableFullName)
if err != nil {
panic(err)
}
func (*GrantsAPI) GetEffectiveBySecurableTypeAndFullName ¶
func (a *GrantsAPI) GetEffectiveBySecurableTypeAndFullName(ctx context.Context, securableType string, fullName string) (*EffectivePermissionsList, error)
Gets the effective permissions for a securable. Includes inherited permissions from any parent securables.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*GrantsAPI) Update ¶
func (a *GrantsAPI) Update(ctx context.Context, request UpdatePermissions) (*UpdatePermissionsResponse, error)
Example (Tables) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
tableName := fmt.Sprintf("sdk-%x", time.Now().UnixNano())
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
_, err = w.StatementExecution.ExecuteAndWait(ctx, sql.ExecuteStatementRequest{
WarehouseId: os.Getenv("TEST_DEFAULT_WAREHOUSE_ID"),
Catalog: createdCatalog.Name,
Schema: createdSchema.Name,
Statement: fmt.Sprintf("CREATE TABLE %s AS SELECT 2+2 as four", tableName),
})
if err != nil {
panic(err)
}
tableFullName := fmt.Sprintf("%s.%s.%s", createdCatalog.Name, createdSchema.Name, tableName)
accountLevelGroupName := os.Getenv("TEST_DATA_ENG_GROUP")
createdTable, err := w.Tables.GetByFullName(ctx, tableFullName)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdTable)
x, err := w.Grants.Update(ctx, catalog.UpdatePermissions{
FullName: createdTable.FullName,
SecurableType: string(catalog.SecurableTypeTable),
Changes: []catalog.PermissionsChange{catalog.PermissionsChange{
Add: []catalog.Privilege{catalog.PrivilegeModify, catalog.PrivilegeSelect},
Principal: accountLevelGroupName,
}},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", x)
// cleanup
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Tables.DeleteByFullName(ctx, tableFullName)
if err != nil {
panic(err)
}
type GrantsInterface ¶ added in v0.29.0
type GrantsInterface interface {
// Gets the permissions for a securable. Does not include inherited permissions.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
Get(ctx context.Context, request GetGrantRequest) (*GetPermissionsResponse, error)
// Gets the permissions for a securable. Does not include inherited permissions.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
GetBySecurableTypeAndFullName(ctx context.Context, securableType string, fullName string) (*GetPermissionsResponse, error)
// Gets the effective permissions for a securable. Includes inherited
// permissions from any parent securables.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
GetEffective(ctx context.Context, request GetEffectiveRequest) (*EffectivePermissionsList, error)
// Gets the effective permissions for a securable. Includes inherited
// permissions from any parent securables.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
GetEffectiveBySecurableTypeAndFullName(ctx context.Context, securableType string, fullName string) (*EffectivePermissionsList, error)
// Updates the permissions for a securable.
Update(ctx context.Context, request UpdatePermissions) (*UpdatePermissionsResponse, error)
}
type GrantsService
deprecated
type GrantsService interface {
// Gets the permissions for a securable. Does not include inherited
// permissions.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
Get(ctx context.Context, request GetGrantRequest) (*GetPermissionsResponse, error)
// Gets the effective permissions for a securable. Includes inherited
// permissions from any parent securables.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
GetEffective(ctx context.Context, request GetEffectiveRequest) (*EffectivePermissionsList, error)
// Updates the permissions for a securable.
Update(ctx context.Context, request UpdatePermissions) (*UpdatePermissionsResponse, error)
}
In Unity Catalog, data is secure by default. Initially, users have no access to data in a metastore. Access can be granted by either a metastore admin, the owner of an object, or the owner of the catalog or schema that contains the object. Securable objects in Unity Catalog are hierarchical and privileges are inherited downward.
Securable objects in Unity Catalog are hierarchical and privileges are inherited downward. This means that granting a privilege on the catalog automatically grants the privilege to all current and future objects within the catalog. Similarly, privileges granted on a schema are inherited by all current and future objects within that schema.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type IsolationMode ¶ added in v0.9.0
type IsolationMode string
const IsolationModeIsolationModeIsolated IsolationMode = `ISOLATION_MODE_ISOLATED`
const IsolationModeIsolationModeOpen IsolationMode = `ISOLATION_MODE_OPEN`
func (*IsolationMode) Set ¶ added in v0.9.0
func (f *IsolationMode) Set(v string) error
Set raw string value and validate it against allowed values
func (*IsolationMode) String ¶ added in v0.9.0
func (f *IsolationMode) String() string
String representation for fmt.Print
func (*IsolationMode) Type ¶ added in v0.9.0
func (f *IsolationMode) Type() string
Type always returns IsolationMode to satisfy [pflag.Value] interface
func (*IsolationMode) Values ¶ added in v0.72.0
func (f *IsolationMode) Values() []IsolationMode
Values returns all possible values for IsolationMode.
There is no guarantee on the order of the values in the slice.
type LineageDirection ¶ added in v0.74.0
type LineageDirection string
const LineageDirectionDownstream LineageDirection = `DOWNSTREAM`
const LineageDirectionUpstream LineageDirection = `UPSTREAM`
func (*LineageDirection) Set ¶ added in v0.74.0
func (f *LineageDirection) Set(v string) error
Set raw string value and validate it against allowed values
func (*LineageDirection) String ¶ added in v0.74.0
func (f *LineageDirection) String() string
String representation for fmt.Print
func (*LineageDirection) Type ¶ added in v0.74.0
func (f *LineageDirection) Type() string
Type always returns LineageDirection to satisfy [pflag.Value] interface
func (*LineageDirection) Values ¶ added in v0.74.0
func (f *LineageDirection) Values() []LineageDirection
Values returns all possible values for LineageDirection.
There is no guarantee on the order of the values in the slice.
type ListAccountMetastoreAssignmentsRequest ¶
type ListAccountMetastoreAssignmentsRequest struct {
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
}
type ListAccountMetastoreAssignmentsResponse ¶ added in v0.22.0
type ListAccountMetastoreAssignmentsResponse struct {
WorkspaceIds []int64 `json:"workspace_ids,omitempty"`
}
The metastore assignments were successfully returned.
type ListAccountStorageCredentialsRequest ¶
type ListAccountStorageCredentialsRequest struct {
// Unity Catalog metastore ID
MetastoreId string `json:"-" url:"-"`
}
type ListAccountStorageCredentialsResponse ¶ added in v0.42.0
type ListAccountStorageCredentialsResponse struct {
// An array of metastore storage credentials.
StorageCredentials []StorageCredentialInfo `json:"storage_credentials,omitempty"`
}
The metastore storage credentials were successfully returned.
type ListCatalogsRequest ¶ added in v0.35.0
type ListCatalogsRequest struct {
// Whether to include catalogs in the response for which the principal can
// only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Whether to include catalogs not bound to the workspace. Effective only if
// the user has permission to update the catalog–workspace binding.
IncludeUnbound bool `json:"-" url:"include_unbound,omitempty"`
// Maximum number of catalogs to return. - when set to 0, the page length is
// set to a server configured value (recommended); - when set to a value
// greater than 0, the page length is the minimum of this value and a server
// configured value; - when set to a value less than 0, an invalid parameter
// error is returned; - If not set, all valid catalogs are returned (not
// recommended). - Note: The number of returned catalogs might be less than
// the specified max_results size, even zero. The only definitive indication
// that no further catalogs can be fetched is when the next_page_token is
// unset from the response.
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListCatalogsRequest) MarshalJSON ¶ added in v0.35.0
func (s ListCatalogsRequest) MarshalJSON() ([]byte, error)
func (*ListCatalogsRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *ListCatalogsRequest) UnmarshalJSON(b []byte) error
type ListCatalogsResponse ¶
type ListCatalogsResponse struct {
// An array of catalog information objects.
Catalogs []CatalogInfo `json:"catalogs,omitempty"`
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListCatalogsResponse) MarshalJSON ¶ added in v0.43.0
func (s ListCatalogsResponse) MarshalJSON() ([]byte, error)
func (*ListCatalogsResponse) UnmarshalJSON ¶ added in v0.43.0
func (s *ListCatalogsResponse) UnmarshalJSON(b []byte) error
type ListConnectionsRequest ¶ added in v0.41.0
type ListConnectionsRequest struct {
// Maximum number of connections to return. - If not set, all connections
// are returned (not recommended). - when set to a value greater than 0, the
// page length is the minimum of this value and a server configured value; -
// when set to 0, the page length is set to a server configured value
// (recommended); - when set to a value less than 0, an invalid parameter
// error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListConnectionsRequest) MarshalJSON ¶ added in v0.41.0
func (s ListConnectionsRequest) MarshalJSON() ([]byte, error)
func (*ListConnectionsRequest) UnmarshalJSON ¶ added in v0.41.0
func (s *ListConnectionsRequest) UnmarshalJSON(b []byte) error
type ListConnectionsResponse ¶ added in v0.10.0
type ListConnectionsResponse struct {
// An array of connection information objects.
Connections []ConnectionInfo `json:"connections,omitempty"`
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListConnectionsResponse) MarshalJSON ¶ added in v0.41.0
func (s ListConnectionsResponse) MarshalJSON() ([]byte, error)
func (*ListConnectionsResponse) UnmarshalJSON ¶ added in v0.41.0
func (s *ListConnectionsResponse) UnmarshalJSON(b []byte) error
type ListCredentialsRequest ¶ added in v0.51.0
type ListCredentialsRequest struct {
// Whether to include credentials not bound to the workspace. Effective only
// if the user has permission to update the credential–workspace binding.
IncludeUnbound bool `json:"-" url:"include_unbound,omitempty"`
// Maximum number of credentials to return. - If not set, the default max
// page size is used. - When set to a value greater than 0, the page length
// is the minimum of this value and a server-configured value. - When set to
// 0, the page length is set to a server-configured value (recommended). -
// When set to a value less than 0, an invalid parameter error is returned.
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque token to retrieve the next page of results.
PageToken string `json:"-" url:"page_token,omitempty"`
// Return only credentials for the specified purpose.
Purpose CredentialPurpose `json:"-" url:"purpose,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListCredentialsRequest) MarshalJSON ¶ added in v0.51.0
func (s ListCredentialsRequest) MarshalJSON() ([]byte, error)
func (*ListCredentialsRequest) UnmarshalJSON ¶ added in v0.51.0
func (s *ListCredentialsRequest) UnmarshalJSON(b []byte) error
type ListCredentialsResponse ¶ added in v0.51.0
type ListCredentialsResponse struct {
Credentials []CredentialInfo `json:"credentials,omitempty"`
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListCredentialsResponse) MarshalJSON ¶ added in v0.51.0
func (s ListCredentialsResponse) MarshalJSON() ([]byte, error)
func (*ListCredentialsResponse) UnmarshalJSON ¶ added in v0.51.0
func (s *ListCredentialsResponse) UnmarshalJSON(b []byte) error
type ListEntityTagAssignmentsRequest ¶ added in v0.81.0
type ListEntityTagAssignmentsRequest struct {
// The fully qualified name of the entity to which the tag is assigned
EntityName string `json:"-" url:"-"`
// The type of the entity to which the tag is assigned. Allowed values are:
// catalogs, schemas, tables, columns, volumes.
EntityType string `json:"-" url:"-"`
// Optional. Maximum number of tag assignments to return in a single page
MaxResults int `json:"-" url:"max_results,omitempty"`
// Optional. Pagination token to retrieve the next page of results
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListEntityTagAssignmentsRequest) MarshalJSON ¶ added in v0.81.0
func (s ListEntityTagAssignmentsRequest) MarshalJSON() ([]byte, error)
func (*ListEntityTagAssignmentsRequest) UnmarshalJSON ¶ added in v0.81.0
func (s *ListEntityTagAssignmentsRequest) UnmarshalJSON(b []byte) error
type ListEntityTagAssignmentsResponse ¶ added in v0.81.0
type ListEntityTagAssignmentsResponse struct {
// Optional. Pagination token for retrieving the next page of results
NextPageToken string `json:"next_page_token,omitempty"`
// The list of tag assignments
TagAssignments []EntityTagAssignment `json:"tag_assignments,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListEntityTagAssignmentsResponse) MarshalJSON ¶ added in v0.81.0
func (s ListEntityTagAssignmentsResponse) MarshalJSON() ([]byte, error)
func (*ListEntityTagAssignmentsResponse) UnmarshalJSON ¶ added in v0.81.0
func (s *ListEntityTagAssignmentsResponse) UnmarshalJSON(b []byte) error
type ListExternalLineageRelationshipsRequest ¶ added in v0.74.0
type ListExternalLineageRelationshipsRequest struct {
// The lineage direction to filter on.
LineageDirection LineageDirection `json:"-" url:"lineage_direction"`
// The object to query external lineage relationships for. Since this field
// is a query parameter, please flatten the nested fields. For example, if
// the object is a table, the query parameter should look like:
// `object_info.table.name=main.sales.customers`
ObjectInfo ExternalLineageObject `json:"-" url:"object_info"`
// Specifies the maximum number of external lineage relationships to return
// in a single response. The value must be less than or equal to 1000.
PageSize int `json:"-" url:"page_size,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListExternalLineageRelationshipsRequest) MarshalJSON ¶ added in v0.74.0
func (s ListExternalLineageRelationshipsRequest) MarshalJSON() ([]byte, error)
func (*ListExternalLineageRelationshipsRequest) UnmarshalJSON ¶ added in v0.74.0
func (s *ListExternalLineageRelationshipsRequest) UnmarshalJSON(b []byte) error
type ListExternalLineageRelationshipsResponse ¶ added in v0.74.0
type ListExternalLineageRelationshipsResponse struct {
ExternalLineageRelationships []ExternalLineageInfo `json:"external_lineage_relationships,omitempty"`
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListExternalLineageRelationshipsResponse) MarshalJSON ¶ added in v0.74.0
func (s ListExternalLineageRelationshipsResponse) MarshalJSON() ([]byte, error)
func (*ListExternalLineageRelationshipsResponse) UnmarshalJSON ¶ added in v0.74.0
func (s *ListExternalLineageRelationshipsResponse) UnmarshalJSON(b []byte) error
type ListExternalLocationsRequest ¶ added in v0.29.0
type ListExternalLocationsRequest struct {
// Whether to include external locations in the response for which the
// principal can only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Whether to include external locations not bound to the workspace.
// Effective only if the user has permission to update the
// location–workspace binding.
IncludeUnbound bool `json:"-" url:"include_unbound,omitempty"`
// Maximum number of external locations to return. If not set, all the
// external locations are returned (not recommended). - when set to a value
// greater than 0, the page length is the minimum of this value and a server
// configured value; - when set to 0, the page length is set to a server
// configured value (recommended); - when set to a value less than 0, an
// invalid parameter error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListExternalLocationsRequest) MarshalJSON ¶ added in v0.29.0
func (s ListExternalLocationsRequest) MarshalJSON() ([]byte, error)
func (*ListExternalLocationsRequest) UnmarshalJSON ¶ added in v0.29.0
func (s *ListExternalLocationsRequest) UnmarshalJSON(b []byte) error
type ListExternalLocationsResponse ¶
type ListExternalLocationsResponse struct {
// An array of external locations.
ExternalLocations []ExternalLocationInfo `json:"external_locations,omitempty"`
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListExternalLocationsResponse) MarshalJSON ¶ added in v0.29.0
func (s ListExternalLocationsResponse) MarshalJSON() ([]byte, error)
func (*ListExternalLocationsResponse) UnmarshalJSON ¶ added in v0.29.0
func (s *ListExternalLocationsResponse) UnmarshalJSON(b []byte) error
type ListExternalMetadataRequest ¶ added in v0.74.0
type ListExternalMetadataRequest struct {
// Specifies the maximum number of external metadata objects to return in a
// single response. The value must be less than or equal to 1000.
PageSize int `json:"-" url:"page_size,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListExternalMetadataRequest) MarshalJSON ¶ added in v0.74.0
func (s ListExternalMetadataRequest) MarshalJSON() ([]byte, error)
func (*ListExternalMetadataRequest) UnmarshalJSON ¶ added in v0.74.0
func (s *ListExternalMetadataRequest) UnmarshalJSON(b []byte) error
type ListExternalMetadataResponse ¶ added in v0.74.0
type ListExternalMetadataResponse struct {
ExternalMetadata []ExternalMetadata `json:"external_metadata,omitempty"`
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListExternalMetadataResponse) MarshalJSON ¶ added in v0.74.0
func (s ListExternalMetadataResponse) MarshalJSON() ([]byte, error)
func (*ListExternalMetadataResponse) UnmarshalJSON ¶ added in v0.74.0
func (s *ListExternalMetadataResponse) UnmarshalJSON(b []byte) error
type ListFunctionsRequest ¶
type ListFunctionsRequest struct {
// Name of parent catalog for functions of interest.
CatalogName string `json:"-" url:"catalog_name"`
// Whether to include functions in the response for which the principal can
// only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Maximum number of functions to return. If not set, all the functions are
// returned (not recommended). - when set to a value greater than 0, the
// page length is the minimum of this value and a server configured value; -
// when set to 0, the page length is set to a server configured value
// (recommended); - when set to a value less than 0, an invalid parameter
// error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
// Parent schema of functions.
SchemaName string `json:"-" url:"schema_name"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListFunctionsRequest) MarshalJSON ¶ added in v0.29.0
func (s ListFunctionsRequest) MarshalJSON() ([]byte, error)
func (*ListFunctionsRequest) UnmarshalJSON ¶ added in v0.29.0
func (s *ListFunctionsRequest) UnmarshalJSON(b []byte) error
type ListFunctionsResponse ¶
type ListFunctionsResponse struct {
// An array of function information objects.
Functions []FunctionInfo `json:"functions,omitempty"`
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListFunctionsResponse) MarshalJSON ¶ added in v0.29.0
func (s ListFunctionsResponse) MarshalJSON() ([]byte, error)
func (*ListFunctionsResponse) UnmarshalJSON ¶ added in v0.29.0
func (s *ListFunctionsResponse) UnmarshalJSON(b []byte) error
type ListMetastoresRequest ¶ added in v0.72.0
type ListMetastoresRequest struct {
// Maximum number of metastores to return. - when set to a value greater
// than 0, the page length is the minimum of this value and a server
// configured value; - when set to 0, the page length is set to a server
// configured value (recommended); - when set to a value less than 0, an
// invalid parameter error is returned; - If not set, all the metastores are
// returned (not recommended). - Note: The number of returned metastores
// might be less than the specified max_results size, even zero. The only
// definitive indication that no further metastores can be fetched is when
// the next_page_token is unset from the response.
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListMetastoresRequest) MarshalJSON ¶ added in v0.72.0
func (s ListMetastoresRequest) MarshalJSON() ([]byte, error)
func (*ListMetastoresRequest) UnmarshalJSON ¶ added in v0.72.0
func (s *ListMetastoresRequest) UnmarshalJSON(b []byte) error
type ListMetastoresResponse ¶
type ListMetastoresResponse struct {
// An array of metastore information objects.
Metastores []MetastoreInfo `json:"metastores,omitempty"`
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListMetastoresResponse) MarshalJSON ¶ added in v0.72.0
func (s ListMetastoresResponse) MarshalJSON() ([]byte, error)
func (*ListMetastoresResponse) UnmarshalJSON ¶ added in v0.72.0
func (s *ListMetastoresResponse) UnmarshalJSON(b []byte) error
type ListModelVersionsRequest ¶ added in v0.18.0
type ListModelVersionsRequest struct {
// The full three-level name of the registered model under which to list
// model versions
FullName string `json:"-" url:"-"`
// Whether to include model versions in the response for which the principal
// can only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Maximum number of model versions to return. If not set, the page length
// is set to a server configured value (100, as of 1/3/2024). - when set to
// a value greater than 0, the page length is the minimum of this value and
// a server configured value(1000, as of 1/3/2024); - when set to 0, the
// page length is set to a server configured value (100, as of 1/3/2024)
// (recommended); - when set to a value less than 0, an invalid parameter
// error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListModelVersionsRequest) MarshalJSON ¶ added in v0.23.0
func (s ListModelVersionsRequest) MarshalJSON() ([]byte, error)
func (*ListModelVersionsRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *ListModelVersionsRequest) UnmarshalJSON(b []byte) error
type ListModelVersionsResponse ¶ added in v0.18.0
type ListModelVersionsResponse struct {
ModelVersions []ModelVersionInfo `json:"model_versions,omitempty"`
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListModelVersionsResponse) MarshalJSON ¶ added in v0.23.0
func (s ListModelVersionsResponse) MarshalJSON() ([]byte, error)
func (*ListModelVersionsResponse) UnmarshalJSON ¶ added in v0.23.0
func (s *ListModelVersionsResponse) UnmarshalJSON(b []byte) error
type ListPoliciesRequest ¶ added in v0.80.0
type ListPoliciesRequest struct {
// Optional. Whether to include policies defined on parent securables. By
// default, the inherited policies are not included.
IncludeInherited bool `json:"-" url:"include_inherited,omitempty"`
// Optional. Maximum number of policies to return on a single page (page
// length). - When not set or set to 0, the page length is set to a server
// configured value (recommended); - When set to a value greater than 0, the
// page length is the minimum of this value and a server configured value;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Required. The fully qualified name of securable to list policies for.
OnSecurableFullname string `json:"-" url:"-"`
// Required. The type of the securable to list policies for.
OnSecurableType string `json:"-" url:"-"`
// Optional. Opaque pagination token to go to next page based on previous
// query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListPoliciesRequest) MarshalJSON ¶ added in v0.80.0
func (s ListPoliciesRequest) MarshalJSON() ([]byte, error)
func (*ListPoliciesRequest) UnmarshalJSON ¶ added in v0.80.0
func (s *ListPoliciesRequest) UnmarshalJSON(b []byte) error
type ListPoliciesResponse ¶ added in v0.80.0
type ListPoliciesResponse struct {
// Optional opaque token for continuing pagination. `page_token` should be
// set to this value for the next request to retrieve the next page of
// results.
NextPageToken string `json:"next_page_token,omitempty"`
// The list of retrieved policies.
Policies []PolicyInfo `json:"policies,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListPoliciesResponse) MarshalJSON ¶ added in v0.80.0
func (s ListPoliciesResponse) MarshalJSON() ([]byte, error)
func (*ListPoliciesResponse) UnmarshalJSON ¶ added in v0.80.0
func (s *ListPoliciesResponse) UnmarshalJSON(b []byte) error
type ListQuotasRequest ¶ added in v0.45.0
type ListQuotasRequest struct {
// The number of quotas to return.
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque token for the next page of results.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListQuotasRequest) MarshalJSON ¶ added in v0.45.0
func (s ListQuotasRequest) MarshalJSON() ([]byte, error)
func (*ListQuotasRequest) UnmarshalJSON ¶ added in v0.45.0
func (s *ListQuotasRequest) UnmarshalJSON(b []byte) error
type ListQuotasResponse ¶ added in v0.45.0
type ListQuotasResponse struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request.
NextPageToken string `json:"next_page_token,omitempty"`
// An array of returned QuotaInfos.
Quotas []QuotaInfo `json:"quotas,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListQuotasResponse) MarshalJSON ¶ added in v0.45.0
func (s ListQuotasResponse) MarshalJSON() ([]byte, error)
func (*ListQuotasResponse) UnmarshalJSON ¶ added in v0.45.0
func (s *ListQuotasResponse) UnmarshalJSON(b []byte) error
type ListRefreshesRequest ¶ added in v0.31.0
type ListRefreshesRequest struct {
// UC table name in format `catalog.schema.table_name`. table_name is case
// insensitive and spaces are disallowed.
TableName string `json:"-" url:"-"`
}
type ListRegisteredModelsRequest ¶ added in v0.18.0
type ListRegisteredModelsRequest struct {
// The identifier of the catalog under which to list registered models. If
// specified, schema_name must be specified.
CatalogName string `json:"-" url:"catalog_name,omitempty"`
// Whether to include registered models in the response for which the
// principal can only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Max number of registered models to return.
//
// If both catalog and schema are specified: - when max_results is not
// specified, the page length is set to a server configured value (10000, as
// of 4/2/2024). - when set to a value greater than 0, the page length is
// the minimum of this value and a server configured value (10000, as of
// 4/2/2024); - when set to 0, the page length is set to a server configured
// value (10000, as of 4/2/2024); - when set to a value less than 0, an
// invalid parameter error is returned;
//
// If neither schema nor catalog is specified: - when max_results is not
// specified, the page length is set to a server configured value (100, as
// of 4/2/2024). - when set to a value greater than 0, the page length is
// the minimum of this value and a server configured value (1000, as of
// 4/2/2024); - when set to 0, the page length is set to a server configured
// value (100, as of 4/2/2024); - when set to a value less than 0, an
// invalid parameter error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque token to send for the next page of results (pagination).
PageToken string `json:"-" url:"page_token,omitempty"`
// The identifier of the schema under which to list registered models. If
// specified, catalog_name must be specified.
SchemaName string `json:"-" url:"schema_name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListRegisteredModelsRequest) MarshalJSON ¶ added in v0.23.0
func (s ListRegisteredModelsRequest) MarshalJSON() ([]byte, error)
func (*ListRegisteredModelsRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *ListRegisteredModelsRequest) UnmarshalJSON(b []byte) error
type ListRegisteredModelsResponse ¶ added in v0.18.0
type ListRegisteredModelsResponse struct {
// Opaque token for pagination. Omitted if there are no more results.
// page_token should be set to this value for fetching the next page.
NextPageToken string `json:"next_page_token,omitempty"`
RegisteredModels []RegisteredModelInfo `json:"registered_models,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListRegisteredModelsResponse) MarshalJSON ¶ added in v0.23.0
func (s ListRegisteredModelsResponse) MarshalJSON() ([]byte, error)
func (*ListRegisteredModelsResponse) UnmarshalJSON ¶ added in v0.23.0
func (s *ListRegisteredModelsResponse) UnmarshalJSON(b []byte) error
type ListSchemasRequest ¶
type ListSchemasRequest struct {
// Parent catalog for schemas of interest.
CatalogName string `json:"-" url:"catalog_name"`
// Whether to include schemas in the response for which the principal can
// only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Maximum number of schemas to return. If not set, all the schemas are
// returned (not recommended). - when set to a value greater than 0, the
// page length is the minimum of this value and a server configured value; -
// when set to 0, the page length is set to a server configured value
// (recommended); - when set to a value less than 0, an invalid parameter
// error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListSchemasRequest) MarshalJSON ¶ added in v0.29.0
func (s ListSchemasRequest) MarshalJSON() ([]byte, error)
func (*ListSchemasRequest) UnmarshalJSON ¶ added in v0.29.0
func (s *ListSchemasRequest) UnmarshalJSON(b []byte) error
type ListSchemasResponse ¶
type ListSchemasResponse struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
// An array of schema information objects.
Schemas []SchemaInfo `json:"schemas,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListSchemasResponse) MarshalJSON ¶ added in v0.29.0
func (s ListSchemasResponse) MarshalJSON() ([]byte, error)
func (*ListSchemasResponse) UnmarshalJSON ¶ added in v0.29.0
func (s *ListSchemasResponse) UnmarshalJSON(b []byte) error
type ListStorageCredentialsRequest ¶ added in v0.29.0
type ListStorageCredentialsRequest struct {
// Whether to include credentials not bound to the workspace. Effective only
// if the user has permission to update the credential–workspace binding.
IncludeUnbound bool `json:"-" url:"include_unbound,omitempty"`
// Maximum number of storage credentials to return. If not set, all the
// storage credentials are returned (not recommended). - when set to a value
// greater than 0, the page length is the minimum of this value and a server
// configured value; - when set to 0, the page length is set to a server
// configured value (recommended); - when set to a value less than 0, an
// invalid parameter error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListStorageCredentialsRequest) MarshalJSON ¶ added in v0.29.0
func (s ListStorageCredentialsRequest) MarshalJSON() ([]byte, error)
func (*ListStorageCredentialsRequest) UnmarshalJSON ¶ added in v0.29.0
func (s *ListStorageCredentialsRequest) UnmarshalJSON(b []byte) error
type ListStorageCredentialsResponse ¶ added in v0.9.0
type ListStorageCredentialsResponse struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
StorageCredentials []StorageCredentialInfo `json:"storage_credentials,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListStorageCredentialsResponse) MarshalJSON ¶ added in v0.29.0
func (s ListStorageCredentialsResponse) MarshalJSON() ([]byte, error)
func (*ListStorageCredentialsResponse) UnmarshalJSON ¶ added in v0.29.0
func (s *ListStorageCredentialsResponse) UnmarshalJSON(b []byte) error
type ListSummariesRequest ¶
type ListSummariesRequest struct {
// Name of parent catalog for tables of interest.
CatalogName string `json:"-" url:"catalog_name"`
// Whether to include a manifest containing table capabilities in the
// response.
IncludeManifestCapabilities bool `json:"-" url:"include_manifest_capabilities,omitempty"`
// Maximum number of summaries for tables to return. If not set, the page
// length is set to a server configured value (10000, as of 1/5/2024). -
// when set to a value greater than 0, the page length is the minimum of
// this value and a server configured value (10000, as of 1/5/2024); - when
// set to 0, the page length is set to a server configured value (10000, as
// of 1/5/2024) (recommended); - when set to a value less than 0, an invalid
// parameter error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
// A sql LIKE pattern (% and _) for schema names. All schemas will be
// returned if not set or empty.
SchemaNamePattern string `json:"-" url:"schema_name_pattern,omitempty"`
// A sql LIKE pattern (% and _) for table names. All tables will be returned
// if not set or empty.
TableNamePattern string `json:"-" url:"table_name_pattern,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListSummariesRequest) MarshalJSON ¶ added in v0.23.0
func (s ListSummariesRequest) MarshalJSON() ([]byte, error)
func (*ListSummariesRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *ListSummariesRequest) UnmarshalJSON(b []byte) error
type ListSystemSchemasRequest ¶ added in v0.10.0
type ListSystemSchemasRequest struct {
// Maximum number of schemas to return. - When set to 0, the page length is
// set to a server configured value (recommended); - When set to a value
// greater than 0, the page length is the minimum of this value and a server
// configured value; - When set to a value less than 0, an invalid parameter
// error is returned; - If not set, all the schemas are returned (not
// recommended).
MaxResults int `json:"-" url:"max_results,omitempty"`
// The ID for the metastore in which the system schema resides.
MetastoreId string `json:"-" url:"-"`
// Opaque pagination token to go to next page based on previous query.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListSystemSchemasRequest) MarshalJSON ¶ added in v0.44.0
func (s ListSystemSchemasRequest) MarshalJSON() ([]byte, error)
func (*ListSystemSchemasRequest) UnmarshalJSON ¶ added in v0.44.0
func (s *ListSystemSchemasRequest) UnmarshalJSON(b []byte) error
type ListSystemSchemasResponse ¶ added in v0.10.0
type ListSystemSchemasResponse struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
// An array of system schema information objects.
Schemas []SystemSchemaInfo `json:"schemas,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListSystemSchemasResponse) MarshalJSON ¶ added in v0.44.0
func (s ListSystemSchemasResponse) MarshalJSON() ([]byte, error)
func (*ListSystemSchemasResponse) UnmarshalJSON ¶ added in v0.44.0
func (s *ListSystemSchemasResponse) UnmarshalJSON(b []byte) error
type ListTableSummariesResponse ¶
type ListTableSummariesResponse struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
// List of table summaries.
Tables []TableSummary `json:"tables,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListTableSummariesResponse) MarshalJSON ¶ added in v0.23.0
func (s ListTableSummariesResponse) MarshalJSON() ([]byte, error)
func (*ListTableSummariesResponse) UnmarshalJSON ¶ added in v0.23.0
func (s *ListTableSummariesResponse) UnmarshalJSON(b []byte) error
type ListTablesRequest ¶
type ListTablesRequest struct {
// Name of parent catalog for tables of interest.
CatalogName string `json:"-" url:"catalog_name"`
// Whether to include tables in the response for which the principal can
// only access selective metadata for.
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Whether to include a manifest containing table capabilities in the
// response.
IncludeManifestCapabilities bool `json:"-" url:"include_manifest_capabilities,omitempty"`
// Maximum number of tables to return. If not set, all the tables are
// returned (not recommended). - when set to a value greater than 0, the
// page length is the minimum of this value and a server configured value; -
// when set to 0, the page length is set to a server configured value
// (recommended); - when set to a value less than 0, an invalid parameter
// error is returned;
MaxResults int `json:"-" url:"max_results,omitempty"`
// Whether to omit the columns of the table from the response or not.
OmitColumns bool `json:"-" url:"omit_columns,omitempty"`
// Whether to omit the properties of the table from the response or not.
OmitProperties bool `json:"-" url:"omit_properties,omitempty"`
// Whether to omit the username of the table (e.g. owner, updated_by,
// created_by) from the response or not.
OmitUsername bool `json:"-" url:"omit_username,omitempty"`
// Opaque token to send for the next page of results (pagination).
PageToken string `json:"-" url:"page_token,omitempty"`
// Parent schema of tables.
SchemaName string `json:"-" url:"schema_name"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListTablesRequest) MarshalJSON ¶ added in v0.23.0
func (s ListTablesRequest) MarshalJSON() ([]byte, error)
func (*ListTablesRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *ListTablesRequest) UnmarshalJSON(b []byte) error
type ListTablesResponse ¶
type ListTablesResponse struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request (for the next page of results).
NextPageToken string `json:"next_page_token,omitempty"`
// An array of table information objects.
Tables []TableInfo `json:"tables,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListTablesResponse) MarshalJSON ¶ added in v0.23.0
func (s ListTablesResponse) MarshalJSON() ([]byte, error)
func (*ListTablesResponse) UnmarshalJSON ¶ added in v0.23.0
func (s *ListTablesResponse) UnmarshalJSON(b []byte) error
type ListVolumesRequest ¶
type ListVolumesRequest struct {
// The identifier of the catalog
CatalogName string `json:"-" url:"catalog_name"`
// Whether to include volumes in the response for which the principal can
// only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// Maximum number of volumes to return (page length).
//
// If not set, the page length is set to a server configured value (10000,
// as of 1/29/2024). - when set to a value greater than 0, the page length
// is the minimum of this value and a server configured value (10000, as of
// 1/29/2024); - when set to 0, the page length is set to a server
// configured value (10000, as of 1/29/2024) (recommended); - when set to a
// value less than 0, an invalid parameter error is returned;
//
// Note: this parameter controls only the maximum number of volumes to
// return. The actual number of volumes returned in a page may be smaller
// than this value, including 0, even if there are more pages.
MaxResults int `json:"-" url:"max_results,omitempty"`
// Opaque token returned by a previous request. It must be included in the
// request to retrieve the next page of results (pagination).
PageToken string `json:"-" url:"page_token,omitempty"`
// The identifier of the schema
SchemaName string `json:"-" url:"schema_name"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListVolumesRequest) MarshalJSON ¶ added in v0.32.0
func (s ListVolumesRequest) MarshalJSON() ([]byte, error)
func (*ListVolumesRequest) UnmarshalJSON ¶ added in v0.32.0
func (s *ListVolumesRequest) UnmarshalJSON(b []byte) error
type ListVolumesResponseContent ¶
type ListVolumesResponseContent struct {
// Opaque token to retrieve the next page of results. Absent if there are no
// more pages. __page_token__ should be set to this value for the next
// request to retrieve the next page of results.
NextPageToken string `json:"next_page_token,omitempty"`
Volumes []VolumeInfo `json:"volumes,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListVolumesResponseContent) MarshalJSON ¶ added in v0.32.0
func (s ListVolumesResponseContent) MarshalJSON() ([]byte, error)
func (*ListVolumesResponseContent) UnmarshalJSON ¶ added in v0.32.0
func (s *ListVolumesResponseContent) UnmarshalJSON(b []byte) error
type MatchColumn ¶ added in v0.80.0
type MatchColumn struct {
// Optional alias of the matched column.
Alias string `json:"alias,omitempty"`
// The condition expression used to match a table column.
Condition string `json:"condition,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (MatchColumn) MarshalJSON ¶ added in v0.80.0
func (s MatchColumn) MarshalJSON() ([]byte, error)
func (*MatchColumn) UnmarshalJSON ¶ added in v0.80.0
func (s *MatchColumn) UnmarshalJSON(b []byte) error
type MatchType ¶ added in v0.17.0
type MatchType string
The artifact pattern matching type
const MatchTypePrefixMatch MatchType = `PREFIX_MATCH`
func (*MatchType) Set ¶ added in v0.17.0
Set raw string value and validate it against allowed values
type MetastoreAssignment ¶
type MetastoreAssignment struct {
// The name of the default catalog in the metastore. This field is
// deprecated. Please use "Default Namespace API" to configure the default
// catalog for a Databricks workspace.
DefaultCatalogName string `json:"default_catalog_name,omitempty"`
// The unique ID of the metastore.
MetastoreId string `json:"metastore_id"`
// The unique ID of the Databricks workspace.
WorkspaceId int64 `json:"workspace_id"`
ForceSendFields []string `json:"-" url:"-"`
}
func (MetastoreAssignment) MarshalJSON ¶ added in v0.23.0
func (s MetastoreAssignment) MarshalJSON() ([]byte, error)
func (*MetastoreAssignment) UnmarshalJSON ¶ added in v0.23.0
func (s *MetastoreAssignment) UnmarshalJSON(b []byte) error
type MetastoreInfo ¶
type MetastoreInfo struct {
// Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`).
Cloud string `json:"cloud,omitempty"`
// Time at which this metastore was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of metastore creator.
CreatedBy string `json:"created_by,omitempty"`
// Unique identifier of the metastore's (Default) Data Access Configuration.
DefaultDataAccessConfigId string `json:"default_data_access_config_id,omitempty"`
// The organization name of a Delta Sharing entity, to be used in
// Databricks-to-Databricks Delta Sharing as the official name.
DeltaSharingOrganizationName string `json:"delta_sharing_organization_name,omitempty"`
// The lifetime of delta sharing recipient token in seconds.
DeltaSharingRecipientTokenLifetimeInSeconds int64 `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
// The scope of Delta Sharing enabled for the metastore.
DeltaSharingScope DeltaSharingScopeEnum `json:"delta_sharing_scope,omitempty"`
// Whether to allow non-DBR clients to directly access entities under the
// metastore.
ExternalAccessEnabled bool `json:"external_access_enabled,omitempty"`
// Globally unique metastore ID across clouds and regions, of the form
// `cloud:region:metastore_id`.
GlobalMetastoreId string `json:"global_metastore_id,omitempty"`
// Unique identifier of metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// The user-specified name of the metastore.
Name string `json:"name,omitempty"`
// The owner of the metastore.
Owner string `json:"owner,omitempty"`
// Privilege model version of the metastore, of the form `major.minor`
// (e.g., `1.0`).
PrivilegeModelVersion string `json:"privilege_model_version,omitempty"`
// Cloud region which the metastore serves (e.g., `us-west-2`, `westus`).
Region string `json:"region,omitempty"`
// The storage root URL for metastore
StorageRoot string `json:"storage_root,omitempty"`
// UUID of storage credential to access the metastore storage_root.
StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
// Name of the storage credential to access the metastore storage_root.
StorageRootCredentialName string `json:"storage_root_credential_name,omitempty"`
// Time at which the metastore was last modified, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified the metastore.
UpdatedBy string `json:"updated_by,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (MetastoreInfo) MarshalJSON ¶ added in v0.23.0
func (s MetastoreInfo) MarshalJSON() ([]byte, error)
func (*MetastoreInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *MetastoreInfo) UnmarshalJSON(b []byte) error
type MetastoresAPI ¶
type MetastoresAPI struct {
// contains filtered or unexported fields
}
A metastore is the top-level container of objects in Unity Catalog. It stores data assets (tables and views) and the permissions that govern access to them. Databricks account admins can create metastores and assign them to Databricks workspaces to control which workloads use each metastore. For a workspace to use Unity Catalog, it must have a Unity Catalog metastore attached.
Each metastore is configured with a root storage location in a cloud storage account. This storage location is used for metadata and managed tables data.
NOTE: This metastore is distinct from the metastore included in Databricks workspaces created before Unity Catalog was released. If your workspace includes a legacy Hive metastore, the data in that metastore is available in a catalog named hive_metastore.
func NewMetastores ¶
func NewMetastores(client *client.DatabricksClient) *MetastoresAPI
func (*MetastoresAPI) Assign ¶
func (a *MetastoresAPI) Assign(ctx context.Context, request CreateMetastoreAssignment) error
Example (Metastores) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
workspaceId := func(v string) int64 {
i, err := strconv.ParseInt(v, 10, 64)
if err != nil {
panic(fmt.Sprintf("`%s` is not int64: %s", v, err))
}
return i
}(os.Getenv("DUMMY_WORKSPACE_ID"))
created, err := w.Metastores.Create(ctx, catalog.CreateMetastore{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
StorageRoot: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
err = w.Metastores.Assign(ctx, catalog.CreateMetastoreAssignment{
MetastoreId: created.MetastoreId,
WorkspaceId: workspaceId,
})
if err != nil {
panic(err)
}
// cleanup
err = w.Metastores.Delete(ctx, catalog.DeleteMetastoreRequest{
Id: created.MetastoreId,
Force: true,
})
if err != nil {
panic(err)
}
func (*MetastoresAPI) Create ¶
func (a *MetastoresAPI) Create(ctx context.Context, request CreateMetastore) (*MetastoreInfo, error)
Example (Metastores) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Metastores.Create(ctx, catalog.CreateMetastore{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
StorageRoot: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
// cleanup
err = w.Metastores.Delete(ctx, catalog.DeleteMetastoreRequest{
Id: created.MetastoreId,
Force: true,
})
if err != nil {
panic(err)
}
func (*MetastoresAPI) Current ¶
func (a *MetastoresAPI) Current(ctx context.Context) (*MetastoreAssignment, error)
Example (Metastores) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
currentMetastore, err := w.Metastores.Current(ctx)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", currentMetastore)
func (*MetastoresAPI) Delete ¶
func (a *MetastoresAPI) Delete(ctx context.Context, request DeleteMetastoreRequest) error
func (*MetastoresAPI) DeleteById ¶
func (a *MetastoresAPI) DeleteById(ctx context.Context, id string) error
Deletes a metastore. The caller must be a metastore admin.
func (*MetastoresAPI) Get ¶
func (a *MetastoresAPI) Get(ctx context.Context, request GetMetastoreRequest) (*MetastoreInfo, error)
Example (Metastores) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Metastores.Create(ctx, catalog.CreateMetastore{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
StorageRoot: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.Metastores.GetById(ctx, created.MetastoreId)
if err != nil {
panic(err)
}
// cleanup
err = w.Metastores.Delete(ctx, catalog.DeleteMetastoreRequest{
Id: created.MetastoreId,
Force: true,
})
if err != nil {
panic(err)
}
func (*MetastoresAPI) GetById ¶
func (a *MetastoresAPI) GetById(ctx context.Context, id string) (*MetastoreInfo, error)
Gets a metastore that matches the supplied ID. The caller must be a metastore admin to retrieve this info.
func (*MetastoresAPI) List ¶ added in v0.24.0
func (a *MetastoresAPI) List(ctx context.Context, request ListMetastoresRequest) listing.Iterator[MetastoreInfo]
Gets an array of the available metastores (as __MetastoreInfo__ objects). The caller must be an admin to retrieve this info. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (Metastores) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
all, err := w.Metastores.ListAll(ctx, catalog.ListMetastoresRequest{})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", all)
func (*MetastoresAPI) ListAll ¶
func (a *MetastoresAPI) ListAll(ctx context.Context, request ListMetastoresRequest) ([]MetastoreInfo, error)
Gets an array of the available metastores (as __MetastoreInfo__ objects). The caller must be an admin to retrieve this info. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*MetastoresAPI) Summary ¶
func (a *MetastoresAPI) Summary(ctx context.Context) (*GetMetastoreSummaryResponse, error)
Example (Metastores) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
summary, err := w.Metastores.Summary(ctx)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", summary)
func (*MetastoresAPI) Unassign ¶
func (a *MetastoresAPI) Unassign(ctx context.Context, request UnassignRequest) error
Example (Metastores) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
workspaceId := func(v string) int64 {
i, err := strconv.ParseInt(v, 10, 64)
if err != nil {
panic(fmt.Sprintf("`%s` is not int64: %s", v, err))
}
return i
}(os.Getenv("DUMMY_WORKSPACE_ID"))
created, err := w.Metastores.Create(ctx, catalog.CreateMetastore{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
StorageRoot: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
err = w.Metastores.Unassign(ctx, catalog.UnassignRequest{
MetastoreId: created.MetastoreId,
WorkspaceId: workspaceId,
})
if err != nil {
panic(err)
}
// cleanup
err = w.Metastores.Delete(ctx, catalog.DeleteMetastoreRequest{
Id: created.MetastoreId,
Force: true,
})
if err != nil {
panic(err)
}
func (*MetastoresAPI) UnassignByWorkspaceId ¶
func (a *MetastoresAPI) UnassignByWorkspaceId(ctx context.Context, workspaceId int64) error
Deletes a metastore assignment. The caller must be an account administrator.
func (*MetastoresAPI) Update ¶
func (a *MetastoresAPI) Update(ctx context.Context, request UpdateMetastore) (*MetastoreInfo, error)
Example (Metastores) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Metastores.Create(ctx, catalog.CreateMetastore{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
StorageRoot: fmt.Sprintf("s3://%s/%s", os.Getenv("TEST_BUCKET"), fmt.Sprintf("sdk-%x", time.Now().UnixNano())),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.Metastores.Update(ctx, catalog.UpdateMetastore{
Id: created.MetastoreId,
NewName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
// cleanup
err = w.Metastores.Delete(ctx, catalog.DeleteMetastoreRequest{
Id: created.MetastoreId,
Force: true,
})
if err != nil {
panic(err)
}
func (*MetastoresAPI) UpdateAssignment ¶
func (a *MetastoresAPI) UpdateAssignment(ctx context.Context, request UpdateMetastoreAssignment) error
type MetastoresInterface ¶ added in v0.29.0
type MetastoresInterface interface {
// Creates a new metastore assignment. If an assignment for the same
// __workspace_id__ exists, it will be overwritten by the new __metastore_id__
// and __default_catalog_name__. The caller must be an account admin.
Assign(ctx context.Context, request CreateMetastoreAssignment) error
// Creates a new metastore based on a provided name and optional storage root
// path. By default (if the __owner__ field is not set), the owner of the new
// metastore is the user calling the __createMetastore__ API. If the __owner__
// field is set to the empty string (**""**), the ownership is assigned to the
// System User instead.
Create(ctx context.Context, request CreateMetastore) (*MetastoreInfo, error)
// Gets the metastore assignment for the workspace being accessed.
Current(ctx context.Context) (*MetastoreAssignment, error)
// Deletes a metastore. The caller must be a metastore admin.
Delete(ctx context.Context, request DeleteMetastoreRequest) error
// Deletes a metastore. The caller must be a metastore admin.
DeleteById(ctx context.Context, id string) error
// Gets a metastore that matches the supplied ID. The caller must be a metastore
// admin to retrieve this info.
Get(ctx context.Context, request GetMetastoreRequest) (*MetastoreInfo, error)
// Gets a metastore that matches the supplied ID. The caller must be a metastore
// admin to retrieve this info.
GetById(ctx context.Context, id string) (*MetastoreInfo, error)
// Gets an array of the available metastores (as __MetastoreInfo__ objects). The
// caller must be an admin to retrieve this info. There is no guarantee of a
// specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListMetastoresRequest) listing.Iterator[MetastoreInfo]
// Gets an array of the available metastores (as __MetastoreInfo__ objects). The
// caller must be an admin to retrieve this info. There is no guarantee of a
// specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListMetastoresRequest) ([]MetastoreInfo, error)
// Gets information about a metastore. This summary includes the storage
// credential, the cloud vendor, the cloud region, and the global metastore ID.
Summary(ctx context.Context) (*GetMetastoreSummaryResponse, error)
// Deletes a metastore assignment. The caller must be an account administrator.
Unassign(ctx context.Context, request UnassignRequest) error
// Deletes a metastore assignment. The caller must be an account administrator.
UnassignByWorkspaceId(ctx context.Context, workspaceId int64) error
// Updates information for a specific metastore. The caller must be a metastore
// admin. If the __owner__ field is set to the empty string (**""**), the
// ownership is updated to the System User.
Update(ctx context.Context, request UpdateMetastore) (*MetastoreInfo, error)
// Updates a metastore assignment. This operation can be used to update
// __metastore_id__ or __default_catalog_name__ for a specified Workspace, if
// the Workspace is already assigned a metastore. The caller must be an account
// admin to update __metastore_id__; otherwise, the caller can be a Workspace
// admin.
UpdateAssignment(ctx context.Context, request UpdateMetastoreAssignment) error
}
type MetastoresService
deprecated
type MetastoresService interface {
// Creates a new metastore assignment. If an assignment for the same
// __workspace_id__ exists, it will be overwritten by the new
// __metastore_id__ and __default_catalog_name__. The caller must be an
// account admin.
Assign(ctx context.Context, request CreateMetastoreAssignment) error
// Creates a new metastore based on a provided name and optional storage
// root path. By default (if the __owner__ field is not set), the owner of
// the new metastore is the user calling the __createMetastore__ API. If the
// __owner__ field is set to the empty string (**""**), the ownership is
// assigned to the System User instead.
Create(ctx context.Context, request CreateMetastore) (*MetastoreInfo, error)
// Gets the metastore assignment for the workspace being accessed.
Current(ctx context.Context) (*MetastoreAssignment, error)
// Deletes a metastore. The caller must be a metastore admin.
Delete(ctx context.Context, request DeleteMetastoreRequest) error
// Gets a metastore that matches the supplied ID. The caller must be a
// metastore admin to retrieve this info.
Get(ctx context.Context, request GetMetastoreRequest) (*MetastoreInfo, error)
// Gets an array of the available metastores (as __MetastoreInfo__ objects).
// The caller must be an admin to retrieve this info. There is no guarantee
// of a specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListMetastoresRequest) (*ListMetastoresResponse, error)
// Gets information about a metastore. This summary includes the storage
// credential, the cloud vendor, the cloud region, and the global metastore
// ID.
Summary(ctx context.Context) (*GetMetastoreSummaryResponse, error)
// Deletes a metastore assignment. The caller must be an account
// administrator.
Unassign(ctx context.Context, request UnassignRequest) error
// Updates information for a specific metastore. The caller must be a
// metastore admin. If the __owner__ field is set to the empty string
// (**""**), the ownership is updated to the System User.
Update(ctx context.Context, request UpdateMetastore) (*MetastoreInfo, error)
// Updates a metastore assignment. This operation can be used to update
// __metastore_id__ or __default_catalog_name__ for a specified Workspace,
// if the Workspace is already assigned a metastore. The caller must be an
// account admin to update __metastore_id__; otherwise, the caller can be a
// Workspace admin.
UpdateAssignment(ctx context.Context, request UpdateMetastoreAssignment) error
}
A metastore is the top-level container of objects in Unity Catalog. It stores data assets (tables and views) and the permissions that govern access to them. Databricks account admins can create metastores and assign them to Databricks workspaces to control which workloads use each metastore. For a workspace to use Unity Catalog, it must have a Unity Catalog metastore attached.
Each metastore is configured with a root storage location in a cloud storage account. This storage location is used for metadata and managed tables data.
NOTE: This metastore is distinct from the metastore included in Databricks workspaces created before Unity Catalog was released. If your workspace includes a legacy Hive metastore, the data in that metastore is available in a catalog named hive_metastore.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type ModelVersionInfo ¶ added in v0.18.0
type ModelVersionInfo struct {
// List of aliases associated with the model version
Aliases []RegisteredModelAlias `json:"aliases,omitempty"`
// The name of the catalog containing the model version
CatalogName string `json:"catalog_name,omitempty"`
// The comment attached to the model version
Comment string `json:"comment,omitempty"`
CreatedAt int64 `json:"created_at,omitempty"`
// The identifier of the user who created the model version
CreatedBy string `json:"created_by,omitempty"`
// The unique identifier of the model version
Id string `json:"id,omitempty"`
// The unique identifier of the metastore containing the model version
MetastoreId string `json:"metastore_id,omitempty"`
// The name of the parent registered model of the model version, relative to
// parent schema
ModelName string `json:"model_name,omitempty"`
// Model version dependencies, for feature-store packaged models
ModelVersionDependencies *DependencyList `json:"model_version_dependencies,omitempty"`
// MLflow run ID used when creating the model version, if “source“ was
// generated by an experiment run stored in an MLflow tracking server
RunId string `json:"run_id,omitempty"`
// ID of the Databricks workspace containing the MLflow run that generated
// this model version, if applicable
RunWorkspaceId int `json:"run_workspace_id,omitempty"`
// The name of the schema containing the model version, relative to parent
// catalog
SchemaName string `json:"schema_name,omitempty"`
// URI indicating the location of the source artifacts (files) for the model
// version
Source string `json:"source,omitempty"`
// Current status of the model version. Newly created model versions start
// in PENDING_REGISTRATION status, then move to READY status once the model
// version files are uploaded and the model version is finalized. Only model
// versions in READY status can be loaded for inference or served.
Status ModelVersionInfoStatus `json:"status,omitempty"`
// The storage location on the cloud under which model version data files
// are stored
StorageLocation string `json:"storage_location,omitempty"`
UpdatedAt int64 `json:"updated_at,omitempty"`
// The identifier of the user who updated the model version last time
UpdatedBy string `json:"updated_by,omitempty"`
// Integer model version number, used to reference the model version in API
// requests.
Version int `json:"version,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ModelVersionInfo) MarshalJSON ¶ added in v0.23.0
func (s ModelVersionInfo) MarshalJSON() ([]byte, error)
func (*ModelVersionInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *ModelVersionInfo) UnmarshalJSON(b []byte) error
type ModelVersionInfoStatus ¶ added in v0.18.0
type ModelVersionInfoStatus string
const ModelVersionInfoStatusFailedRegistration ModelVersionInfoStatus = `FAILED_REGISTRATION`
const ModelVersionInfoStatusModelVersionStatusUnknown ModelVersionInfoStatus = `MODEL_VERSION_STATUS_UNKNOWN`
const ModelVersionInfoStatusPendingRegistration ModelVersionInfoStatus = `PENDING_REGISTRATION`
const ModelVersionInfoStatusReady ModelVersionInfoStatus = `READY`
func (*ModelVersionInfoStatus) Set ¶ added in v0.18.0
func (f *ModelVersionInfoStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*ModelVersionInfoStatus) String ¶ added in v0.18.0
func (f *ModelVersionInfoStatus) String() string
String representation for fmt.Print
func (*ModelVersionInfoStatus) Type ¶ added in v0.18.0
func (f *ModelVersionInfoStatus) Type() string
Type always returns ModelVersionInfoStatus to satisfy [pflag.Value] interface
func (*ModelVersionInfoStatus) Values ¶ added in v0.72.0
func (f *ModelVersionInfoStatus) Values() []ModelVersionInfoStatus
Values returns all possible values for ModelVersionInfoStatus.
There is no guarantee on the order of the values in the slice.
type ModelVersionsAPI ¶ added in v0.18.0
type ModelVersionsAPI struct {
// contains filtered or unexported fields
}
Databricks provides a hosted version of MLflow Model Registry in Unity Catalog. Models in Unity Catalog provide centralized access control, auditing, lineage, and discovery of ML models across Databricks workspaces.
This API reference documents the REST endpoints for managing model versions in Unity Catalog. For more details, see the [registered models API docs](/api/workspace/registeredmodels).
func NewModelVersions ¶ added in v0.18.0
func NewModelVersions(client *client.DatabricksClient) *ModelVersionsAPI
func (*ModelVersionsAPI) Delete ¶ added in v0.18.0
func (a *ModelVersionsAPI) Delete(ctx context.Context, request DeleteModelVersionRequest) error
func (*ModelVersionsAPI) DeleteByFullNameAndVersion ¶ added in v0.18.0
func (a *ModelVersionsAPI) DeleteByFullNameAndVersion(ctx context.Context, fullName string, version int) error
Deletes a model version from the specified registered model. Any aliases assigned to the model version will also be deleted.
The caller must be a metastore admin or an owner of the parent registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*ModelVersionsAPI) Get ¶ added in v0.18.0
func (a *ModelVersionsAPI) Get(ctx context.Context, request GetModelVersionRequest) (*ModelVersionInfo, error)
func (*ModelVersionsAPI) GetByAlias ¶ added in v0.18.0
func (a *ModelVersionsAPI) GetByAlias(ctx context.Context, request GetByAliasRequest) (*ModelVersionInfo, error)
func (*ModelVersionsAPI) GetByAliasByFullNameAndAlias ¶ added in v0.18.0
func (a *ModelVersionsAPI) GetByAliasByFullNameAndAlias(ctx context.Context, fullName string, alias string) (*ModelVersionInfo, error)
Get a model version by alias.
The caller must be a metastore admin or an owner of (or have the **EXECUTE** privilege on) the registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*ModelVersionsAPI) GetByFullNameAndVersion ¶ added in v0.18.0
func (a *ModelVersionsAPI) GetByFullNameAndVersion(ctx context.Context, fullName string, version int) (*ModelVersionInfo, error)
Get a model version.
The caller must be a metastore admin or an owner of (or have the **EXECUTE** privilege on) the parent registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*ModelVersionsAPI) List ¶ added in v0.24.0
func (a *ModelVersionsAPI) List(ctx context.Context, request ListModelVersionsRequest) listing.Iterator[ModelVersionInfo]
List model versions. You can list model versions under a particular schema, or list all model versions in the current metastore.
The returned models are filtered based on the privileges of the calling user. For example, the metastore admin is able to list all the model versions. A regular user needs to be the owner or have the **EXECUTE** privilege on the parent registered model to recieve the model versions in the response. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
There is no guarantee of a specific ordering of the elements in the response. The elements in the response will not contain any aliases or tags.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*ModelVersionsAPI) ListAll ¶ added in v0.18.0
func (a *ModelVersionsAPI) ListAll(ctx context.Context, request ListModelVersionsRequest) ([]ModelVersionInfo, error)
List model versions. You can list model versions under a particular schema, or list all model versions in the current metastore.
The returned models are filtered based on the privileges of the calling user. For example, the metastore admin is able to list all the model versions. A regular user needs to be the owner or have the **EXECUTE** privilege on the parent registered model to recieve the model versions in the response. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
There is no guarantee of a specific ordering of the elements in the response. The elements in the response will not contain any aliases or tags.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*ModelVersionsAPI) ListByFullName ¶ added in v0.18.0
func (a *ModelVersionsAPI) ListByFullName(ctx context.Context, fullName string) (*ListModelVersionsResponse, error)
List model versions. You can list model versions under a particular schema, or list all model versions in the current metastore.
The returned models are filtered based on the privileges of the calling user. For example, the metastore admin is able to list all the model versions. A regular user needs to be the owner or have the **EXECUTE** privilege on the parent registered model to recieve the model versions in the response. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
There is no guarantee of a specific ordering of the elements in the response. The elements in the response will not contain any aliases or tags.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*ModelVersionsAPI) Update ¶ added in v0.18.0
func (a *ModelVersionsAPI) Update(ctx context.Context, request UpdateModelVersionRequest) (*ModelVersionInfo, error)
type ModelVersionsInterface ¶ added in v0.29.0
type ModelVersionsInterface interface {
// Deletes a model version from the specified registered model. Any aliases
// assigned to the model version will also be deleted.
//
// The caller must be a metastore admin or an owner of the parent registered
// model. For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
Delete(ctx context.Context, request DeleteModelVersionRequest) error
// Deletes a model version from the specified registered model. Any aliases
// assigned to the model version will also be deleted.
//
// The caller must be a metastore admin or an owner of the parent registered
// model. For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
DeleteByFullNameAndVersion(ctx context.Context, fullName string, version int) error
// Get a model version.
//
// The caller must be a metastore admin or an owner of (or have the **EXECUTE**
// privilege on) the parent registered model. For the latter case, the caller
// must also be the owner or have the **USE_CATALOG** privilege on the parent
// catalog and the **USE_SCHEMA** privilege on the parent schema.
Get(ctx context.Context, request GetModelVersionRequest) (*ModelVersionInfo, error)
// Get a model version.
//
// The caller must be a metastore admin or an owner of (or have the **EXECUTE**
// privilege on) the parent registered model. For the latter case, the caller
// must also be the owner or have the **USE_CATALOG** privilege on the parent
// catalog and the **USE_SCHEMA** privilege on the parent schema.
GetByFullNameAndVersion(ctx context.Context, fullName string, version int) (*ModelVersionInfo, error)
// Get a model version by alias.
//
// The caller must be a metastore admin or an owner of (or have the **EXECUTE**
// privilege on) the registered model. For the latter case, the caller must also
// be the owner or have the **USE_CATALOG** privilege on the parent catalog and
// the **USE_SCHEMA** privilege on the parent schema.
GetByAlias(ctx context.Context, request GetByAliasRequest) (*ModelVersionInfo, error)
// Get a model version by alias.
//
// The caller must be a metastore admin or an owner of (or have the **EXECUTE**
// privilege on) the registered model. For the latter case, the caller must also
// be the owner or have the **USE_CATALOG** privilege on the parent catalog and
// the **USE_SCHEMA** privilege on the parent schema.
GetByAliasByFullNameAndAlias(ctx context.Context, fullName string, alias string) (*ModelVersionInfo, error)
// List model versions. You can list model versions under a particular schema,
// or list all model versions in the current metastore.
//
// The returned models are filtered based on the privileges of the calling user.
// For example, the metastore admin is able to list all the model versions. A
// regular user needs to be the owner or have the **EXECUTE** privilege on the
// parent registered model to recieve the model versions in the response. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
//
// There is no guarantee of a specific ordering of the elements in the response.
// The elements in the response will not contain any aliases or tags.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListModelVersionsRequest) listing.Iterator[ModelVersionInfo]
// List model versions. You can list model versions under a particular schema,
// or list all model versions in the current metastore.
//
// The returned models are filtered based on the privileges of the calling user.
// For example, the metastore admin is able to list all the model versions. A
// regular user needs to be the owner or have the **EXECUTE** privilege on the
// parent registered model to recieve the model versions in the response. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
//
// There is no guarantee of a specific ordering of the elements in the response.
// The elements in the response will not contain any aliases or tags.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListModelVersionsRequest) ([]ModelVersionInfo, error)
// List model versions. You can list model versions under a particular schema,
// or list all model versions in the current metastore.
//
// The returned models are filtered based on the privileges of the calling user.
// For example, the metastore admin is able to list all the model versions. A
// regular user needs to be the owner or have the **EXECUTE** privilege on the
// parent registered model to recieve the model versions in the response. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
//
// There is no guarantee of a specific ordering of the elements in the response.
// The elements in the response will not contain any aliases or tags.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
ListByFullName(ctx context.Context, fullName string) (*ListModelVersionsResponse, error)
// Updates the specified model version.
//
// The caller must be a metastore admin or an owner of the parent registered
// model. For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
//
// Currently only the comment of the model version can be updated.
Update(ctx context.Context, request UpdateModelVersionRequest) (*ModelVersionInfo, error)
}
type ModelVersionsService
deprecated
added in
v0.18.0
type ModelVersionsService interface {
// Deletes a model version from the specified registered model. Any aliases
// assigned to the model version will also be deleted.
//
// The caller must be a metastore admin or an owner of the parent registered
// model. For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
Delete(ctx context.Context, request DeleteModelVersionRequest) error
// Get a model version.
//
// The caller must be a metastore admin or an owner of (or have the
// **EXECUTE** privilege on) the parent registered model. For the latter
// case, the caller must also be the owner or have the **USE_CATALOG**
// privilege on the parent catalog and the **USE_SCHEMA** privilege on the
// parent schema.
Get(ctx context.Context, request GetModelVersionRequest) (*ModelVersionInfo, error)
// Get a model version by alias.
//
// The caller must be a metastore admin or an owner of (or have the
// **EXECUTE** privilege on) the registered model. For the latter case, the
// caller must also be the owner or have the **USE_CATALOG** privilege on
// the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
GetByAlias(ctx context.Context, request GetByAliasRequest) (*ModelVersionInfo, error)
// List model versions. You can list model versions under a particular
// schema, or list all model versions in the current metastore.
//
// The returned models are filtered based on the privileges of the calling
// user. For example, the metastore admin is able to list all the model
// versions. A regular user needs to be the owner or have the **EXECUTE**
// privilege on the parent registered model to recieve the model versions in
// the response. For the latter case, the caller must also be the owner or
// have the **USE_CATALOG** privilege on the parent catalog and the
// **USE_SCHEMA** privilege on the parent schema.
//
// There is no guarantee of a specific ordering of the elements in the
// response. The elements in the response will not contain any aliases or
// tags.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain
// zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
List(ctx context.Context, request ListModelVersionsRequest) (*ListModelVersionsResponse, error)
// Updates the specified model version.
//
// The caller must be a metastore admin or an owner of the parent registered
// model. For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
//
// Currently only the comment of the model version can be updated.
Update(ctx context.Context, request UpdateModelVersionRequest) (*ModelVersionInfo, error)
}
Databricks provides a hosted version of MLflow Model Registry in Unity Catalog. Models in Unity Catalog provide centralized access control, auditing, lineage, and discovery of ML models across Databricks workspaces.
This API reference documents the REST endpoints for managing model versions in Unity Catalog. For more details, see the [registered models API docs](/api/workspace/registeredmodels).
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type MonitorCronSchedule ¶ added in v0.30.0
type MonitorCronSchedule struct {
// Read only field that indicates whether a schedule is paused or not.
PauseStatus MonitorCronSchedulePauseStatus `json:"pause_status,omitempty"`
// The expression that determines when to run the monitor. See [examples].
//
// [examples]: https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html
QuartzCronExpression string `json:"quartz_cron_expression"`
// The timezone id (e.g., “PST“) in which to evaluate the quartz
// expression.
TimezoneId string `json:"timezone_id"`
}
type MonitorCronSchedulePauseStatus ¶ added in v0.30.0
type MonitorCronSchedulePauseStatus string
Source link: https://src.dev.databricks.com/databricks/universe/-/blob/elastic-spark-common/api/messages/schedule.proto Monitoring workflow schedule pause status.
const MonitorCronSchedulePauseStatusPaused MonitorCronSchedulePauseStatus = `PAUSED`
const MonitorCronSchedulePauseStatusUnpaused MonitorCronSchedulePauseStatus = `UNPAUSED`
const MonitorCronSchedulePauseStatusUnspecified MonitorCronSchedulePauseStatus = `UNSPECIFIED`
func (*MonitorCronSchedulePauseStatus) Set ¶ added in v0.30.0
func (f *MonitorCronSchedulePauseStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*MonitorCronSchedulePauseStatus) String ¶ added in v0.30.0
func (f *MonitorCronSchedulePauseStatus) String() string
String representation for fmt.Print
func (*MonitorCronSchedulePauseStatus) Type ¶ added in v0.30.0
func (f *MonitorCronSchedulePauseStatus) Type() string
Type always returns MonitorCronSchedulePauseStatus to satisfy [pflag.Value] interface
func (*MonitorCronSchedulePauseStatus) Values ¶ added in v0.72.0
func (f *MonitorCronSchedulePauseStatus) Values() []MonitorCronSchedulePauseStatus
Values returns all possible values for MonitorCronSchedulePauseStatus.
There is no guarantee on the order of the values in the slice.
type MonitorDataClassificationConfig ¶ added in v0.30.0
type MonitorDataClassificationConfig struct {
// Whether to enable data classification.
Enabled bool `json:"enabled,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Data classification related configuration.
func (MonitorDataClassificationConfig) MarshalJSON ¶ added in v0.30.0
func (s MonitorDataClassificationConfig) MarshalJSON() ([]byte, error)
func (*MonitorDataClassificationConfig) UnmarshalJSON ¶ added in v0.30.0
func (s *MonitorDataClassificationConfig) UnmarshalJSON(b []byte) error
type MonitorDestination ¶ added in v0.38.0
type MonitorDestination struct {
// The list of email addresses to send the notification to. A maximum of 5
// email addresses is supported.
EmailAddresses []string `json:"email_addresses,omitempty"`
}
type MonitorInferenceLog ¶ added in v0.38.0
type MonitorInferenceLog struct {
// List of granularities to use when aggregating data into time windows
// based on their timestamp.
Granularities []string `json:"granularities"`
// Column for the label.
LabelCol string `json:"label_col,omitempty"`
// Column for the model identifier.
ModelIdCol string `json:"model_id_col"`
// Column for the prediction.
PredictionCol string `json:"prediction_col"`
// Column for prediction probabilities
PredictionProbaCol string `json:"prediction_proba_col,omitempty"`
// Problem type the model aims to solve.
ProblemType MonitorInferenceLogProblemType `json:"problem_type"`
// Column for the timestamp.
TimestampCol string `json:"timestamp_col"`
ForceSendFields []string `json:"-" url:"-"`
}
func (MonitorInferenceLog) MarshalJSON ¶ added in v0.38.0
func (s MonitorInferenceLog) MarshalJSON() ([]byte, error)
func (*MonitorInferenceLog) UnmarshalJSON ¶ added in v0.38.0
func (s *MonitorInferenceLog) UnmarshalJSON(b []byte) error
type MonitorInferenceLogProblemType ¶ added in v0.38.0
type MonitorInferenceLogProblemType string
const MonitorInferenceLogProblemTypeProblemTypeClassification MonitorInferenceLogProblemType = `PROBLEM_TYPE_CLASSIFICATION`
const MonitorInferenceLogProblemTypeProblemTypeRegression MonitorInferenceLogProblemType = `PROBLEM_TYPE_REGRESSION`
func (*MonitorInferenceLogProblemType) Set ¶ added in v0.38.0
func (f *MonitorInferenceLogProblemType) Set(v string) error
Set raw string value and validate it against allowed values
func (*MonitorInferenceLogProblemType) String ¶ added in v0.38.0
func (f *MonitorInferenceLogProblemType) String() string
String representation for fmt.Print
func (*MonitorInferenceLogProblemType) Type ¶ added in v0.38.0
func (f *MonitorInferenceLogProblemType) Type() string
Type always returns MonitorInferenceLogProblemType to satisfy [pflag.Value] interface
func (*MonitorInferenceLogProblemType) Values ¶ added in v0.72.0
func (f *MonitorInferenceLogProblemType) Values() []MonitorInferenceLogProblemType
Values returns all possible values for MonitorInferenceLogProblemType.
There is no guarantee on the order of the values in the slice.
type MonitorInfo ¶ added in v0.30.0
type MonitorInfo struct {
// [Create:REQ Update:IGN] Field for specifying the absolute path to a
// custom directory to store data-monitoring assets. Normally prepopulated
// to a default user location via UI and Python APIs.
AssetsDir string `json:"assets_dir,omitempty"`
// [Create:OPT Update:OPT] Baseline table name. Baseline data is used to
// compute drift from the data in the monitored `table_name`. The baseline
// table and the monitored table shall have the same schema.
BaselineTableName string `json:"baseline_table_name,omitempty"`
// [Create:OPT Update:OPT] Custom metrics.
CustomMetrics []MonitorMetric `json:"custom_metrics,omitempty"`
// [Create:ERR Update:OPT] Id of dashboard that visualizes the computed
// metrics. This can be empty if the monitor is in PENDING state.
DashboardId string `json:"dashboard_id,omitempty"`
// [Create:OPT Update:OPT] Data classification related config.
DataClassificationConfig *MonitorDataClassificationConfig `json:"data_classification_config,omitempty"`
// [Create:ERR Update:IGN] Table that stores drift metrics data. Format:
// `catalog.schema.table_name`.
DriftMetricsTableName string `json:"drift_metrics_table_name"`
InferenceLog *MonitorInferenceLog `json:"inference_log,omitempty"`
// [Create:ERR Update:IGN] The latest error message for a monitor failure.
LatestMonitorFailureMsg string `json:"latest_monitor_failure_msg,omitempty"`
// [Create:ERR Update:IGN] Represents the current monitor configuration
// version in use. The version will be represented in a numeric fashion
// (1,2,3...). The field has flexibility to take on negative values, which
// can indicate corrupted monitor_version numbers.
MonitorVersion int64 `json:"monitor_version"`
// [Create:OPT Update:OPT] Field for specifying notification settings.
Notifications *MonitorNotifications `json:"notifications,omitempty"`
// [Create:REQ Update:REQ] Schema where output tables are created. Needs to
// be in 2-level format {catalog}.{schema}
OutputSchemaName string `json:"output_schema_name"`
// [Create:ERR Update:IGN] Table that stores profile metrics data. Format:
// `catalog.schema.table_name`.
ProfileMetricsTableName string `json:"profile_metrics_table_name"`
// [Create:OPT Update:OPT] The monitor schedule.
Schedule *MonitorCronSchedule `json:"schedule,omitempty"`
// [Create:OPT Update:OPT] List of column expressions to slice data with for
// targeted analysis. The data is grouped by each expression independently,
// resulting in a separate slice for each predicate and its complements. For
// example `slicing_exprs=[“col_1”, “col_2 > 10”]` will generate the
// following slices: two slices for `col_2 > 10` (True and False), and one
// slice per unique value in `col1`. For high-cardinality columns, only the
// top 100 unique values by frequency will generate slices.
SlicingExprs []string `json:"slicing_exprs,omitempty"`
// Configuration for monitoring snapshot tables.
Snapshot *MonitorSnapshot `json:"snapshot,omitempty"`
// [Create:ERR Update:IGN] The monitor status.
Status MonitorInfoStatus `json:"status"`
// [Create:ERR Update:IGN] UC table to monitor. Format:
// `catalog.schema.table_name`
TableName string `json:"table_name"`
// Configuration for monitoring time series tables.
TimeSeries *MonitorTimeSeries `json:"time_series,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (MonitorInfo) MarshalJSON ¶ added in v0.30.0
func (s MonitorInfo) MarshalJSON() ([]byte, error)
func (*MonitorInfo) UnmarshalJSON ¶ added in v0.30.0
func (s *MonitorInfo) UnmarshalJSON(b []byte) error
type MonitorInfoStatus ¶ added in v0.30.0
type MonitorInfoStatus string
const MonitorInfoStatusMonitorStatusActive MonitorInfoStatus = `MONITOR_STATUS_ACTIVE`
const MonitorInfoStatusMonitorStatusDeletePending MonitorInfoStatus = `MONITOR_STATUS_DELETE_PENDING`
const MonitorInfoStatusMonitorStatusError MonitorInfoStatus = `MONITOR_STATUS_ERROR`
const MonitorInfoStatusMonitorStatusFailed MonitorInfoStatus = `MONITOR_STATUS_FAILED`
const MonitorInfoStatusMonitorStatusPending MonitorInfoStatus = `MONITOR_STATUS_PENDING`
func (*MonitorInfoStatus) Set ¶ added in v0.30.0
func (f *MonitorInfoStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*MonitorInfoStatus) String ¶ added in v0.30.0
func (f *MonitorInfoStatus) String() string
String representation for fmt.Print
func (*MonitorInfoStatus) Type ¶ added in v0.30.0
func (f *MonitorInfoStatus) Type() string
Type always returns MonitorInfoStatus to satisfy [pflag.Value] interface
func (*MonitorInfoStatus) Values ¶ added in v0.72.0
func (f *MonitorInfoStatus) Values() []MonitorInfoStatus
Values returns all possible values for MonitorInfoStatus.
There is no guarantee on the order of the values in the slice.
type MonitorMetric ¶ added in v0.38.0
type MonitorMetric struct {
// Jinja template for a SQL expression that specifies how to compute the
// metric. See [create metric definition].
//
// [create metric definition]: https://docs.databricks.com/en/lakehouse-monitoring/custom-metrics.html#create-definition
Definition string `json:"definition"`
// A list of column names in the input table the metric should be computed
// for. Can use “":table"“ to indicate that the metric needs information
// from multiple columns.
InputColumns []string `json:"input_columns"`
// Name of the metric in the output tables.
Name string `json:"name"`
// The output type of the custom metric.
OutputDataType string `json:"output_data_type"`
// Can only be one of “"CUSTOM_METRIC_TYPE_AGGREGATE"“,
// “"CUSTOM_METRIC_TYPE_DERIVED"“, or “"CUSTOM_METRIC_TYPE_DRIFT"“. The
// “"CUSTOM_METRIC_TYPE_AGGREGATE"“ and “"CUSTOM_METRIC_TYPE_DERIVED"“
// metrics are computed on a single table, whereas the
// “"CUSTOM_METRIC_TYPE_DRIFT"“ compare metrics across baseline and input
// table, or across the two consecutive time windows. -
// CUSTOM_METRIC_TYPE_AGGREGATE: only depend on the existing columns in your
// table - CUSTOM_METRIC_TYPE_DERIVED: depend on previously computed
// aggregate metrics - CUSTOM_METRIC_TYPE_DRIFT: depend on previously
// computed aggregate or derived metrics
Type MonitorMetricType `json:"type"`
}
Custom metric definition.
type MonitorMetricType ¶ added in v0.38.0
type MonitorMetricType string
Can only be one of “\"CUSTOM_METRIC_TYPE_AGGREGATE\"“, “\"CUSTOM_METRIC_TYPE_DERIVED\"“, or “\"CUSTOM_METRIC_TYPE_DRIFT\"“. The “\"CUSTOM_METRIC_TYPE_AGGREGATE\"“ and “\"CUSTOM_METRIC_TYPE_DERIVED\"“ metrics are computed on a single table, whereas the “\"CUSTOM_METRIC_TYPE_DRIFT\"“ compare metrics across baseline and input table, or across the two consecutive time windows. - CUSTOM_METRIC_TYPE_AGGREGATE: only depend on the existing columns in your table - CUSTOM_METRIC_TYPE_DERIVED: depend on previously computed aggregate metrics - CUSTOM_METRIC_TYPE_DRIFT: depend on previously computed aggregate or derived metrics
const MonitorMetricTypeCustomMetricTypeAggregate MonitorMetricType = `CUSTOM_METRIC_TYPE_AGGREGATE`
const MonitorMetricTypeCustomMetricTypeDerived MonitorMetricType = `CUSTOM_METRIC_TYPE_DERIVED`
const MonitorMetricTypeCustomMetricTypeDrift MonitorMetricType = `CUSTOM_METRIC_TYPE_DRIFT`
func (*MonitorMetricType) Set ¶ added in v0.38.0
func (f *MonitorMetricType) Set(v string) error
Set raw string value and validate it against allowed values
func (*MonitorMetricType) String ¶ added in v0.38.0
func (f *MonitorMetricType) String() string
String representation for fmt.Print
func (*MonitorMetricType) Type ¶ added in v0.38.0
func (f *MonitorMetricType) Type() string
Type always returns MonitorMetricType to satisfy [pflag.Value] interface
func (*MonitorMetricType) Values ¶ added in v0.72.0
func (f *MonitorMetricType) Values() []MonitorMetricType
Values returns all possible values for MonitorMetricType.
There is no guarantee on the order of the values in the slice.
type MonitorNotifications ¶ added in v0.38.0
type MonitorNotifications struct {
// Destinations to send notifications on failure/timeout.
OnFailure *MonitorDestination `json:"on_failure,omitempty"`
// Destinations to send notifications on new classification tag detected.
OnNewClassificationTagDetected *MonitorDestination `json:"on_new_classification_tag_detected,omitempty"`
}
type MonitorRefreshInfo ¶ added in v0.31.0
type MonitorRefreshInfo struct {
// Time at which refresh operation completed (milliseconds since 1/1/1970
// UTC).
EndTimeMs int64 `json:"end_time_ms,omitempty"`
// An optional message to give insight into the current state of the job
// (e.g. FAILURE messages).
Message string `json:"message,omitempty"`
// Unique id of the refresh operation.
RefreshId int64 `json:"refresh_id"`
// Time at which refresh operation was initiated (milliseconds since
// 1/1/1970 UTC).
StartTimeMs int64 `json:"start_time_ms"`
// The current state of the refresh.
State MonitorRefreshInfoState `json:"state"`
// The method by which the refresh was triggered.
Trigger MonitorRefreshInfoTrigger `json:"trigger,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (MonitorRefreshInfo) MarshalJSON ¶ added in v0.31.0
func (s MonitorRefreshInfo) MarshalJSON() ([]byte, error)
func (*MonitorRefreshInfo) UnmarshalJSON ¶ added in v0.31.0
func (s *MonitorRefreshInfo) UnmarshalJSON(b []byte) error
type MonitorRefreshInfoState ¶ added in v0.31.0
type MonitorRefreshInfoState string
The current state of the refresh.
const MonitorRefreshInfoStateCanceled MonitorRefreshInfoState = `CANCELED`
const MonitorRefreshInfoStateFailed MonitorRefreshInfoState = `FAILED`
const MonitorRefreshInfoStatePending MonitorRefreshInfoState = `PENDING`
const MonitorRefreshInfoStateRunning MonitorRefreshInfoState = `RUNNING`
const MonitorRefreshInfoStateSuccess MonitorRefreshInfoState = `SUCCESS`
const MonitorRefreshInfoStateUnknown MonitorRefreshInfoState = `UNKNOWN`
func (*MonitorRefreshInfoState) Set ¶ added in v0.31.0
func (f *MonitorRefreshInfoState) Set(v string) error
Set raw string value and validate it against allowed values
func (*MonitorRefreshInfoState) String ¶ added in v0.31.0
func (f *MonitorRefreshInfoState) String() string
String representation for fmt.Print
func (*MonitorRefreshInfoState) Type ¶ added in v0.31.0
func (f *MonitorRefreshInfoState) Type() string
Type always returns MonitorRefreshInfoState to satisfy [pflag.Value] interface
func (*MonitorRefreshInfoState) Values ¶ added in v0.72.0
func (f *MonitorRefreshInfoState) Values() []MonitorRefreshInfoState
Values returns all possible values for MonitorRefreshInfoState.
There is no guarantee on the order of the values in the slice.
type MonitorRefreshInfoTrigger ¶ added in v0.38.0
type MonitorRefreshInfoTrigger string
const MonitorRefreshInfoTriggerManual MonitorRefreshInfoTrigger = `MANUAL`
const MonitorRefreshInfoTriggerSchedule MonitorRefreshInfoTrigger = `SCHEDULE`
const MonitorRefreshInfoTriggerUnknownTrigger MonitorRefreshInfoTrigger = `UNKNOWN_TRIGGER`
func (*MonitorRefreshInfoTrigger) Set ¶ added in v0.38.0
func (f *MonitorRefreshInfoTrigger) Set(v string) error
Set raw string value and validate it against allowed values
func (*MonitorRefreshInfoTrigger) String ¶ added in v0.38.0
func (f *MonitorRefreshInfoTrigger) String() string
String representation for fmt.Print
func (*MonitorRefreshInfoTrigger) Type ¶ added in v0.38.0
func (f *MonitorRefreshInfoTrigger) Type() string
Type always returns MonitorRefreshInfoTrigger to satisfy [pflag.Value] interface
func (*MonitorRefreshInfoTrigger) Values ¶ added in v0.72.0
func (f *MonitorRefreshInfoTrigger) Values() []MonitorRefreshInfoTrigger
Values returns all possible values for MonitorRefreshInfoTrigger.
There is no guarantee on the order of the values in the slice.
type MonitorRefreshListResponse ¶ added in v0.41.0
type MonitorRefreshListResponse struct {
// List of refreshes.
Refreshes []MonitorRefreshInfo `json:"refreshes,omitempty"`
}
type MonitorSnapshot ¶ added in v0.38.0
type MonitorSnapshot struct {
}
Snapshot analysis configuration
type MonitorTimeSeries ¶ added in v0.38.0
type MonitorTimeSeries struct {
// Granularities for aggregating data into time windows based on their
// timestamp. Currently the following static granularities are supported:
// {“\"5 minutes\"“, “\"30 minutes\"“, “\"1 hour\"“, “\"1 day\"“,
// “\"\u003cn\u003e week(s)\"“, “\"1 month\"“, “\"1 year\"“}.
Granularities []string `json:"granularities"`
// Column for the timestamp.
TimestampCol string `json:"timestamp_col"`
}
Time series analysis configuration.
type NamedTableConstraint ¶
type NamedTableConstraint struct {
// The name of the constraint.
Name string `json:"name"`
}
type NotificationDestination ¶ added in v0.81.0
type NotificationDestination struct {
// The identifier for the destination. This is the email address for EMAIL
// destinations, the URL for URL destinations, or the unique Databricks
// notification destination ID for all other external destinations.
DestinationId string `json:"destination_id,omitempty"`
// The type of the destination.
DestinationType DestinationType `json:"destination_type,omitempty"`
// This field is used to denote whether the destination is the email of the
// owner of the securable object. The special destination cannot be assigned
// to a securable and only represents the default destination of the
// securable. The securable types that support default special destinations
// are: "catalog", "external_location", "connection", "credential", and
// "metastore". The **destination_type** of a **special_destination** is
// always EMAIL.
SpecialDestination SpecialDestination `json:"special_destination,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (NotificationDestination) MarshalJSON ¶ added in v0.81.0
func (s NotificationDestination) MarshalJSON() ([]byte, error)
func (*NotificationDestination) UnmarshalJSON ¶ added in v0.81.0
func (s *NotificationDestination) UnmarshalJSON(b []byte) error
type OnlineTable ¶ added in v0.33.0
type OnlineTable struct {
// Full three-part (catalog, schema, table) name of the table.
Name string `json:"name,omitempty"`
// Specification of the online table.
Spec *OnlineTableSpec `json:"spec,omitempty"`
// Online Table data synchronization status
Status *OnlineTableStatus `json:"status,omitempty"`
// Data serving REST API URL for this table
TableServingUrl string `json:"table_serving_url,omitempty"`
// The provisioning state of the online 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:"-"`
}
Online Table information.
func (OnlineTable) MarshalJSON ¶ added in v0.33.0
func (s OnlineTable) MarshalJSON() ([]byte, error)
func (*OnlineTable) UnmarshalJSON ¶ added in v0.33.0
func (s *OnlineTable) UnmarshalJSON(b []byte) error
type OnlineTableSpec ¶ added in v0.33.0
type OnlineTableSpec struct {
// Whether to create a full-copy pipeline -- a pipeline that stops after
// creates a full copy of the source table upon initialization and does not
// process any change data feeds (CDFs) afterwards. The pipeline can still
// be manually triggered afterwards, but it always perform a full copy of
// the source table and there are no incremental updates. This mode is
// useful for syncing views or tables without CDFs to online tables. Note
// that the full-copy pipeline only supports "triggered" scheduling policy.
PerformFullCopy bool `json:"perform_full_copy,omitempty"`
// ID of the associated pipeline. Generated by the server - cannot be set by
// the caller.
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"`
// Pipeline runs continuously after generating the initial data.
RunContinuously *OnlineTableSpecContinuousSchedulingPolicy `json:"run_continuously,omitempty"`
// Pipeline stops after generating the initial data and can be triggered
// later (manually, through a cron job or through data triggers)
RunTriggered *OnlineTableSpecTriggeredSchedulingPolicy `json:"run_triggered,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 an online table.
func (OnlineTableSpec) MarshalJSON ¶ added in v0.33.0
func (s OnlineTableSpec) MarshalJSON() ([]byte, error)
func (*OnlineTableSpec) UnmarshalJSON ¶ added in v0.33.0
func (s *OnlineTableSpec) UnmarshalJSON(b []byte) error
type OnlineTableSpecContinuousSchedulingPolicy ¶ added in v0.34.0
type OnlineTableSpecContinuousSchedulingPolicy struct {
}
type OnlineTableSpecTriggeredSchedulingPolicy ¶ added in v0.34.0
type OnlineTableSpecTriggeredSchedulingPolicy struct {
}
type OnlineTableState ¶ added in v0.33.0
type OnlineTableState string
The state of an online table.
const OnlineTableStateOffline OnlineTableState = `OFFLINE`
const OnlineTableStateOfflineFailed OnlineTableState = `OFFLINE_FAILED`
const OnlineTableStateOnline OnlineTableState = `ONLINE`
const OnlineTableStateOnlineContinuousUpdate OnlineTableState = `ONLINE_CONTINUOUS_UPDATE`
const OnlineTableStateOnlineNoPendingUpdate OnlineTableState = `ONLINE_NO_PENDING_UPDATE`
const OnlineTableStateOnlinePipelineFailed OnlineTableState = `ONLINE_PIPELINE_FAILED`
const OnlineTableStateOnlineTriggeredUpdate OnlineTableState = `ONLINE_TRIGGERED_UPDATE`
const OnlineTableStateOnlineUpdatingPipelineResources OnlineTableState = `ONLINE_UPDATING_PIPELINE_RESOURCES`
const OnlineTableStateProvisioning OnlineTableState = `PROVISIONING`
const OnlineTableStateProvisioningInitialSnapshot OnlineTableState = `PROVISIONING_INITIAL_SNAPSHOT`
const OnlineTableStateProvisioningPipelineResources OnlineTableState = `PROVISIONING_PIPELINE_RESOURCES`
func (*OnlineTableState) Set ¶ added in v0.33.0
func (f *OnlineTableState) Set(v string) error
Set raw string value and validate it against allowed values
func (*OnlineTableState) String ¶ added in v0.33.0
func (f *OnlineTableState) String() string
String representation for fmt.Print
func (*OnlineTableState) Type ¶ added in v0.33.0
func (f *OnlineTableState) Type() string
Type always returns OnlineTableState to satisfy [pflag.Value] interface
func (*OnlineTableState) Values ¶ added in v0.72.0
func (f *OnlineTableState) Values() []OnlineTableState
Values returns all possible values for OnlineTableState.
There is no guarantee on the order of the values in the slice.
type OnlineTableStatus ¶ added in v0.33.0
type OnlineTableStatus struct {
ContinuousUpdateStatus *ContinuousUpdateStatus `json:"continuous_update_status,omitempty"`
// The state of the online table.
DetailedState OnlineTableState `json:"detailed_state,omitempty"`
FailedStatus *FailedStatus `json:"failed_status,omitempty"`
// A text description of the current state of the online table.
Message string `json:"message,omitempty"`
ProvisioningStatus *ProvisioningStatus `json:"provisioning_status,omitempty"`
TriggeredUpdateStatus *TriggeredUpdateStatus `json:"triggered_update_status,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Status of an online table.
func (OnlineTableStatus) MarshalJSON ¶ added in v0.33.0
func (s OnlineTableStatus) MarshalJSON() ([]byte, error)
func (*OnlineTableStatus) UnmarshalJSON ¶ added in v0.33.0
func (s *OnlineTableStatus) UnmarshalJSON(b []byte) error
type OnlineTablesAPI ¶ added in v0.33.0
type OnlineTablesAPI struct {
// contains filtered or unexported fields
}
Online tables provide lower latency and higher QPS access to data from Delta tables.
func NewOnlineTables ¶ added in v0.33.0
func NewOnlineTables(client *client.DatabricksClient) *OnlineTablesAPI
func (*OnlineTablesAPI) Create ¶ added in v0.33.0
func (a *OnlineTablesAPI) Create(ctx context.Context, createOnlineTableRequest CreateOnlineTableRequest) (*WaitGetOnlineTableActive[OnlineTable], error)
Create a new Online Table.
func (*OnlineTablesAPI) CreateAndWait
deprecated
added in
v0.50.0
func (a *OnlineTablesAPI) CreateAndWait(ctx context.Context, createOnlineTableRequest CreateOnlineTableRequest, options ...retries.Option[OnlineTable]) (*OnlineTable, error)
Calls OnlineTablesAPI.Create and waits to reach ACTIVE state
You can override the default timeout of 20 minutes by calling adding retries.Timeout[OnlineTable](60*time.Minute) functional option.
Deprecated: use OnlineTablesAPI.Create.Get() or OnlineTablesAPI.WaitGetOnlineTableActive
func (*OnlineTablesAPI) Delete ¶ added in v0.33.0
func (a *OnlineTablesAPI) Delete(ctx context.Context, request DeleteOnlineTableRequest) error
func (*OnlineTablesAPI) DeleteByName ¶ added in v0.33.0
func (a *OnlineTablesAPI) DeleteByName(ctx context.Context, name string) error
Delete an online table. Warning: This will delete all the data in the online table. If the source Delta table was deleted or modified since this Online Table was created, this will lose the data forever!
func (*OnlineTablesAPI) Get ¶ added in v0.33.0
func (a *OnlineTablesAPI) Get(ctx context.Context, request GetOnlineTableRequest) (*OnlineTable, error)
func (*OnlineTablesAPI) GetByName ¶ added in v0.33.0
func (a *OnlineTablesAPI) GetByName(ctx context.Context, name string) (*OnlineTable, error)
Get information about an existing online table and its status.
func (*OnlineTablesAPI) WaitGetOnlineTableActive ¶ added in v0.50.0
func (a *OnlineTablesAPI) WaitGetOnlineTableActive(ctx context.Context, name string, timeout time.Duration, callback func(*OnlineTable)) (*OnlineTable, error)
WaitGetOnlineTableActive repeatedly calls OnlineTablesAPI.Get and waits to reach ACTIVE state
type OnlineTablesInterface ¶ added in v0.33.0
type OnlineTablesInterface interface {
// WaitGetOnlineTableActive repeatedly calls [OnlineTablesAPI.Get] and waits to reach ACTIVE state
WaitGetOnlineTableActive(ctx context.Context, name string,
timeout time.Duration, callback func(*OnlineTable)) (*OnlineTable, error)
// Create a new Online Table.
Create(ctx context.Context, createOnlineTableRequest CreateOnlineTableRequest) (*WaitGetOnlineTableActive[OnlineTable], error)
// Calls [OnlineTablesAPIInterface.Create] and waits to reach ACTIVE state
//
// You can override the default timeout of 20 minutes by calling adding
// retries.Timeout[OnlineTable](60*time.Minute) functional option.
//
// Deprecated: use [OnlineTablesAPIInterface.Create].Get() or [OnlineTablesAPIInterface.WaitGetOnlineTableActive]
CreateAndWait(ctx context.Context, createOnlineTableRequest CreateOnlineTableRequest, options ...retries.Option[OnlineTable]) (*OnlineTable, error)
// Delete an online table. Warning: This will delete all the data in the online
// table. If the source Delta table was deleted or modified since this Online
// Table was created, this will lose the data forever!
Delete(ctx context.Context, request DeleteOnlineTableRequest) error
// Delete an online table. Warning: This will delete all the data in the online
// table. If the source Delta table was deleted or modified since this Online
// Table was created, this will lose the data forever!
DeleteByName(ctx context.Context, name string) error
// Get information about an existing online table and its status.
Get(ctx context.Context, request GetOnlineTableRequest) (*OnlineTable, error)
// Get information about an existing online table and its status.
GetByName(ctx context.Context, name string) (*OnlineTable, error)
}
type OnlineTablesService
deprecated
added in
v0.33.0
type OnlineTablesService interface {
// Create a new Online Table.
Create(ctx context.Context, request CreateOnlineTableRequest) (*OnlineTable, error)
// Delete an online table. Warning: This will delete all the data in the
// online table. If the source Delta table was deleted or modified since
// this Online Table was created, this will lose the data forever!
Delete(ctx context.Context, request DeleteOnlineTableRequest) error
// Get information about an existing online table and its status.
Get(ctx context.Context, request GetOnlineTableRequest) (*OnlineTable, error)
}
Online tables provide lower latency and higher QPS access to data from Delta tables.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type OptionSpec ¶ added in v0.74.0
type OptionSpec struct {
// For drop down / radio button selections, UI will want to know the
// possible input values, it can also be used by other option types to limit
// input selections.
AllowedValues []string `json:"allowed_values,omitempty"`
// The default value of the option, for example, value '443' for 'port'
// option.
DefaultValue string `json:"default_value,omitempty"`
// A concise user facing description of what the input value of this option
// should look like.
Description string `json:"description,omitempty"`
// The hint is used on the UI to suggest what the input value can possibly
// be like, for example: example.com for 'host' option. Unlike default
// value, it will not be applied automatically without user input.
Hint string `json:"hint,omitempty"`
// Indicates whether an option should be displayed with copy button on the
// UI.
IsCopiable bool `json:"is_copiable,omitempty"`
// Indicates whether an option can be provided by users in the create/update
// path of an entity.
IsCreatable bool `json:"is_creatable,omitempty"`
// Is the option value not user settable and is thus not shown on the UI.
IsHidden bool `json:"is_hidden,omitempty"`
// Specifies whether this option is safe to log, i.e. no sensitive
// information.
IsLoggable bool `json:"is_loggable,omitempty"`
// Is the option required.
IsRequired bool `json:"is_required,omitempty"`
// Is the option value considered secret and thus redacted on the UI.
IsSecret bool `json:"is_secret,omitempty"`
// Is the option updatable by users.
IsUpdatable bool `json:"is_updatable,omitempty"`
// The unique name of the option.
Name string `json:"name,omitempty"`
// Specifies when the option value is displayed on the UI within the OAuth
// flow.
OauthStage OptionSpecOauthStage `json:"oauth_stage,omitempty"`
// The type of the option.
Type OptionSpecOptionType `json:"type,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Spec of an allowed option on a securable kind and its attributes. This is mostly used by UI to provide user friendly hints and descriptions in order to facilitate the securable creation process.
func (OptionSpec) MarshalJSON ¶ added in v0.74.0
func (s OptionSpec) MarshalJSON() ([]byte, error)
func (*OptionSpec) UnmarshalJSON ¶ added in v0.74.0
func (s *OptionSpec) UnmarshalJSON(b []byte) error
type OptionSpecOauthStage ¶ added in v0.74.0
type OptionSpecOauthStage string
During the OAuth flow, specifies which stage the option should be displayed in the UI. OAUTH_STAGE_UNSPECIFIED is the default value for options unrelated to the OAuth flow. BEFORE_AUTHORIZATION_CODE corresponds to options necessary to initiate the OAuth process. BEFORE_ACCESS_TOKEN corresponds to options that are necessary to create a foreign connection, but that should be displayed after the authorization code has already been received.
const OptionSpecOauthStageBeforeAccessToken OptionSpecOauthStage = `BEFORE_ACCESS_TOKEN`
const OptionSpecOauthStageBeforeAuthorizationCode OptionSpecOauthStage = `BEFORE_AUTHORIZATION_CODE`
func (*OptionSpecOauthStage) Set ¶ added in v0.74.0
func (f *OptionSpecOauthStage) Set(v string) error
Set raw string value and validate it against allowed values
func (*OptionSpecOauthStage) String ¶ added in v0.74.0
func (f *OptionSpecOauthStage) String() string
String representation for fmt.Print
func (*OptionSpecOauthStage) Type ¶ added in v0.74.0
func (f *OptionSpecOauthStage) Type() string
Type always returns OptionSpecOauthStage to satisfy [pflag.Value] interface
func (*OptionSpecOauthStage) Values ¶ added in v0.74.0
func (f *OptionSpecOauthStage) Values() []OptionSpecOauthStage
Values returns all possible values for OptionSpecOauthStage.
There is no guarantee on the order of the values in the slice.
type OptionSpecOptionType ¶ added in v0.74.0
type OptionSpecOptionType string
Type of the option, we purposely follow JavaScript types so that the UI can map the options to JS types. https://www.w3schools.com/js/js_datatypes.asp Enum is a special case that it's just string with selections.
const OptionSpecOptionTypeOptionBigint OptionSpecOptionType = `OPTION_BIGINT`
const OptionSpecOptionTypeOptionBoolean OptionSpecOptionType = `OPTION_BOOLEAN`
const OptionSpecOptionTypeOptionEnum OptionSpecOptionType = `OPTION_ENUM`
const OptionSpecOptionTypeOptionMultilineString OptionSpecOptionType = `OPTION_MULTILINE_STRING`
const OptionSpecOptionTypeOptionNumber OptionSpecOptionType = `OPTION_NUMBER`
const OptionSpecOptionTypeOptionServiceCredential OptionSpecOptionType = `OPTION_SERVICE_CREDENTIAL`
const OptionSpecOptionTypeOptionString OptionSpecOptionType = `OPTION_STRING`
func (*OptionSpecOptionType) Set ¶ added in v0.74.0
func (f *OptionSpecOptionType) Set(v string) error
Set raw string value and validate it against allowed values
func (*OptionSpecOptionType) String ¶ added in v0.74.0
func (f *OptionSpecOptionType) String() string
String representation for fmt.Print
func (*OptionSpecOptionType) Type ¶ added in v0.74.0
func (f *OptionSpecOptionType) Type() string
Type always returns OptionSpecOptionType to satisfy [pflag.Value] interface
func (*OptionSpecOptionType) Values ¶ added in v0.74.0
func (f *OptionSpecOptionType) Values() []OptionSpecOptionType
Values returns all possible values for OptionSpecOptionType.
There is no guarantee on the order of the values in the slice.
type PathOperation ¶ added in v0.80.0
type PathOperation string
const PathOperationPathCreateTable PathOperation = `PATH_CREATE_TABLE`
const PathOperationPathRead PathOperation = `PATH_READ`
const PathOperationPathReadWrite PathOperation = `PATH_READ_WRITE`
func (*PathOperation) Set ¶ added in v0.80.0
func (f *PathOperation) Set(v string) error
Set raw string value and validate it against allowed values
func (*PathOperation) String ¶ added in v0.80.0
func (f *PathOperation) String() string
String representation for fmt.Print
func (*PathOperation) Type ¶ added in v0.80.0
func (f *PathOperation) Type() string
Type always returns PathOperation to satisfy [pflag.Value] interface
func (*PathOperation) Values ¶ added in v0.80.0
func (f *PathOperation) Values() []PathOperation
Values returns all possible values for PathOperation.
There is no guarantee on the order of the values in the slice.
type PermissionsChange ¶
type PermissionsChange struct {
// The set of privileges to add.
Add []Privilege `json:"add,omitempty"`
// The principal whose privileges we are changing. Only one of principal or
// principal_id should be specified, never both at the same time.
Principal string `json:"principal,omitempty"`
// The set of privileges to remove.
Remove []Privilege `json:"remove,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (PermissionsChange) MarshalJSON ¶ added in v0.23.0
func (s PermissionsChange) MarshalJSON() ([]byte, error)
func (*PermissionsChange) UnmarshalJSON ¶ added in v0.23.0
func (s *PermissionsChange) UnmarshalJSON(b []byte) error
type PipelineProgress ¶ added in v0.33.0
type PipelineProgress 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 Online Table data synchronization pipeline.
func (PipelineProgress) MarshalJSON ¶ added in v0.33.0
func (s PipelineProgress) MarshalJSON() ([]byte, error)
func (*PipelineProgress) UnmarshalJSON ¶ added in v0.33.0
func (s *PipelineProgress) UnmarshalJSON(b []byte) error
type PoliciesAPI ¶ added in v0.80.0
type PoliciesAPI struct {
// contains filtered or unexported fields
}
Attribute-Based Access Control (ABAC) provides high leverage governance for enforcing compliance policies in Unity Catalog. With ABAC policies, access is controlled in a hierarchical and scalable manner, based on data attributes rather than specific resources, enabling more flexible and comprehensive access control. ABAC policies in Unity Catalog support conditions on securable properties, governance tags, and environment contexts. Callers must have the `MANAGE` privilege on a securable to view, create, update, or delete ABAC policies.
func NewPolicies ¶ added in v0.80.0
func NewPolicies(client *client.DatabricksClient) *PoliciesAPI
func (*PoliciesAPI) CreatePolicy ¶ added in v0.80.0
func (a *PoliciesAPI) CreatePolicy(ctx context.Context, request CreatePolicyRequest) (*PolicyInfo, error)
func (*PoliciesAPI) DeletePolicy ¶ added in v0.80.0
func (a *PoliciesAPI) DeletePolicy(ctx context.Context, request DeletePolicyRequest) (*DeletePolicyResponse, error)
func (*PoliciesAPI) GetPolicy ¶ added in v0.80.0
func (a *PoliciesAPI) GetPolicy(ctx context.Context, request GetPolicyRequest) (*PolicyInfo, error)
func (*PoliciesAPI) ListPolicies ¶ added in v0.80.0
func (a *PoliciesAPI) ListPolicies(ctx context.Context, request ListPoliciesRequest) listing.Iterator[PolicyInfo]
List all policies defined on a securable. Optionally, the list can include inherited policies defined on the securable's parent schema or catalog.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*PoliciesAPI) ListPoliciesAll ¶ added in v0.80.0
func (a *PoliciesAPI) ListPoliciesAll(ctx context.Context, request ListPoliciesRequest) ([]PolicyInfo, error)
List all policies defined on a securable. Optionally, the list can include inherited policies defined on the securable's parent schema or catalog.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*PoliciesAPI) UpdatePolicy ¶ added in v0.80.0
func (a *PoliciesAPI) UpdatePolicy(ctx context.Context, request UpdatePolicyRequest) (*PolicyInfo, error)
type PoliciesInterface ¶ added in v0.80.0
type PoliciesInterface interface {
// Creates a new policy on a securable. The new policy applies to the securable
// and all its descendants.
CreatePolicy(ctx context.Context, request CreatePolicyRequest) (*PolicyInfo, error)
// Delete an ABAC policy defined on a securable.
DeletePolicy(ctx context.Context, request DeletePolicyRequest) (*DeletePolicyResponse, error)
// Get the policy definition on a securable
GetPolicy(ctx context.Context, request GetPolicyRequest) (*PolicyInfo, error)
// List all policies defined on a securable. Optionally, the list can include
// inherited policies defined on the securable's parent schema or catalog.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListPolicies(ctx context.Context, request ListPoliciesRequest) listing.Iterator[PolicyInfo]
// List all policies defined on a securable. Optionally, the list can include
// inherited policies defined on the securable's parent schema or catalog.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListPoliciesAll(ctx context.Context, request ListPoliciesRequest) ([]PolicyInfo, error)
// Update an ABAC policy on a securable.
UpdatePolicy(ctx context.Context, request UpdatePolicyRequest) (*PolicyInfo, error)
}
type PoliciesService
deprecated
added in
v0.80.0
type PoliciesService interface {
// Creates a new policy on a securable. The new policy applies to the
// securable and all its descendants.
CreatePolicy(ctx context.Context, request CreatePolicyRequest) (*PolicyInfo, error)
// Delete an ABAC policy defined on a securable.
DeletePolicy(ctx context.Context, request DeletePolicyRequest) (*DeletePolicyResponse, error)
// Get the policy definition on a securable
GetPolicy(ctx context.Context, request GetPolicyRequest) (*PolicyInfo, error)
// List all policies defined on a securable. Optionally, the list can
// include inherited policies defined on the securable's parent schema or
// catalog.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain
// zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
ListPolicies(ctx context.Context, request ListPoliciesRequest) (*ListPoliciesResponse, error)
// Update an ABAC policy on a securable.
UpdatePolicy(ctx context.Context, request UpdatePolicyRequest) (*PolicyInfo, error)
}
Attribute-Based Access Control (ABAC) provides high leverage governance for enforcing compliance policies in Unity Catalog. With ABAC policies, access is controlled in a hierarchical and scalable manner, based on data attributes rather than specific resources, enabling more flexible and comprehensive access control. ABAC policies in Unity Catalog support conditions on securable properties, governance tags, and environment contexts. Callers must have the `MANAGE` privilege on a securable to view, create, update, or delete ABAC policies.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type PolicyInfo ¶ added in v0.80.0
type PolicyInfo struct {
// Options for column mask policies. Valid only if `policy_type` is
// `POLICY_TYPE_COLUMN_MASK`. Required on create and optional on update.
// When specified on update, the new options will replace the existing
// options as a whole.
ColumnMask *ColumnMaskOptions `json:"column_mask,omitempty"`
// Optional description of the policy.
Comment string `json:"comment,omitempty"`
// Time at which the policy was created, in epoch milliseconds. Output only.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of the user who created the policy. Output only.
CreatedBy string `json:"created_by,omitempty"`
// Optional list of user or group names that should be excluded from the
// policy.
ExceptPrincipals []string `json:"except_principals,omitempty"`
// Type of securables that the policy should take effect on. Only `TABLE` is
// supported at this moment. Required on create and optional on update.
ForSecurableType SecurableType `json:"for_securable_type"`
// Unique identifier of the policy. This field is output only and is
// generated by the system.
Id string `json:"id,omitempty"`
// Optional list of condition expressions used to match table columns. Only
// valid when `for_securable_type` is `TABLE`. When specified, the policy
// only applies to tables whose columns satisfy all match conditions.
MatchColumns []MatchColumn `json:"match_columns,omitempty"`
// Name of the policy. Required on create and optional on update. To rename
// the policy, set `name` to a different value on update.
Name string `json:"name,omitempty"`
// Full name of the securable on which the policy is defined. Required on
// create and ignored on update.
OnSecurableFullname string `json:"on_securable_fullname,omitempty"`
// Type of the securable on which the policy is defined. Only `CATALOG`,
// `SCHEMA` and `TABLE` are supported at this moment. Required on create and
// ignored on update.
OnSecurableType SecurableType `json:"on_securable_type,omitempty"`
// Type of the policy. Required on create and ignored on update.
PolicyType PolicyType `json:"policy_type"`
// Options for row filter policies. Valid only if `policy_type` is
// `POLICY_TYPE_ROW_FILTER`. Required on create and optional on update. When
// specified on update, the new options will replace the existing options as
// a whole.
RowFilter *RowFilterOptions `json:"row_filter,omitempty"`
// List of user or group names that the policy applies to. Required on
// create and optional on update.
ToPrincipals []string `json:"to_principals"`
// Time at which the policy was last modified, in epoch milliseconds. Output
// only.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of the user who last modified the policy. Output only.
UpdatedBy string `json:"updated_by,omitempty"`
// Optional condition when the policy should take effect.
WhenCondition string `json:"when_condition,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (PolicyInfo) MarshalJSON ¶ added in v0.80.0
func (s PolicyInfo) MarshalJSON() ([]byte, error)
func (*PolicyInfo) UnmarshalJSON ¶ added in v0.80.0
func (s *PolicyInfo) UnmarshalJSON(b []byte) error
type PolicyType ¶ added in v0.80.0
type PolicyType string
const PolicyTypePolicyTypeColumnMask PolicyType = `POLICY_TYPE_COLUMN_MASK`
const PolicyTypePolicyTypeRowFilter PolicyType = `POLICY_TYPE_ROW_FILTER`
func (*PolicyType) Set ¶ added in v0.80.0
func (f *PolicyType) Set(v string) error
Set raw string value and validate it against allowed values
func (*PolicyType) String ¶ added in v0.80.0
func (f *PolicyType) String() string
String representation for fmt.Print
func (*PolicyType) Type ¶ added in v0.80.0
func (f *PolicyType) Type() string
Type always returns PolicyType to satisfy [pflag.Value] interface
func (*PolicyType) Values ¶ added in v0.80.0
func (f *PolicyType) Values() []PolicyType
Values returns all possible values for PolicyType.
There is no guarantee on the order of the values in the slice.
type PrimaryKeyConstraint ¶
type PrimaryKeyConstraint struct {
// Column names for this constraint.
ChildColumns []string `json:"child_columns"`
// The name of the constraint.
Name string `json:"name"`
// True if the constraint is RELY, false or unset if NORELY.
Rely bool `json:"rely,omitempty"`
// Column names that represent a timeseries.
TimeseriesColumns []string `json:"timeseries_columns,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (PrimaryKeyConstraint) MarshalJSON ¶ added in v0.73.0
func (s PrimaryKeyConstraint) MarshalJSON() ([]byte, error)
func (*PrimaryKeyConstraint) UnmarshalJSON ¶ added in v0.73.0
func (s *PrimaryKeyConstraint) UnmarshalJSON(b []byte) error
type Principal ¶ added in v0.81.0
type Principal struct {
// Databricks user, group or service principal ID.
Id string `json:"id,omitempty"`
PrincipalType PrincipalType `json:"principal_type,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (Principal) MarshalJSON ¶ added in v0.81.0
func (*Principal) UnmarshalJSON ¶ added in v0.81.0
type PrincipalType ¶ added in v0.81.0
type PrincipalType string
const PrincipalTypeGroupPrincipal PrincipalType = `GROUP_PRINCIPAL`
const PrincipalTypeServicePrincipal PrincipalType = `SERVICE_PRINCIPAL`
const PrincipalTypeUserPrincipal PrincipalType = `USER_PRINCIPAL`
func (*PrincipalType) Set ¶ added in v0.81.0
func (f *PrincipalType) Set(v string) error
Set raw string value and validate it against allowed values
func (*PrincipalType) String ¶ added in v0.81.0
func (f *PrincipalType) String() string
String representation for fmt.Print
func (*PrincipalType) Type ¶ added in v0.81.0
func (f *PrincipalType) Type() string
Type always returns PrincipalType to satisfy [pflag.Value] interface
func (*PrincipalType) Values ¶ added in v0.81.0
func (f *PrincipalType) Values() []PrincipalType
Values returns all possible values for PrincipalType.
There is no guarantee on the order of the values in the slice.
type Privilege ¶
type Privilege string
const PrivilegeAccess Privilege = `ACCESS`
const PrivilegeAllPrivileges Privilege = `ALL_PRIVILEGES`
const PrivilegeApplyTag Privilege = `APPLY_TAG`
const PrivilegeBrowse Privilege = `BROWSE`
const PrivilegeCreate Privilege = `CREATE`
const PrivilegeCreateCatalog Privilege = `CREATE_CATALOG`
const PrivilegeCreateCleanRoom Privilege = `CREATE_CLEAN_ROOM`
const PrivilegeCreateConnection Privilege = `CREATE_CONNECTION`
const PrivilegeCreateExternalLocation Privilege = `CREATE_EXTERNAL_LOCATION`
const PrivilegeCreateExternalTable Privilege = `CREATE_EXTERNAL_TABLE`
const PrivilegeCreateExternalVolume Privilege = `CREATE_EXTERNAL_VOLUME`
const PrivilegeCreateForeignCatalog Privilege = `CREATE_FOREIGN_CATALOG`
const PrivilegeCreateForeignSecurable Privilege = `CREATE_FOREIGN_SECURABLE`
const PrivilegeCreateFunction Privilege = `CREATE_FUNCTION`
const PrivilegeCreateManagedStorage Privilege = `CREATE_MANAGED_STORAGE`
const PrivilegeCreateMaterializedView Privilege = `CREATE_MATERIALIZED_VIEW`
const PrivilegeCreateModel Privilege = `CREATE_MODEL`
const PrivilegeCreateProvider Privilege = `CREATE_PROVIDER`
const PrivilegeCreateRecipient Privilege = `CREATE_RECIPIENT`
const PrivilegeCreateSchema Privilege = `CREATE_SCHEMA`
const PrivilegeCreateServiceCredential Privilege = `CREATE_SERVICE_CREDENTIAL`
const PrivilegeCreateStorageCredential Privilege = `CREATE_STORAGE_CREDENTIAL`
const PrivilegeCreateTable Privilege = `CREATE_TABLE`
const PrivilegeCreateView Privilege = `CREATE_VIEW`
const PrivilegeCreateVolume Privilege = `CREATE_VOLUME`
const PrivilegeExecute Privilege = `EXECUTE`
const PrivilegeExecuteCleanRoomTask Privilege = `EXECUTE_CLEAN_ROOM_TASK`
const PrivilegeExternalUseSchema Privilege = `EXTERNAL_USE_SCHEMA`
const PrivilegeManage Privilege = `MANAGE`
const PrivilegeManageAllowlist Privilege = `MANAGE_ALLOWLIST`
const PrivilegeModify Privilege = `MODIFY`
const PrivilegeModifyCleanRoom Privilege = `MODIFY_CLEAN_ROOM`
const PrivilegeReadFiles Privilege = `READ_FILES`
const PrivilegeReadPrivateFiles Privilege = `READ_PRIVATE_FILES`
const PrivilegeReadVolume Privilege = `READ_VOLUME`
const PrivilegeRefresh Privilege = `REFRESH`
const PrivilegeSelect Privilege = `SELECT`
const PrivilegeUsage Privilege = `USAGE`
const PrivilegeUseCatalog Privilege = `USE_CATALOG`
const PrivilegeUseConnection Privilege = `USE_CONNECTION`
const PrivilegeUseMarketplaceAssets Privilege = `USE_MARKETPLACE_ASSETS`
const PrivilegeUseProvider Privilege = `USE_PROVIDER`
const PrivilegeUseRecipient Privilege = `USE_RECIPIENT`
const PrivilegeUseSchema Privilege = `USE_SCHEMA`
const PrivilegeWriteFiles Privilege = `WRITE_FILES`
const PrivilegeWritePrivateFiles Privilege = `WRITE_PRIVATE_FILES`
const PrivilegeWriteVolume Privilege = `WRITE_VOLUME`
type PrivilegeAssignment ¶
type PrivilegeAssignment struct {
// The principal (user email address or group name). For deleted principals,
// `principal` is empty while `principal_id` is populated.
Principal string `json:"principal,omitempty"`
// The privileges assigned to the principal.
Privileges []Privilege `json:"privileges,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (PrivilegeAssignment) MarshalJSON ¶ added in v0.23.0
func (s PrivilegeAssignment) MarshalJSON() ([]byte, error)
func (*PrivilegeAssignment) UnmarshalJSON ¶ added in v0.23.0
func (s *PrivilegeAssignment) UnmarshalJSON(b []byte) error
type ProvisioningInfo ¶ added in v0.18.0
type ProvisioningInfo struct {
// The provisioning state of the resource.
State ProvisioningInfoState `json:"state,omitempty"`
}
Status of an asynchronously provisioned resource.
type ProvisioningInfoState ¶ added in v0.18.0
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 ¶ added in v0.18.0
func (f *ProvisioningInfoState) Set(v string) error
Set raw string value and validate it against allowed values
func (*ProvisioningInfoState) String ¶ added in v0.18.0
func (f *ProvisioningInfoState) String() string
String representation for fmt.Print
func (*ProvisioningInfoState) Type ¶ added in v0.18.0
func (f *ProvisioningInfoState) Type() string
Type always returns ProvisioningInfoState to satisfy [pflag.Value] interface
func (*ProvisioningInfoState) Values ¶ added in v0.72.0
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 ProvisioningStatus ¶ added in v0.33.0
type ProvisioningStatus struct {
// Details about initial data synchronization. Only populated when in the
// PROVISIONING_INITIAL_SNAPSHOT state.
InitialPipelineSyncProgress *PipelineProgress `json:"initial_pipeline_sync_progress,omitempty"`
}
Detailed status of an online table. Shown if the online table is in the PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state.
type QualityMonitorsAPI ¶ added in v0.41.0
type QualityMonitorsAPI struct {
// contains filtered or unexported fields
}
A monitor computes and monitors data or model quality metrics for a table over time. It generates metrics tables and a dashboard that you can use to monitor table health and set alerts. Most write operations require the user to be the owner of the table (or its parent schema or parent catalog). Viewing the dashboard, computed metrics, or monitor configuration only requires the user to have **SELECT** privileges on the table (along with **USE_SCHEMA** and **USE_CATALOG**).
func NewQualityMonitors ¶ added in v0.41.0
func NewQualityMonitors(client *client.DatabricksClient) *QualityMonitorsAPI
func (*QualityMonitorsAPI) CancelRefresh ¶ added in v0.41.0
func (a *QualityMonitorsAPI) CancelRefresh(ctx context.Context, request CancelRefreshRequest) error
func (*QualityMonitorsAPI) Create ¶ added in v0.41.0
func (a *QualityMonitorsAPI) Create(ctx context.Context, request CreateMonitor) (*MonitorInfo, error)
func (*QualityMonitorsAPI) Delete ¶ added in v0.41.0
func (a *QualityMonitorsAPI) Delete(ctx context.Context, request DeleteQualityMonitorRequest) (*DeleteMonitorResponse, error)
func (*QualityMonitorsAPI) Get ¶ added in v0.41.0
func (a *QualityMonitorsAPI) Get(ctx context.Context, request GetQualityMonitorRequest) (*MonitorInfo, error)
func (*QualityMonitorsAPI) GetRefresh ¶ added in v0.41.0
func (a *QualityMonitorsAPI) GetRefresh(ctx context.Context, request GetRefreshRequest) (*MonitorRefreshInfo, error)
func (*QualityMonitorsAPI) ListRefreshes ¶ added in v0.41.0
func (a *QualityMonitorsAPI) ListRefreshes(ctx context.Context, request ListRefreshesRequest) (*MonitorRefreshListResponse, error)
func (*QualityMonitorsAPI) RegenerateDashboard ¶ added in v0.46.0
func (a *QualityMonitorsAPI) RegenerateDashboard(ctx context.Context, request RegenerateDashboardRequest) (*RegenerateDashboardResponse, error)
func (*QualityMonitorsAPI) RunRefresh ¶ added in v0.41.0
func (a *QualityMonitorsAPI) RunRefresh(ctx context.Context, request RunRefreshRequest) (*MonitorRefreshInfo, error)
func (*QualityMonitorsAPI) Update ¶ added in v0.41.0
func (a *QualityMonitorsAPI) Update(ctx context.Context, request UpdateMonitor) (*MonitorInfo, error)
type QualityMonitorsInterface ¶ added in v0.41.0
type QualityMonitorsInterface interface {
// Cancels an already-initiated refresh job.
CancelRefresh(ctx context.Context, request CancelRefreshRequest) error
// Creates a new monitor for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog, have
// **USE_SCHEMA** on the table's parent schema, and have **SELECT** access on
// the table 2. have **USE_CATALOG** on the table's parent catalog, be an owner
// of the table's parent schema, and have **SELECT** access on the table. 3.
// have the following permissions: - **USE_CATALOG** on the table's parent
// catalog - **USE_SCHEMA** on the table's parent schema - be an owner of the
// table.
//
// Workspace assets, such as the dashboard, will be created in the workspace
// where this call was made.
Create(ctx context.Context, request CreateMonitor) (*MonitorInfo, error)
// Deletes a monitor for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2. have
// **USE_CATALOG** on the table's parent catalog and be an owner of the table's
// parent schema 3. have the following permissions: - **USE_CATALOG** on the
// table's parent catalog - **USE_SCHEMA** on the table's parent schema - be an
// owner of the table.
//
// Additionally, the call must be made from the workspace where the monitor was
// created.
//
// Note that the metric tables and dashboard will not be deleted as part of this
// call; those assets must be manually cleaned up (if desired).
Delete(ctx context.Context, request DeleteQualityMonitorRequest) (*DeleteMonitorResponse, error)
// Gets a monitor for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2. have
// **USE_CATALOG** on the table's parent catalog and be an owner of the table's
// parent schema. 3. have the following permissions: - **USE_CATALOG** on the
// table's parent catalog - **USE_SCHEMA** on the table's parent schema -
// **SELECT** privilege on the table.
//
// The returned information includes configuration values, as well as
// information on assets created by the monitor. Some information (e.g.,
// dashboard) may be filtered out if the caller is in a different workspace than
// where the monitor was created.
Get(ctx context.Context, request GetQualityMonitorRequest) (*MonitorInfo, error)
// Gets info about a specific monitor refresh using the given refresh ID.
//
// The caller must either: 1. be an owner of the table's parent catalog 2. have
// **USE_CATALOG** on the table's parent catalog and be an owner of the table's
// parent schema 3. have the following permissions: - **USE_CATALOG** on the
// table's parent catalog - **USE_SCHEMA** on the table's parent schema -
// **SELECT** privilege on the table.
//
// Additionally, the call must be made from the workspace where the monitor was
// created.
GetRefresh(ctx context.Context, request GetRefreshRequest) (*MonitorRefreshInfo, error)
// Gets an array containing the history of the most recent refreshes (up to 25)
// for this table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2. have
// **USE_CATALOG** on the table's parent catalog and be an owner of the table's
// parent schema 3. have the following permissions: - **USE_CATALOG** on the
// table's parent catalog - **USE_SCHEMA** on the table's parent schema -
// **SELECT** privilege on the table.
//
// Additionally, the call must be made from the workspace where the monitor was
// created.
ListRefreshes(ctx context.Context, request ListRefreshesRequest) (*MonitorRefreshListResponse, error)
// Regenerates the monitoring dashboard for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2. have
// **USE_CATALOG** on the table's parent catalog and be an owner of the table's
// parent schema 3. have the following permissions: - **USE_CATALOG** on the
// table's parent catalog - **USE_SCHEMA** on the table's parent schema - be an
// owner of the table
//
// The call must be made from the workspace where the monitor was created. The
// dashboard will be regenerated in the assets directory that was specified when
// the monitor was created.
RegenerateDashboard(ctx context.Context, request RegenerateDashboardRequest) (*RegenerateDashboardResponse, error)
// Queues a metric refresh on the monitor for the specified table. The refresh
// will execute in the background.
//
// The caller must either: 1. be an owner of the table's parent catalog 2. have
// **USE_CATALOG** on the table's parent catalog and be an owner of the table's
// parent schema 3. have the following permissions: - **USE_CATALOG** on the
// table's parent catalog - **USE_SCHEMA** on the table's parent schema - be an
// owner of the table
//
// Additionally, the call must be made from the workspace where the monitor was
// created.
RunRefresh(ctx context.Context, request RunRefreshRequest) (*MonitorRefreshInfo, error)
// Updates a monitor for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2. have
// **USE_CATALOG** on the table's parent catalog and be an owner of the table's
// parent schema 3. have the following permissions: - **USE_CATALOG** on the
// table's parent catalog - **USE_SCHEMA** on the table's parent schema - be an
// owner of the table.
//
// Additionally, the call must be made from the workspace where the monitor was
// created, and the caller must be the original creator of the monitor.
//
// Certain configuration fields, such as output asset identifiers, cannot be
// updated.
Update(ctx context.Context, request UpdateMonitor) (*MonitorInfo, error)
}
type QualityMonitorsService
deprecated
added in
v0.41.0
type QualityMonitorsService interface {
// Cancels an already-initiated refresh job.
CancelRefresh(ctx context.Context, request CancelRefreshRequest) error
// Creates a new monitor for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog,
// have **USE_SCHEMA** on the table's parent schema, and have **SELECT**
// access on the table 2. have **USE_CATALOG** on the table's parent
// catalog, be an owner of the table's parent schema, and have **SELECT**
// access on the table. 3. have the following permissions: - **USE_CATALOG**
// on the table's parent catalog - **USE_SCHEMA** on the table's parent
// schema - be an owner of the table.
//
// Workspace assets, such as the dashboard, will be created in the workspace
// where this call was made.
Create(ctx context.Context, request CreateMonitor) (*MonitorInfo, error)
// Deletes a monitor for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2.
// have **USE_CATALOG** on the table's parent catalog and be an owner of the
// table's parent schema 3. have the following permissions: -
// **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the
// table's parent schema - be an owner of the table.
//
// Additionally, the call must be made from the workspace where the monitor
// was created.
//
// Note that the metric tables and dashboard will not be deleted as part of
// this call; those assets must be manually cleaned up (if desired).
Delete(ctx context.Context, request DeleteQualityMonitorRequest) (*DeleteMonitorResponse, error)
// Gets a monitor for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2.
// have **USE_CATALOG** on the table's parent catalog and be an owner of the
// table's parent schema. 3. have the following permissions: -
// **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the
// table's parent schema - **SELECT** privilege on the table.
//
// The returned information includes configuration values, as well as
// information on assets created by the monitor. Some information (e.g.,
// dashboard) may be filtered out if the caller is in a different workspace
// than where the monitor was created.
Get(ctx context.Context, request GetQualityMonitorRequest) (*MonitorInfo, error)
// Gets info about a specific monitor refresh using the given refresh ID.
//
// The caller must either: 1. be an owner of the table's parent catalog 2.
// have **USE_CATALOG** on the table's parent catalog and be an owner of the
// table's parent schema 3. have the following permissions: -
// **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the
// table's parent schema - **SELECT** privilege on the table.
//
// Additionally, the call must be made from the workspace where the monitor
// was created.
GetRefresh(ctx context.Context, request GetRefreshRequest) (*MonitorRefreshInfo, error)
// Gets an array containing the history of the most recent refreshes (up to
// 25) for this table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2.
// have **USE_CATALOG** on the table's parent catalog and be an owner of the
// table's parent schema 3. have the following permissions: -
// **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the
// table's parent schema - **SELECT** privilege on the table.
//
// Additionally, the call must be made from the workspace where the monitor
// was created.
ListRefreshes(ctx context.Context, request ListRefreshesRequest) (*MonitorRefreshListResponse, error)
// Regenerates the monitoring dashboard for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2.
// have **USE_CATALOG** on the table's parent catalog and be an owner of the
// table's parent schema 3. have the following permissions: -
// **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the
// table's parent schema - be an owner of the table
//
// The call must be made from the workspace where the monitor was created.
// The dashboard will be regenerated in the assets directory that was
// specified when the monitor was created.
RegenerateDashboard(ctx context.Context, request RegenerateDashboardRequest) (*RegenerateDashboardResponse, error)
// Queues a metric refresh on the monitor for the specified table. The
// refresh will execute in the background.
//
// The caller must either: 1. be an owner of the table's parent catalog 2.
// have **USE_CATALOG** on the table's parent catalog and be an owner of the
// table's parent schema 3. have the following permissions: -
// **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the
// table's parent schema - be an owner of the table
//
// Additionally, the call must be made from the workspace where the monitor
// was created.
RunRefresh(ctx context.Context, request RunRefreshRequest) (*MonitorRefreshInfo, error)
// Updates a monitor for the specified table.
//
// The caller must either: 1. be an owner of the table's parent catalog 2.
// have **USE_CATALOG** on the table's parent catalog and be an owner of the
// table's parent schema 3. have the following permissions: -
// **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the
// table's parent schema - be an owner of the table.
//
// Additionally, the call must be made from the workspace where the monitor
// was created, and the caller must be the original creator of the monitor.
//
// Certain configuration fields, such as output asset identifiers, cannot be
// updated.
Update(ctx context.Context, request UpdateMonitor) (*MonitorInfo, error)
}
A monitor computes and monitors data or model quality metrics for a table over time. It generates metrics tables and a dashboard that you can use to monitor table health and set alerts. Most write operations require the user to be the owner of the table (or its parent schema or parent catalog). Viewing the dashboard, computed metrics, or monitor configuration only requires the user to have **SELECT** privileges on the table (along with **USE_SCHEMA** and **USE_CATALOG**).
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type QuotaInfo ¶ added in v0.45.0
type QuotaInfo struct {
// The timestamp that indicates when the quota count was last updated.
LastRefreshedAt int64 `json:"last_refreshed_at,omitempty"`
// Name of the parent resource. Returns metastore ID if the parent is a
// metastore.
ParentFullName string `json:"parent_full_name,omitempty"`
// The quota parent securable type.
ParentSecurableType SecurableType `json:"parent_securable_type,omitempty"`
// The current usage of the resource quota.
QuotaCount int `json:"quota_count,omitempty"`
// The current limit of the resource quota.
QuotaLimit int `json:"quota_limit,omitempty"`
// The name of the quota.
QuotaName string `json:"quota_name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (QuotaInfo) MarshalJSON ¶ added in v0.45.0
func (*QuotaInfo) UnmarshalJSON ¶ added in v0.45.0
type R2Credentials ¶ added in v0.47.0
type R2Credentials struct {
// The access key ID that identifies the temporary credentials.
AccessKeyId string `json:"access_key_id,omitempty"`
// The secret access key associated with the access key.
SecretAccessKey string `json:"secret_access_key,omitempty"`
// The generated JWT that users must pass to use the temporary credentials.
SessionToken string `json:"session_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
R2 temporary credentials for API authentication. Read more at https://developers.cloudflare.com/r2/api/s3/tokens/.
func (R2Credentials) MarshalJSON ¶ added in v0.47.0
func (s R2Credentials) MarshalJSON() ([]byte, error)
func (*R2Credentials) UnmarshalJSON ¶ added in v0.47.0
func (s *R2Credentials) UnmarshalJSON(b []byte) error
type ReadVolumeRequest ¶
type ReadVolumeRequest struct {
// Whether to include volumes in the response for which the principal can
// only access selective metadata for
IncludeBrowse bool `json:"-" url:"include_browse,omitempty"`
// The three-level (fully qualified) name of the volume
Name string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ReadVolumeRequest) MarshalJSON ¶ added in v0.35.0
func (s ReadVolumeRequest) MarshalJSON() ([]byte, error)
func (*ReadVolumeRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *ReadVolumeRequest) UnmarshalJSON(b []byte) error
type RegenerateDashboardRequest ¶ added in v0.46.0
type RegenerateDashboardRequest struct {
// UC table name in format `catalog.schema.table_name`. This field
// corresponds to the {full_table_name_arg} arg in the endpoint path.
TableName string `json:"-" url:"-"`
// Optional argument to specify the warehouse for dashboard regeneration. If
// not specified, the first running warehouse will be used.
WarehouseId string `json:"warehouse_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (RegenerateDashboardRequest) MarshalJSON ¶ added in v0.46.0
func (s RegenerateDashboardRequest) MarshalJSON() ([]byte, error)
func (*RegenerateDashboardRequest) UnmarshalJSON ¶ added in v0.46.0
func (s *RegenerateDashboardRequest) UnmarshalJSON(b []byte) error
type RegenerateDashboardResponse ¶ added in v0.46.0
type RegenerateDashboardResponse struct {
DashboardId string `json:"dashboard_id,omitempty"`
// Parent folder is equivalent to {assets_dir}/{tableName}
ParentFolder string `json:"parent_folder,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (RegenerateDashboardResponse) MarshalJSON ¶ added in v0.46.0
func (s RegenerateDashboardResponse) MarshalJSON() ([]byte, error)
func (*RegenerateDashboardResponse) UnmarshalJSON ¶ added in v0.46.0
func (s *RegenerateDashboardResponse) UnmarshalJSON(b []byte) error
type RegisteredModelAlias ¶ added in v0.18.0
type RegisteredModelAlias struct {
// Name of the alias, e.g. 'champion' or 'latest_stable'
AliasName string `json:"alias_name,omitempty"`
// The name of the catalog containing the model version
CatalogName string `json:"catalog_name,omitempty"`
// The unique identifier of the alias
Id string `json:"id,omitempty"`
// The name of the parent registered model of the model version, relative to
// parent schema
ModelName string `json:"model_name,omitempty"`
// The name of the schema containing the model version, relative to parent
// catalog
SchemaName string `json:"schema_name,omitempty"`
// Integer version number of the model version to which this alias points.
VersionNum int `json:"version_num,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (RegisteredModelAlias) MarshalJSON ¶ added in v0.23.0
func (s RegisteredModelAlias) MarshalJSON() ([]byte, error)
func (*RegisteredModelAlias) UnmarshalJSON ¶ added in v0.23.0
func (s *RegisteredModelAlias) UnmarshalJSON(b []byte) error
type RegisteredModelInfo ¶ added in v0.18.0
type RegisteredModelInfo struct {
// List of aliases associated with the registered model
Aliases []RegisteredModelAlias `json:"aliases,omitempty"`
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
// The name of the catalog where the schema and the registered model reside
CatalogName string `json:"catalog_name,omitempty"`
// The comment attached to the registered model
Comment string `json:"comment,omitempty"`
// Creation timestamp of the registered model in milliseconds since the Unix
// epoch
CreatedAt int64 `json:"created_at,omitempty"`
// The identifier of the user who created the registered model
CreatedBy string `json:"created_by,omitempty"`
// The three-level (fully qualified) name of the registered model
FullName string `json:"full_name,omitempty"`
// The unique identifier of the metastore
MetastoreId string `json:"metastore_id,omitempty"`
// The name of the registered model
Name string `json:"name,omitempty"`
// The identifier of the user who owns the registered model
Owner string `json:"owner,omitempty"`
// The name of the schema where the registered model resides
SchemaName string `json:"schema_name,omitempty"`
// The storage location on the cloud under which model version data files
// are stored
StorageLocation string `json:"storage_location,omitempty"`
// Last-update timestamp of the registered model in milliseconds since the
// Unix epoch
UpdatedAt int64 `json:"updated_at,omitempty"`
// The identifier of the user who updated the registered model last time
UpdatedBy string `json:"updated_by,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (RegisteredModelInfo) MarshalJSON ¶ added in v0.23.0
func (s RegisteredModelInfo) MarshalJSON() ([]byte, error)
func (*RegisteredModelInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *RegisteredModelInfo) UnmarshalJSON(b []byte) error
type RegisteredModelsAPI ¶ added in v0.18.0
type RegisteredModelsAPI struct {
// contains filtered or unexported fields
}
Databricks provides a hosted version of MLflow Model Registry in Unity Catalog. Models in Unity Catalog provide centralized access control, auditing, lineage, and discovery of ML models across Databricks workspaces.
An MLflow registered model resides in the third layer of Unity Catalog’s three-level namespace. Registered models contain model versions, which correspond to actual ML models (MLflow models). Creating new model versions currently requires use of the MLflow Python client. Once model versions are created, you can load them for batch inference using MLflow Python client APIs, or deploy them for real-time serving using Databricks Model Serving.
All operations on registered models and model versions require USE_CATALOG permissions on the enclosing catalog and USE_SCHEMA permissions on the enclosing schema. In addition, the following additional privileges are required for various operations:
* To create a registered model, users must additionally have the CREATE_MODEL permission on the target schema. * To view registered model or model version metadata, model version data files, or invoke a model version, users must additionally have the EXECUTE permission on the registered model * To update registered model or model version tags, users must additionally have APPLY TAG permissions on the registered model * To update other registered model or model version metadata (comments, aliases) create a new model version, or update permissions on the registered model, users must be owners of the registered model.
Note: The securable type for models is FUNCTION. When using REST APIs (e.g. tagging, grants) that specify a securable type, use FUNCTION as the securable type.
func NewRegisteredModels ¶ added in v0.18.0
func NewRegisteredModels(client *client.DatabricksClient) *RegisteredModelsAPI
func (*RegisteredModelsAPI) Create ¶ added in v0.18.0
func (a *RegisteredModelsAPI) Create(ctx context.Context, request CreateRegisteredModelRequest) (*RegisteredModelInfo, error)
func (*RegisteredModelsAPI) Delete ¶ added in v0.18.0
func (a *RegisteredModelsAPI) Delete(ctx context.Context, request DeleteRegisteredModelRequest) error
func (*RegisteredModelsAPI) DeleteAlias ¶ added in v0.18.0
func (a *RegisteredModelsAPI) DeleteAlias(ctx context.Context, request DeleteAliasRequest) error
func (*RegisteredModelsAPI) DeleteAliasByFullNameAndAlias ¶ added in v0.18.0
func (a *RegisteredModelsAPI) DeleteAliasByFullNameAndAlias(ctx context.Context, fullName string, alias string) error
Deletes a registered model alias.
The caller must be a metastore admin or an owner of the registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*RegisteredModelsAPI) DeleteByFullName ¶ added in v0.18.0
func (a *RegisteredModelsAPI) DeleteByFullName(ctx context.Context, fullName string) error
Deletes a registered model and all its model versions from the specified parent catalog and schema.
The caller must be a metastore admin or an owner of the registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*RegisteredModelsAPI) Get ¶ added in v0.18.0
func (a *RegisteredModelsAPI) Get(ctx context.Context, request GetRegisteredModelRequest) (*RegisteredModelInfo, error)
func (*RegisteredModelsAPI) GetByFullName ¶ added in v0.18.0
func (a *RegisteredModelsAPI) GetByFullName(ctx context.Context, fullName string) (*RegisteredModelInfo, error)
Get a registered model.
The caller must be a metastore admin or an owner of (or have the **EXECUTE** privilege on) the registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*RegisteredModelsAPI) GetByName ¶ added in v0.18.0
func (a *RegisteredModelsAPI) GetByName(ctx context.Context, name string) (*RegisteredModelInfo, error)
GetByName calls RegisteredModelsAPI.RegisteredModelInfoNameToFullNameMap and returns a single RegisteredModelInfo.
Returns an error if there's more than one RegisteredModelInfo with the same .Name.
Note: All RegisteredModelInfo instances are loaded into memory before returning matching by name.
This method is generated by Databricks SDK Code Generator.
func (*RegisteredModelsAPI) List ¶ added in v0.24.0
func (a *RegisteredModelsAPI) List(ctx context.Context, request ListRegisteredModelsRequest) listing.Iterator[RegisteredModelInfo]
List registered models. You can list registered models under a particular schema, or list all registered models in the current metastore.
The returned models are filtered based on the privileges of the calling user. For example, the metastore admin is able to list all the registered models. A regular user needs to be the owner or have the **EXECUTE** privilege on the registered model to recieve the registered models in the response. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
There is no guarantee of a specific ordering of the elements in the response.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*RegisteredModelsAPI) ListAll ¶ added in v0.18.0
func (a *RegisteredModelsAPI) ListAll(ctx context.Context, request ListRegisteredModelsRequest) ([]RegisteredModelInfo, error)
List registered models. You can list registered models under a particular schema, or list all registered models in the current metastore.
The returned models are filtered based on the privileges of the calling user. For example, the metastore admin is able to list all the registered models. A regular user needs to be the owner or have the **EXECUTE** privilege on the registered model to recieve the registered models in the response. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
There is no guarantee of a specific ordering of the elements in the response.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*RegisteredModelsAPI) RegisteredModelInfoNameToFullNameMap ¶ added in v0.18.0
func (a *RegisteredModelsAPI) RegisteredModelInfoNameToFullNameMap(ctx context.Context, request ListRegisteredModelsRequest) (map[string]string, error)
RegisteredModelInfoNameToFullNameMap calls RegisteredModelsAPI.ListAll and creates a map of results with RegisteredModelInfo.Name as key and RegisteredModelInfo.FullName as value.
Returns an error if there's more than one RegisteredModelInfo with the same .Name.
Note: All RegisteredModelInfo instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*RegisteredModelsAPI) SetAlias ¶ added in v0.18.0
func (a *RegisteredModelsAPI) SetAlias(ctx context.Context, request SetRegisteredModelAliasRequest) (*RegisteredModelAlias, error)
func (*RegisteredModelsAPI) Update ¶ added in v0.18.0
func (a *RegisteredModelsAPI) Update(ctx context.Context, request UpdateRegisteredModelRequest) (*RegisteredModelInfo, error)
type RegisteredModelsInterface ¶ added in v0.29.0
type RegisteredModelsInterface interface {
// Creates a new registered model in Unity Catalog.
//
// File storage for model versions in the registered model will be located in
// the default location which is specified by the parent schema, or the parent
// catalog, or the Metastore.
//
// For registered model creation to succeed, the user must satisfy the following
// conditions: - The caller must be a metastore admin, or be the owner of the
// parent catalog and schema, or have the **USE_CATALOG** privilege on the
// parent catalog and the **USE_SCHEMA** privilege on the parent schema. - The
// caller must have the **CREATE MODEL** or **CREATE FUNCTION** privilege on the
// parent schema.
Create(ctx context.Context, request CreateRegisteredModelRequest) (*RegisteredModelInfo, error)
// Deletes a registered model and all its model versions from the specified
// parent catalog and schema.
//
// The caller must be a metastore admin or an owner of the registered model. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
Delete(ctx context.Context, request DeleteRegisteredModelRequest) error
// Deletes a registered model and all its model versions from the specified
// parent catalog and schema.
//
// The caller must be a metastore admin or an owner of the registered model. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
DeleteByFullName(ctx context.Context, fullName string) error
// Deletes a registered model alias.
//
// The caller must be a metastore admin or an owner of the registered model. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
DeleteAlias(ctx context.Context, request DeleteAliasRequest) error
// Deletes a registered model alias.
//
// The caller must be a metastore admin or an owner of the registered model. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
DeleteAliasByFullNameAndAlias(ctx context.Context, fullName string, alias string) error
// Get a registered model.
//
// The caller must be a metastore admin or an owner of (or have the **EXECUTE**
// privilege on) the registered model. For the latter case, the caller must also
// be the owner or have the **USE_CATALOG** privilege on the parent catalog and
// the **USE_SCHEMA** privilege on the parent schema.
Get(ctx context.Context, request GetRegisteredModelRequest) (*RegisteredModelInfo, error)
// Get a registered model.
//
// The caller must be a metastore admin or an owner of (or have the **EXECUTE**
// privilege on) the registered model. For the latter case, the caller must also
// be the owner or have the **USE_CATALOG** privilege on the parent catalog and
// the **USE_SCHEMA** privilege on the parent schema.
GetByFullName(ctx context.Context, fullName string) (*RegisteredModelInfo, error)
// List registered models. You can list registered models under a particular
// schema, or list all registered models in the current metastore.
//
// The returned models are filtered based on the privileges of the calling user.
// For example, the metastore admin is able to list all the registered models. A
// regular user needs to be the owner or have the **EXECUTE** privilege on the
// registered model to recieve the registered models in the response. For the
// latter case, the caller must also be the owner or have the **USE_CATALOG**
// privilege on the parent catalog and the **USE_SCHEMA** privilege on the
// parent schema.
//
// There is no guarantee of a specific ordering of the elements in the response.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListRegisteredModelsRequest) listing.Iterator[RegisteredModelInfo]
// List registered models. You can list registered models under a particular
// schema, or list all registered models in the current metastore.
//
// The returned models are filtered based on the privileges of the calling user.
// For example, the metastore admin is able to list all the registered models. A
// regular user needs to be the owner or have the **EXECUTE** privilege on the
// registered model to recieve the registered models in the response. For the
// latter case, the caller must also be the owner or have the **USE_CATALOG**
// privilege on the parent catalog and the **USE_SCHEMA** privilege on the
// parent schema.
//
// There is no guarantee of a specific ordering of the elements in the response.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListRegisteredModelsRequest) ([]RegisteredModelInfo, error)
// RegisteredModelInfoNameToFullNameMap calls [RegisteredModelsAPI.ListAll] and creates a map of results with [RegisteredModelInfo].Name as key and [RegisteredModelInfo].FullName as value.
//
// Returns an error if there's more than one [RegisteredModelInfo] with the same .Name.
//
// Note: All [RegisteredModelInfo] instances are loaded into memory before creating a map.
//
// This method is generated by Databricks SDK Code Generator.
RegisteredModelInfoNameToFullNameMap(ctx context.Context, request ListRegisteredModelsRequest) (map[string]string, error)
// GetByName calls [RegisteredModelsAPI.RegisteredModelInfoNameToFullNameMap] and returns a single [RegisteredModelInfo].
//
// Returns an error if there's more than one [RegisteredModelInfo] with the same .Name.
//
// Note: All [RegisteredModelInfo] instances are loaded into memory before returning matching by name.
//
// This method is generated by Databricks SDK Code Generator.
GetByName(ctx context.Context, name string) (*RegisteredModelInfo, error)
// Set an alias on the specified registered model.
//
// The caller must be a metastore admin or an owner of the registered model. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
SetAlias(ctx context.Context, request SetRegisteredModelAliasRequest) (*RegisteredModelAlias, error)
// Updates the specified registered model.
//
// The caller must be a metastore admin or an owner of the registered model. For
// the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
//
// Currently only the name, the owner or the comment of the registered model can
// be updated.
Update(ctx context.Context, request UpdateRegisteredModelRequest) (*RegisteredModelInfo, error)
}
type RegisteredModelsService
deprecated
added in
v0.18.0
type RegisteredModelsService interface {
// Creates a new registered model in Unity Catalog.
//
// File storage for model versions in the registered model will be located
// in the default location which is specified by the parent schema, or the
// parent catalog, or the Metastore.
//
// For registered model creation to succeed, the user must satisfy the
// following conditions: - The caller must be a metastore admin, or be the
// owner of the parent catalog and schema, or have the **USE_CATALOG**
// privilege on the parent catalog and the **USE_SCHEMA** privilege on the
// parent schema. - The caller must have the **CREATE MODEL** or **CREATE
// FUNCTION** privilege on the parent schema.
Create(ctx context.Context, request CreateRegisteredModelRequest) (*RegisteredModelInfo, error)
// Deletes a registered model and all its model versions from the specified
// parent catalog and schema.
//
// The caller must be a metastore admin or an owner of the registered model.
// For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
Delete(ctx context.Context, request DeleteRegisteredModelRequest) error
// Deletes a registered model alias.
//
// The caller must be a metastore admin or an owner of the registered model.
// For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
DeleteAlias(ctx context.Context, request DeleteAliasRequest) error
// Get a registered model.
//
// The caller must be a metastore admin or an owner of (or have the
// **EXECUTE** privilege on) the registered model. For the latter case, the
// caller must also be the owner or have the **USE_CATALOG** privilege on
// the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
Get(ctx context.Context, request GetRegisteredModelRequest) (*RegisteredModelInfo, error)
// List registered models. You can list registered models under a particular
// schema, or list all registered models in the current metastore.
//
// The returned models are filtered based on the privileges of the calling
// user. For example, the metastore admin is able to list all the registered
// models. A regular user needs to be the owner or have the **EXECUTE**
// privilege on the registered model to recieve the registered models in the
// response. For the latter case, the caller must also be the owner or have
// the **USE_CATALOG** privilege on the parent catalog and the
// **USE_SCHEMA** privilege on the parent schema.
//
// There is no guarantee of a specific ordering of the elements in the
// response.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain
// zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
List(ctx context.Context, request ListRegisteredModelsRequest) (*ListRegisteredModelsResponse, error)
// Set an alias on the specified registered model.
//
// The caller must be a metastore admin or an owner of the registered model.
// For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
SetAlias(ctx context.Context, request SetRegisteredModelAliasRequest) (*RegisteredModelAlias, error)
// Updates the specified registered model.
//
// The caller must be a metastore admin or an owner of the registered model.
// For the latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
//
// Currently only the name, the owner or the comment of the registered model
// can be updated.
Update(ctx context.Context, request UpdateRegisteredModelRequest) (*RegisteredModelInfo, error)
}
Databricks provides a hosted version of MLflow Model Registry in Unity Catalog. Models in Unity Catalog provide centralized access control, auditing, lineage, and discovery of ML models across Databricks workspaces.
An MLflow registered model resides in the third layer of Unity Catalog’s three-level namespace. Registered models contain model versions, which correspond to actual ML models (MLflow models). Creating new model versions currently requires use of the MLflow Python client. Once model versions are created, you can load them for batch inference using MLflow Python client APIs, or deploy them for real-time serving using Databricks Model Serving.
All operations on registered models and model versions require USE_CATALOG permissions on the enclosing catalog and USE_SCHEMA permissions on the enclosing schema. In addition, the following additional privileges are required for various operations:
* To create a registered model, users must additionally have the CREATE_MODEL permission on the target schema. * To view registered model or model version metadata, model version data files, or invoke a model version, users must additionally have the EXECUTE permission on the registered model * To update registered model or model version tags, users must additionally have APPLY TAG permissions on the registered model * To update other registered model or model version metadata (comments, aliases) create a new model version, or update permissions on the registered model, users must be owners of the registered model.
Note: The securable type for models is FUNCTION. When using REST APIs (e.g. tagging, grants) that specify a securable type, use FUNCTION as the securable type.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type ResourceQuotasAPI ¶ added in v0.45.0
type ResourceQuotasAPI struct {
// contains filtered or unexported fields
}
Unity Catalog enforces resource quotas on all securable objects, which limits the number of resources that can be created. Quotas are expressed in terms of a resource type and a parent (for example, tables per metastore or schemas per catalog). The resource quota APIs enable you to monitor your current usage and limits. For more information on resource quotas see the Unity Catalog documentation.
func NewResourceQuotas ¶ added in v0.45.0
func NewResourceQuotas(client *client.DatabricksClient) *ResourceQuotasAPI
func (*ResourceQuotasAPI) GetQuota ¶ added in v0.45.0
func (a *ResourceQuotasAPI) GetQuota(ctx context.Context, request GetQuotaRequest) (*GetQuotaResponse, error)
func (*ResourceQuotasAPI) ListQuotas ¶ added in v0.45.0
func (a *ResourceQuotasAPI) ListQuotas(ctx context.Context, request ListQuotasRequest) listing.Iterator[QuotaInfo]
ListQuotas returns all quota values under the metastore. There are no SLAs on the freshness of the counts returned. This API does not trigger a refresh of quota counts.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*ResourceQuotasAPI) ListQuotasAll ¶ added in v0.45.0
func (a *ResourceQuotasAPI) ListQuotasAll(ctx context.Context, request ListQuotasRequest) ([]QuotaInfo, error)
ListQuotas returns all quota values under the metastore. There are no SLAs on the freshness of the counts returned. This API does not trigger a refresh of quota counts.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
type ResourceQuotasInterface ¶ added in v0.45.0
type ResourceQuotasInterface interface {
// The GetQuota API returns usage information for a single resource quota,
// defined as a child-parent pair. This API also refreshes the quota count if it
// is out of date. Refreshes are triggered asynchronously. The updated count
// might not be returned in the first call.
GetQuota(ctx context.Context, request GetQuotaRequest) (*GetQuotaResponse, error)
// ListQuotas returns all quota values under the metastore. There are no SLAs on
// the freshness of the counts returned. This API does not trigger a refresh of
// quota counts.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListQuotas(ctx context.Context, request ListQuotasRequest) listing.Iterator[QuotaInfo]
// ListQuotas returns all quota values under the metastore. There are no SLAs on
// the freshness of the counts returned. This API does not trigger a refresh of
// quota counts.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListQuotasAll(ctx context.Context, request ListQuotasRequest) ([]QuotaInfo, error)
}
type ResourceQuotasService
deprecated
added in
v0.45.0
type ResourceQuotasService interface {
// The GetQuota API returns usage information for a single resource quota,
// defined as a child-parent pair. This API also refreshes the quota count
// if it is out of date. Refreshes are triggered asynchronously. The updated
// count might not be returned in the first call.
GetQuota(ctx context.Context, request GetQuotaRequest) (*GetQuotaResponse, error)
// ListQuotas returns all quota values under the metastore. There are no
// SLAs on the freshness of the counts returned. This API does not trigger a
// refresh of quota counts.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain
// zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
ListQuotas(ctx context.Context, request ListQuotasRequest) (*ListQuotasResponse, error)
}
Unity Catalog enforces resource quotas on all securable objects, which limits the number of resources that can be created. Quotas are expressed in terms of a resource type and a parent (for example, tables per metastore or schemas per catalog). The resource quota APIs enable you to monitor your current usage and limits. For more information on resource quotas see the Unity Catalog documentation.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type RfaAPI ¶ added in v0.81.0
type RfaAPI struct {
// contains filtered or unexported fields
}
Request for Access enables users to request access for Unity Catalog securables.
These APIs provide a standardized way for securable owners (or users with MANAGE privileges) to manage access request destinations.
func NewRfa ¶ added in v0.81.0
func NewRfa(client *client.DatabricksClient) *RfaAPI
func (*RfaAPI) BatchCreateAccessRequests ¶ added in v0.81.0
func (a *RfaAPI) BatchCreateAccessRequests(ctx context.Context, request BatchCreateAccessRequestsRequest) (*BatchCreateAccessRequestsResponse, error)
func (*RfaAPI) GetAccessRequestDestinations ¶ added in v0.81.0
func (a *RfaAPI) GetAccessRequestDestinations(ctx context.Context, request GetAccessRequestDestinationsRequest) (*AccessRequestDestinations, error)
func (*RfaAPI) UpdateAccessRequestDestinations ¶ added in v0.81.0
func (a *RfaAPI) UpdateAccessRequestDestinations(ctx context.Context, request UpdateAccessRequestDestinationsRequest) (*AccessRequestDestinations, error)
type RfaInterface ¶ added in v0.81.0
type RfaInterface interface {
// Creates access requests for Unity Catalog permissions for a specified
// principal on a securable object. This Batch API can take in multiple
// principals, securable objects, and permissions as the input and returns the
// access request destinations for each. Principals must be unique across the
// API call.
//
// The supported securable types are: "metastore", "catalog", "schema", "table",
// "external_location", "connection", "credential", "function",
// "registered_model", and "volume".
BatchCreateAccessRequests(ctx context.Context, request BatchCreateAccessRequestsRequest) (*BatchCreateAccessRequestsResponse, error)
// Gets an array of access request destinations for the specified securable. Any
// caller can see URL destinations or the destinations on the metastore.
// Otherwise, only those with **BROWSE** permissions on the securable can see
// destinations.
//
// The supported securable types are: "metastore", "catalog", "schema", "table",
// "external_location", "connection", "credential", "function",
// "registered_model", and "volume".
GetAccessRequestDestinations(ctx context.Context, request GetAccessRequestDestinationsRequest) (*AccessRequestDestinations, error)
// Updates the access request destinations for the given securable. The caller
// must be a metastore admin, the owner of the securable, or a user that has the
// **MANAGE** privilege on the securable in order to assign destinations.
// Destinations cannot be updated for securables underneath schemas (tables,
// volumes, functions, and models). For these securable types, destinations are
// inherited from the parent securable. A maximum of 5 emails and 5 external
// notification destinations (Slack, Microsoft Teams, and Generic Webhook
// destinations) can be assigned to a securable. If a URL destination is
// assigned, no other destinations can be set.
//
// The supported securable types are: "metastore", "catalog", "schema", "table",
// "external_location", "connection", "credential", "function",
// "registered_model", and "volume".
UpdateAccessRequestDestinations(ctx context.Context, request UpdateAccessRequestDestinationsRequest) (*AccessRequestDestinations, error)
}
type RfaService
deprecated
added in
v0.81.0
type RfaService interface {
// Creates access requests for Unity Catalog permissions for a specified
// principal on a securable object. This Batch API can take in multiple
// principals, securable objects, and permissions as the input and returns
// the access request destinations for each. Principals must be unique
// across the API call.
//
// The supported securable types are: "metastore", "catalog", "schema",
// "table", "external_location", "connection", "credential", "function",
// "registered_model", and "volume".
BatchCreateAccessRequests(ctx context.Context, request BatchCreateAccessRequestsRequest) (*BatchCreateAccessRequestsResponse, error)
// Gets an array of access request destinations for the specified securable.
// Any caller can see URL destinations or the destinations on the metastore.
// Otherwise, only those with **BROWSE** permissions on the securable can
// see destinations.
//
// The supported securable types are: "metastore", "catalog", "schema",
// "table", "external_location", "connection", "credential", "function",
// "registered_model", and "volume".
GetAccessRequestDestinations(ctx context.Context, request GetAccessRequestDestinationsRequest) (*AccessRequestDestinations, error)
// Updates the access request destinations for the given securable. The
// caller must be a metastore admin, the owner of the securable, or a user
// that has the **MANAGE** privilege on the securable in order to assign
// destinations. Destinations cannot be updated for securables underneath
// schemas (tables, volumes, functions, and models). For these securable
// types, destinations are inherited from the parent securable. A maximum of
// 5 emails and 5 external notification destinations (Slack, Microsoft
// Teams, and Generic Webhook destinations) can be assigned to a securable.
// If a URL destination is assigned, no other destinations can be set.
//
// The supported securable types are: "metastore", "catalog", "schema",
// "table", "external_location", "connection", "credential", "function",
// "registered_model", and "volume".
UpdateAccessRequestDestinations(ctx context.Context, request UpdateAccessRequestDestinationsRequest) (*AccessRequestDestinations, error)
}
Request for Access enables users to request access for Unity Catalog securables.
These APIs provide a standardized way for securable owners (or users with MANAGE privileges) to manage access request destinations.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type RowFilterOptions ¶ added in v0.80.0
type RowFilterOptions struct {
// The fully qualified name of the row filter function. The function is
// called on each row of the target table. It should return a boolean value
// indicating whether the row should be visible to the user. Required on
// create and update.
FunctionName string `json:"function_name"`
// Optional list of column aliases or constant literals to be passed as
// arguments to the row filter function. The type of each column should
// match the positional argument of the row filter function.
Using []FunctionArgument `json:"using,omitempty"`
}
type RunRefreshRequest ¶ added in v0.31.0
type RunRefreshRequest struct {
// UC table name in format `catalog.schema.table_name`. table_name is case
// insensitive and spaces are disallowed.
TableName string `json:"-" url:"-"`
}
type SchemaInfo ¶
type SchemaInfo struct {
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
// Name of parent catalog.
CatalogName string `json:"catalog_name,omitempty"`
// The type of the parent catalog.
CatalogType CatalogType `json:"catalog_type,omitempty"`
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Time at which this schema was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of schema creator.
CreatedBy string `json:"created_by,omitempty"`
EffectivePredictiveOptimizationFlag *EffectivePredictiveOptimizationFlag `json:"effective_predictive_optimization_flag,omitempty"`
// Whether predictive optimization should be enabled for this object and
// objects under it.
EnablePredictiveOptimization EnablePredictiveOptimization `json:"enable_predictive_optimization,omitempty"`
// Full name of schema, in form of __catalog_name__.__schema_name__.
FullName string `json:"full_name,omitempty"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// Name of schema, relative to parent catalog.
Name string `json:"name,omitempty"`
// Username of current owner of schema.
Owner string `json:"owner,omitempty"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
// The unique identifier of the schema.
SchemaId string `json:"schema_id,omitempty"`
// Storage location for managed tables within schema.
StorageLocation string `json:"storage_location,omitempty"`
// Storage root URL for managed tables within schema.
StorageRoot string `json:"storage_root,omitempty"`
// Time at which this schema was created, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified schema.
UpdatedBy string `json:"updated_by,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Next ID: 43
func (SchemaInfo) MarshalJSON ¶ added in v0.23.0
func (s SchemaInfo) MarshalJSON() ([]byte, error)
func (*SchemaInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *SchemaInfo) UnmarshalJSON(b []byte) error
type SchemasAPI ¶
type SchemasAPI struct {
// contains filtered or unexported fields
}
A schema (also called a database) is the second layer of Unity Catalog’s three-level namespace. A schema organizes tables, views and functions. To access (or list) a table or view in a schema, users must have the USE_SCHEMA data permission on the schema and its parent catalog, and they must have the SELECT permission on the table or view.
func NewSchemas ¶
func NewSchemas(client *client.DatabricksClient) *SchemasAPI
func (*SchemasAPI) Create ¶
func (a *SchemasAPI) Create(ctx context.Context, request CreateSchema) (*SchemaInfo, error)
Example (Schemas) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
newCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", newCatalog)
created, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: newCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: newCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Schemas.DeleteByFullName(ctx, created.FullName)
if err != nil {
panic(err)
}
Example (Tables) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
Example (Volumes) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
func (*SchemasAPI) Delete ¶
func (a *SchemasAPI) Delete(ctx context.Context, request DeleteSchemaRequest) error
func (*SchemasAPI) DeleteByFullName ¶
func (a *SchemasAPI) DeleteByFullName(ctx context.Context, fullName string) error
Deletes the specified schema from the parent catalog. The caller must be the owner of the schema or an owner of the parent catalog.
func (*SchemasAPI) Get ¶
func (a *SchemasAPI) Get(ctx context.Context, request GetSchemaRequest) (*SchemaInfo, error)
Example (Schemas) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
newCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", newCatalog)
created, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: newCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.Schemas.GetByFullName(ctx, created.FullName)
if err != nil {
panic(err)
}
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: newCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Schemas.DeleteByFullName(ctx, created.FullName)
if err != nil {
panic(err)
}
func (*SchemasAPI) GetByFullName ¶
func (a *SchemasAPI) GetByFullName(ctx context.Context, fullName string) (*SchemaInfo, error)
Gets the specified schema within the metastore. The caller must be a metastore admin, the owner of the schema, or a user that has the **USE_SCHEMA** privilege on the schema.
func (*SchemasAPI) List ¶ added in v0.24.0
func (a *SchemasAPI) List(ctx context.Context, request ListSchemasRequest) listing.Iterator[SchemaInfo]
Gets an array of schemas for a catalog in the metastore. If the caller is the metastore admin or the owner of the parent catalog, all schemas for the catalog will be retrieved. Otherwise, only schemas owned by the caller (or for which the caller has the **USE_SCHEMA** privilege) will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (Schemas) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
newCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", newCatalog)
all, err := w.Schemas.ListAll(ctx, catalog.ListSchemasRequest{
CatalogName: newCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", all)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: newCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
func (*SchemasAPI) ListAll ¶
func (a *SchemasAPI) ListAll(ctx context.Context, request ListSchemasRequest) ([]SchemaInfo, error)
Gets an array of schemas for a catalog in the metastore. If the caller is the metastore admin or the owner of the parent catalog, all schemas for the catalog will be retrieved. Otherwise, only schemas owned by the caller (or for which the caller has the **USE_SCHEMA** privilege) will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*SchemasAPI) Update ¶
func (a *SchemasAPI) Update(ctx context.Context, request UpdateSchema) (*SchemaInfo, error)
Example (Schemas) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
newCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", newCatalog)
created, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: newCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.Schemas.Update(ctx, catalog.UpdateSchema{
FullName: created.FullName,
Comment: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: newCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Schemas.DeleteByFullName(ctx, created.FullName)
if err != nil {
panic(err)
}
type SchemasInterface ¶ added in v0.29.0
type SchemasInterface interface {
// Creates a new schema for catalog in the Metastore. The caller must be a
// metastore admin, or have the **CREATE_SCHEMA** privilege in the parent
// catalog.
Create(ctx context.Context, request CreateSchema) (*SchemaInfo, error)
// Deletes the specified schema from the parent catalog. The caller must be the
// owner of the schema or an owner of the parent catalog.
Delete(ctx context.Context, request DeleteSchemaRequest) error
// Deletes the specified schema from the parent catalog. The caller must be the
// owner of the schema or an owner of the parent catalog.
DeleteByFullName(ctx context.Context, fullName string) error
// Gets the specified schema within the metastore. The caller must be a
// metastore admin, the owner of the schema, or a user that has the
// **USE_SCHEMA** privilege on the schema.
Get(ctx context.Context, request GetSchemaRequest) (*SchemaInfo, error)
// Gets the specified schema within the metastore. The caller must be a
// metastore admin, the owner of the schema, or a user that has the
// **USE_SCHEMA** privilege on the schema.
GetByFullName(ctx context.Context, fullName string) (*SchemaInfo, error)
// Gets an array of schemas for a catalog in the metastore. If the caller is the
// metastore admin or the owner of the parent catalog, all schemas for the
// catalog will be retrieved. Otherwise, only schemas owned by the caller (or
// for which the caller has the **USE_SCHEMA** privilege) will be retrieved.
// There is no guarantee of a specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListSchemasRequest) listing.Iterator[SchemaInfo]
// Gets an array of schemas for a catalog in the metastore. If the caller is the
// metastore admin or the owner of the parent catalog, all schemas for the
// catalog will be retrieved. Otherwise, only schemas owned by the caller (or
// for which the caller has the **USE_SCHEMA** privilege) will be retrieved.
// There is no guarantee of a specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListSchemasRequest) ([]SchemaInfo, error)
// Updates a schema for a catalog. The caller must be the owner of the schema or
// a metastore admin. If the caller is a metastore admin, only the __owner__
// field can be changed in the update. If the __name__ field must be updated,
// the caller must be a metastore admin or have the **CREATE_SCHEMA** privilege
// on the parent catalog.
Update(ctx context.Context, request UpdateSchema) (*SchemaInfo, error)
}
type SchemasService
deprecated
type SchemasService interface {
// Creates a new schema for catalog in the Metastore. The caller must be a
// metastore admin, or have the **CREATE_SCHEMA** privilege in the parent
// catalog.
Create(ctx context.Context, request CreateSchema) (*SchemaInfo, error)
// Deletes the specified schema from the parent catalog. The caller must be
// the owner of the schema or an owner of the parent catalog.
Delete(ctx context.Context, request DeleteSchemaRequest) error
// Gets the specified schema within the metastore. The caller must be a
// metastore admin, the owner of the schema, or a user that has the
// **USE_SCHEMA** privilege on the schema.
Get(ctx context.Context, request GetSchemaRequest) (*SchemaInfo, error)
// Gets an array of schemas for a catalog in the metastore. If the caller is
// the metastore admin or the owner of the parent catalog, all schemas for
// the catalog will be retrieved. Otherwise, only schemas owned by the
// caller (or for which the caller has the **USE_SCHEMA** privilege) will be
// retrieved. There is no guarantee of a specific ordering of the elements
// in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListSchemasRequest) (*ListSchemasResponse, error)
// Updates a schema for a catalog. The caller must be the owner of the
// schema or a metastore admin. If the caller is a metastore admin, only the
// __owner__ field can be changed in the update. If the __name__ field must
// be updated, the caller must be a metastore admin or have the
// **CREATE_SCHEMA** privilege on the parent catalog.
Update(ctx context.Context, request UpdateSchema) (*SchemaInfo, error)
}
A schema (also called a database) is the second layer of Unity Catalog’s three-level namespace. A schema organizes tables, views and functions. To access (or list) a table or view in a schema, users must have the USE_SCHEMA data permission on the schema and its parent catalog, and they must have the SELECT permission on the table or view.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type Securable ¶ added in v0.81.0
type Securable struct {
// Required. The full name of the catalog/schema/table. Optional if
// resource_name is present.
FullName string `json:"full_name,omitempty"`
// the securable is getting shared in D2D Delta Sharing.
ProviderShare string `json:"provider_share,omitempty"`
// Required. The type of securable (catalog/schema/table). Optional if
// resource_name is present.
Type SecurableType `json:"type,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Generic definition of a securable, which is uniquely defined in a metastore by its type and full name.
func (Securable) MarshalJSON ¶ added in v0.81.0
func (*Securable) UnmarshalJSON ¶ added in v0.81.0
type SecurableKind ¶ added in v0.74.0
type SecurableKind string
Latest kind: CONNECTION_GOOGLE_ADS_OAUTH_U2M_WITH_DT = 284; Next id:285
const SecurableKindTableDbStorage SecurableKind = `TABLE_DB_STORAGE`
const SecurableKindTableDelta SecurableKind = `TABLE_DELTA`
const SecurableKindTableDeltaExternal SecurableKind = `TABLE_DELTA_EXTERNAL`
const SecurableKindTableDeltaIcebergDeltasharing SecurableKind = `TABLE_DELTA_ICEBERG_DELTASHARING`
const SecurableKindTableDeltaIcebergManaged SecurableKind = `TABLE_DELTA_ICEBERG_MANAGED`
const SecurableKindTableDeltaUniformHudiExternal SecurableKind = `TABLE_DELTA_UNIFORM_HUDI_EXTERNAL`
const SecurableKindTableDeltaUniformIcebergExternal SecurableKind = `TABLE_DELTA_UNIFORM_ICEBERG_EXTERNAL`
const SecurableKindTableDeltaUniformIcebergForeignDeltasharing SecurableKind = `TABLE_DELTA_UNIFORM_ICEBERG_FOREIGN_DELTASHARING`
const SecurableKindTableDeltaUniformIcebergForeignHiveMetastoreExternal SecurableKind = `TABLE_DELTA_UNIFORM_ICEBERG_FOREIGN_HIVE_METASTORE_EXTERNAL`
const SecurableKindTableDeltaUniformIcebergForeignHiveMetastoreManaged SecurableKind = `TABLE_DELTA_UNIFORM_ICEBERG_FOREIGN_HIVE_METASTORE_MANAGED`
const SecurableKindTableDeltaUniformIcebergForeignSnowflake SecurableKind = `TABLE_DELTA_UNIFORM_ICEBERG_FOREIGN_SNOWFLAKE`
const SecurableKindTableDeltasharing SecurableKind = `TABLE_DELTASHARING`
const SecurableKindTableDeltasharingMutable SecurableKind = `TABLE_DELTASHARING_MUTABLE`
const SecurableKindTableExternal SecurableKind = `TABLE_EXTERNAL`
const SecurableKindTableFeatureStore SecurableKind = `TABLE_FEATURE_STORE`
const SecurableKindTableFeatureStoreExternal SecurableKind = `TABLE_FEATURE_STORE_EXTERNAL`
const SecurableKindTableForeignBigquery SecurableKind = `TABLE_FOREIGN_BIGQUERY`
const SecurableKindTableForeignDatabricks SecurableKind = `TABLE_FOREIGN_DATABRICKS`
const SecurableKindTableForeignDeltasharing SecurableKind = `TABLE_FOREIGN_DELTASHARING`
const SecurableKindTableForeignHiveMetastore SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE`
const SecurableKindTableForeignHiveMetastoreDbfsExternal SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_DBFS_EXTERNAL`
const SecurableKindTableForeignHiveMetastoreDbfsManaged SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_DBFS_MANAGED`
const SecurableKindTableForeignHiveMetastoreDbfsShallowCloneExternal SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_DBFS_SHALLOW_CLONE_EXTERNAL`
const SecurableKindTableForeignHiveMetastoreDbfsShallowCloneManaged SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_DBFS_SHALLOW_CLONE_MANAGED`
const SecurableKindTableForeignHiveMetastoreDbfsView SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_DBFS_VIEW`
const SecurableKindTableForeignHiveMetastoreExternal SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_EXTERNAL`
const SecurableKindTableForeignHiveMetastoreManaged SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_MANAGED`
const SecurableKindTableForeignHiveMetastoreShallowCloneExternal SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_SHALLOW_CLONE_EXTERNAL`
const SecurableKindTableForeignHiveMetastoreShallowCloneManaged SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_SHALLOW_CLONE_MANAGED`
const SecurableKindTableForeignHiveMetastoreView SecurableKind = `TABLE_FOREIGN_HIVE_METASTORE_VIEW`
const SecurableKindTableForeignMongodb SecurableKind = `TABLE_FOREIGN_MONGODB`
const SecurableKindTableForeignMysql SecurableKind = `TABLE_FOREIGN_MYSQL`
const SecurableKindTableForeignNetsuite SecurableKind = `TABLE_FOREIGN_NETSUITE`
const SecurableKindTableForeignOracle SecurableKind = `TABLE_FOREIGN_ORACLE`
const SecurableKindTableForeignPostgresql SecurableKind = `TABLE_FOREIGN_POSTGRESQL`
const SecurableKindTableForeignRedshift SecurableKind = `TABLE_FOREIGN_REDSHIFT`
const SecurableKindTableForeignSalesforce SecurableKind = `TABLE_FOREIGN_SALESFORCE`
const SecurableKindTableForeignSalesforceDataCloud SecurableKind = `TABLE_FOREIGN_SALESFORCE_DATA_CLOUD`
const SecurableKindTableForeignSalesforceDataCloudFileSharing SecurableKind = `TABLE_FOREIGN_SALESFORCE_DATA_CLOUD_FILE_SHARING`
const SecurableKindTableForeignSalesforceDataCloudFileSharingView SecurableKind = `TABLE_FOREIGN_SALESFORCE_DATA_CLOUD_FILE_SHARING_VIEW`
const SecurableKindTableForeignSnowflake SecurableKind = `TABLE_FOREIGN_SNOWFLAKE`
const SecurableKindTableForeignSqldw SecurableKind = `TABLE_FOREIGN_SQLDW`
const SecurableKindTableForeignSqlserver SecurableKind = `TABLE_FOREIGN_SQLSERVER`
const SecurableKindTableForeignTeradata SecurableKind = `TABLE_FOREIGN_TERADATA`
const SecurableKindTableForeignWorkdayRaas SecurableKind = `TABLE_FOREIGN_WORKDAY_RAAS`
const SecurableKindTableIcebergUniformManaged SecurableKind = `TABLE_ICEBERG_UNIFORM_MANAGED`
const SecurableKindTableInternal SecurableKind = `TABLE_INTERNAL`
const SecurableKindTableManagedPostgresql SecurableKind = `TABLE_MANAGED_POSTGRESQL`
const SecurableKindTableMaterializedView SecurableKind = `TABLE_MATERIALIZED_VIEW`
const SecurableKindTableMaterializedViewDeltasharing SecurableKind = `TABLE_MATERIALIZED_VIEW_DELTASHARING`
const SecurableKindTableMetricView SecurableKind = `TABLE_METRIC_VIEW`
const SecurableKindTableMetricViewDeltasharing SecurableKind = `TABLE_METRIC_VIEW_DELTASHARING`
const SecurableKindTableOnlineVectorIndexDirect SecurableKind = `TABLE_ONLINE_VECTOR_INDEX_DIRECT`
const SecurableKindTableOnlineVectorIndexReplica SecurableKind = `TABLE_ONLINE_VECTOR_INDEX_REPLICA`
const SecurableKindTableOnlineView SecurableKind = `TABLE_ONLINE_VIEW`
const SecurableKindTableStandard SecurableKind = `TABLE_STANDARD`
const SecurableKindTableStreamingLiveTable SecurableKind = `TABLE_STREAMING_LIVE_TABLE`
const SecurableKindTableStreamingLiveTableDeltasharing SecurableKind = `TABLE_STREAMING_LIVE_TABLE_DELTASHARING`
const SecurableKindTableSystem SecurableKind = `TABLE_SYSTEM`
const SecurableKindTableSystemDeltasharing SecurableKind = `TABLE_SYSTEM_DELTASHARING`
const SecurableKindTableView SecurableKind = `TABLE_VIEW`
const SecurableKindTableViewDeltasharing SecurableKind = `TABLE_VIEW_DELTASHARING`
func (*SecurableKind) Set ¶ added in v0.74.0
func (f *SecurableKind) Set(v string) error
Set raw string value and validate it against allowed values
func (*SecurableKind) String ¶ added in v0.74.0
func (f *SecurableKind) String() string
String representation for fmt.Print
func (*SecurableKind) Type ¶ added in v0.74.0
func (f *SecurableKind) Type() string
Type always returns SecurableKind to satisfy [pflag.Value] interface
func (*SecurableKind) Values ¶ added in v0.74.0
func (f *SecurableKind) Values() []SecurableKind
Values returns all possible values for SecurableKind.
There is no guarantee on the order of the values in the slice.
type SecurableKindManifest ¶ added in v0.74.0
type SecurableKindManifest struct {
// Privileges that can be assigned to the securable.
AssignablePrivileges []string `json:"assignable_privileges,omitempty"`
// A list of capabilities in the securable kind.
Capabilities []string `json:"capabilities,omitempty"`
// Detailed specs of allowed options.
Options []OptionSpec `json:"options,omitempty"`
// Securable kind to get manifest of.
SecurableKind SecurableKind `json:"securable_kind,omitempty"`
// Securable Type of the kind.
SecurableType SecurableType `json:"securable_type,omitempty"`
}
Manifest of a specific securable kind.
type SecurablePermissions ¶ added in v0.81.0
type SecurableType ¶
type SecurableType string
The type of Unity Catalog securable.
const SecurableTypeCatalog SecurableType = `CATALOG`
const SecurableTypeCleanRoom SecurableType = `CLEAN_ROOM`
const SecurableTypeConnection SecurableType = `CONNECTION`
const SecurableTypeCredential SecurableType = `CREDENTIAL`
const SecurableTypeExternalLocation SecurableType = `EXTERNAL_LOCATION`
const SecurableTypeExternalMetadata SecurableType = `EXTERNAL_METADATA`
const SecurableTypeFunction SecurableType = `FUNCTION`
const SecurableTypeMetastore SecurableType = `METASTORE`
const SecurableTypePipeline SecurableType = `PIPELINE`
const SecurableTypeProvider SecurableType = `PROVIDER`
const SecurableTypeRecipient SecurableType = `RECIPIENT`
const SecurableTypeSchema SecurableType = `SCHEMA`
const SecurableTypeStagingTable SecurableType = `STAGING_TABLE`
const SecurableTypeStorageCredential SecurableType = `STORAGE_CREDENTIAL`
const SecurableTypeTable SecurableType = `TABLE`
const SecurableTypeVolume SecurableType = `VOLUME`
func (*SecurableType) Set ¶
func (f *SecurableType) Set(v string) error
Set raw string value and validate it against allowed values
func (*SecurableType) String ¶
func (f *SecurableType) String() string
String representation for fmt.Print
func (*SecurableType) Type ¶
func (f *SecurableType) Type() string
Type always returns SecurableType to satisfy [pflag.Value] interface
func (*SecurableType) Values ¶ added in v0.72.0
func (f *SecurableType) Values() []SecurableType
Values returns all possible values for SecurableType.
There is no guarantee on the order of the values in the slice.
type SetArtifactAllowlist ¶ added in v0.17.0
type SetArtifactAllowlist struct {
// A list of allowed artifact match patterns.
ArtifactMatchers []ArtifactMatcher `json:"artifact_matchers"`
// The artifact type of the allowlist.
ArtifactType ArtifactType `json:"-" url:"-"`
// Time at which this artifact allowlist was set, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of the user who set the artifact allowlist.
CreatedBy string `json:"created_by,omitempty"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (SetArtifactAllowlist) MarshalJSON ¶ added in v0.66.0
func (s SetArtifactAllowlist) MarshalJSON() ([]byte, error)
func (*SetArtifactAllowlist) UnmarshalJSON ¶ added in v0.66.0
func (s *SetArtifactAllowlist) UnmarshalJSON(b []byte) error
type SetRegisteredModelAliasRequest ¶ added in v0.18.0
type SetRegisteredModelAliasRequest struct {
// The name of the alias
Alias string `json:"-" url:"-"`
// The three-level (fully qualified) name of the registered model
FullName string `json:"-" url:"-"`
// The version number of the model version to which the alias points
VersionNum int `json:"version_num"`
}
type SpecialDestination ¶ added in v0.81.0
type SpecialDestination string
const SpecialDestinationSpecialDestinationCatalogOwner SpecialDestination = `SPECIAL_DESTINATION_CATALOG_OWNER`
const SpecialDestinationSpecialDestinationConnectionOwner SpecialDestination = `SPECIAL_DESTINATION_CONNECTION_OWNER`
const SpecialDestinationSpecialDestinationCredentialOwner SpecialDestination = `SPECIAL_DESTINATION_CREDENTIAL_OWNER`
const SpecialDestinationSpecialDestinationExternalLocationOwner SpecialDestination = `SPECIAL_DESTINATION_EXTERNAL_LOCATION_OWNER`
const SpecialDestinationSpecialDestinationMetastoreOwner SpecialDestination = `SPECIAL_DESTINATION_METASTORE_OWNER`
func (*SpecialDestination) Set ¶ added in v0.81.0
func (f *SpecialDestination) Set(v string) error
Set raw string value and validate it against allowed values
func (*SpecialDestination) String ¶ added in v0.81.0
func (f *SpecialDestination) String() string
String representation for fmt.Print
func (*SpecialDestination) Type ¶ added in v0.81.0
func (f *SpecialDestination) Type() string
Type always returns SpecialDestination to satisfy [pflag.Value] interface
func (*SpecialDestination) Values ¶ added in v0.81.0
func (f *SpecialDestination) Values() []SpecialDestination
Values returns all possible values for SpecialDestination.
There is no guarantee on the order of the values in the slice.
type SseEncryptionDetails ¶ added in v0.14.0
type SseEncryptionDetails struct {
// Sets the value of the 'x-amz-server-side-encryption' header in S3
// request.
Algorithm SseEncryptionDetailsAlgorithm `json:"algorithm,omitempty"`
// Optional. The ARN of the SSE-KMS key used with the S3 location, when
// algorithm = "SSE-KMS". Sets the value of the
// 'x-amz-server-side-encryption-aws-kms-key-id' header.
AwsKmsKeyArn string `json:"aws_kms_key_arn,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Server-Side Encryption properties for clients communicating with AWS s3.
func (SseEncryptionDetails) MarshalJSON ¶ added in v0.23.0
func (s SseEncryptionDetails) MarshalJSON() ([]byte, error)
func (*SseEncryptionDetails) UnmarshalJSON ¶ added in v0.23.0
func (s *SseEncryptionDetails) UnmarshalJSON(b []byte) error
type SseEncryptionDetailsAlgorithm ¶ added in v0.14.0
type SseEncryptionDetailsAlgorithm string
const SseEncryptionDetailsAlgorithmAwsSseKms SseEncryptionDetailsAlgorithm = `AWS_SSE_KMS`
const SseEncryptionDetailsAlgorithmAwsSseS3 SseEncryptionDetailsAlgorithm = `AWS_SSE_S3`
func (*SseEncryptionDetailsAlgorithm) Set ¶ added in v0.14.0
func (f *SseEncryptionDetailsAlgorithm) Set(v string) error
Set raw string value and validate it against allowed values
func (*SseEncryptionDetailsAlgorithm) String ¶ added in v0.14.0
func (f *SseEncryptionDetailsAlgorithm) String() string
String representation for fmt.Print
func (*SseEncryptionDetailsAlgorithm) Type ¶ added in v0.14.0
func (f *SseEncryptionDetailsAlgorithm) Type() string
Type always returns SseEncryptionDetailsAlgorithm to satisfy [pflag.Value] interface
func (*SseEncryptionDetailsAlgorithm) Values ¶ added in v0.72.0
func (f *SseEncryptionDetailsAlgorithm) Values() []SseEncryptionDetailsAlgorithm
Values returns all possible values for SseEncryptionDetailsAlgorithm.
There is no guarantee on the order of the values in the slice.
type StorageCredentialInfo ¶
type StorageCredentialInfo struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRoleResponse `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentityResponse `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// The Cloudflare API token configuration.
CloudflareApiToken *CloudflareApiToken `json:"cloudflare_api_token,omitempty"`
// Comment associated with the credential.
Comment string `json:"comment,omitempty"`
// Time at which this credential was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of credential creator.
CreatedBy string `json:"created_by,omitempty"`
// The Databricks managed GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccountResponse `json:"databricks_gcp_service_account,omitempty"`
// The full name of the credential.
FullName string `json:"full_name,omitempty"`
// The unique identifier of the credential.
Id string `json:"id,omitempty"`
// Whether the current securable is accessible from all workspaces or a
// specific set of workspaces.
IsolationMode IsolationMode `json:"isolation_mode,omitempty"`
// Unique identifier of the parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// The credential name. The name must be unique among storage and service
// credentials within the metastore.
Name string `json:"name,omitempty"`
// Username of current owner of credential.
Owner string `json:"owner,omitempty"`
// Whether the credential is usable only for read operations. Only
// applicable when purpose is **STORAGE**.
ReadOnly bool `json:"read_only,omitempty"`
// Time at which this credential was last modified, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified the credential.
UpdatedBy string `json:"updated_by,omitempty"`
// Whether this credential is the current metastore's root storage
// credential. Only applicable when purpose is **STORAGE**.
UsedForManagedStorage bool `json:"used_for_managed_storage,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (StorageCredentialInfo) MarshalJSON ¶ added in v0.23.0
func (s StorageCredentialInfo) MarshalJSON() ([]byte, error)
func (*StorageCredentialInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *StorageCredentialInfo) UnmarshalJSON(b []byte) error
type StorageCredentialsAPI ¶
type StorageCredentialsAPI struct {
// contains filtered or unexported fields
}
A storage credential represents an authentication and authorization mechanism for accessing data stored on your cloud tenant. Each storage credential is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to a storage credential in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.
Databricks recommends using external locations rather than using storage credentials directly.
To create storage credentials, you must be a Databricks account admin. The account admin who creates the storage credential can delegate ownership to another user or group to manage permissions on it.
func NewStorageCredentials ¶
func NewStorageCredentials(client *client.DatabricksClient) *StorageCredentialsAPI
func (*StorageCredentialsAPI) Create ¶
func (a *StorageCredentialsAPI) Create(ctx context.Context, request CreateStorageCredential) (*StorageCredentialInfo, error)
Example (ExternalLocationsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
credential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", credential)
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, credential.Name)
if err != nil {
panic(err)
}
Example (StorageCredentialsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, created.Name)
if err != nil {
panic(err)
}
Example (Volumes) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
storageCredential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
Comment: "created via SDK",
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", storageCredential)
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, storageCredential.Name)
if err != nil {
panic(err)
}
func (*StorageCredentialsAPI) Delete ¶
func (a *StorageCredentialsAPI) Delete(ctx context.Context, request DeleteStorageCredentialRequest) error
func (*StorageCredentialsAPI) DeleteByName ¶
func (a *StorageCredentialsAPI) DeleteByName(ctx context.Context, name string) error
Deletes a storage credential from the metastore. The caller must be an owner of the storage credential.
func (*StorageCredentialsAPI) Get ¶
func (a *StorageCredentialsAPI) Get(ctx context.Context, request GetStorageCredentialRequest) (*StorageCredentialInfo, error)
Example (StorageCredentialsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
byName, err := w.StorageCredentials.GetByName(ctx, created.Name)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", byName)
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, created.Name)
if err != nil {
panic(err)
}
func (*StorageCredentialsAPI) GetByName ¶
func (a *StorageCredentialsAPI) GetByName(ctx context.Context, name string) (*StorageCredentialInfo, error)
Gets a storage credential from the metastore. The caller must be a metastore admin, the owner of the storage credential, or have some permission on the storage credential.
func (*StorageCredentialsAPI) List ¶
func (a *StorageCredentialsAPI) List(ctx context.Context, request ListStorageCredentialsRequest) listing.Iterator[StorageCredentialInfo]
Gets an array of storage credentials (as __StorageCredentialInfo__ objects). The array is limited to only those storage credentials the caller has permission to access. If the caller is a metastore admin, retrieval of credentials is unrestricted. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (StorageCredentialsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
all, err := w.StorageCredentials.ListAll(ctx, catalog.ListStorageCredentialsRequest{})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", all)
func (*StorageCredentialsAPI) ListAll ¶ added in v0.9.0
func (a *StorageCredentialsAPI) ListAll(ctx context.Context, request ListStorageCredentialsRequest) ([]StorageCredentialInfo, error)
Gets an array of storage credentials (as __StorageCredentialInfo__ objects). The array is limited to only those storage credentials the caller has permission to access. If the caller is a metastore admin, retrieval of credentials is unrestricted. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*StorageCredentialsAPI) Update ¶
func (a *StorageCredentialsAPI) Update(ctx context.Context, request UpdateStorageCredential) (*StorageCredentialInfo, error)
Example (StorageCredentialsOnAws) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.StorageCredentials.Update(ctx, catalog.UpdateStorageCredential{
Name: created.Name,
Comment: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
})
if err != nil {
panic(err)
}
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, created.Name)
if err != nil {
panic(err)
}
func (*StorageCredentialsAPI) Validate ¶
func (a *StorageCredentialsAPI) Validate(ctx context.Context, request ValidateStorageCredential) (*ValidateStorageCredentialResponse, error)
type StorageCredentialsInterface ¶ added in v0.29.0
type StorageCredentialsInterface interface {
// Creates a new storage credential.
//
// The caller must be a metastore admin or have the
// **CREATE_STORAGE_CREDENTIAL** privilege on the metastore.
Create(ctx context.Context, request CreateStorageCredential) (*StorageCredentialInfo, error)
// Deletes a storage credential from the metastore. The caller must be an owner
// of the storage credential.
Delete(ctx context.Context, request DeleteStorageCredentialRequest) error
// Deletes a storage credential from the metastore. The caller must be an owner
// of the storage credential.
DeleteByName(ctx context.Context, name string) error
// Gets a storage credential from the metastore. The caller must be a metastore
// admin, the owner of the storage credential, or have some permission on the
// storage credential.
Get(ctx context.Context, request GetStorageCredentialRequest) (*StorageCredentialInfo, error)
// Gets a storage credential from the metastore. The caller must be a metastore
// admin, the owner of the storage credential, or have some permission on the
// storage credential.
GetByName(ctx context.Context, name string) (*StorageCredentialInfo, error)
// Gets an array of storage credentials (as __StorageCredentialInfo__ objects).
// The array is limited to only those storage credentials the caller has
// permission to access. If the caller is a metastore admin, retrieval of
// credentials is unrestricted. There is no guarantee of a specific ordering of
// the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListStorageCredentialsRequest) listing.Iterator[StorageCredentialInfo]
// Gets an array of storage credentials (as __StorageCredentialInfo__ objects).
// The array is limited to only those storage credentials the caller has
// permission to access. If the caller is a metastore admin, retrieval of
// credentials is unrestricted. There is no guarantee of a specific ordering of
// the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListStorageCredentialsRequest) ([]StorageCredentialInfo, error)
// Updates a storage credential on the metastore.
//
// The caller must be the owner of the storage credential or a metastore admin.
// If the caller is a metastore admin, only the **owner** field can be changed.
Update(ctx context.Context, request UpdateStorageCredential) (*StorageCredentialInfo, error)
// Validates a storage credential. At least one of __external_location_name__
// and __url__ need to be provided. If only one of them is provided, it will be
// used for validation. And if both are provided, the __url__ will be used for
// validation, and __external_location_name__ will be ignored when checking
// overlapping urls.
//
// Either the __storage_credential_name__ or the cloud-specific credential must
// be provided.
//
// The caller must be a metastore admin or the storage credential owner or have
// the **CREATE_EXTERNAL_LOCATION** privilege on the metastore and the storage
// credential.
Validate(ctx context.Context, request ValidateStorageCredential) (*ValidateStorageCredentialResponse, error)
}
type StorageCredentialsService
deprecated
type StorageCredentialsService interface {
// Creates a new storage credential.
//
// The caller must be a metastore admin or have the
// **CREATE_STORAGE_CREDENTIAL** privilege on the metastore.
Create(ctx context.Context, request CreateStorageCredential) (*StorageCredentialInfo, error)
// Deletes a storage credential from the metastore. The caller must be an
// owner of the storage credential.
Delete(ctx context.Context, request DeleteStorageCredentialRequest) error
// Gets a storage credential from the metastore. The caller must be a
// metastore admin, the owner of the storage credential, or have some
// permission on the storage credential.
Get(ctx context.Context, request GetStorageCredentialRequest) (*StorageCredentialInfo, error)
// Gets an array of storage credentials (as __StorageCredentialInfo__
// objects). The array is limited to only those storage credentials the
// caller has permission to access. If the caller is a metastore admin,
// retrieval of credentials is unrestricted. There is no guarantee of a
// specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListStorageCredentialsRequest) (*ListStorageCredentialsResponse, error)
// Updates a storage credential on the metastore.
//
// The caller must be the owner of the storage credential or a metastore
// admin. If the caller is a metastore admin, only the **owner** field can
// be changed.
Update(ctx context.Context, request UpdateStorageCredential) (*StorageCredentialInfo, error)
// Validates a storage credential. At least one of
// __external_location_name__ and __url__ need to be provided. If only one
// of them is provided, it will be used for validation. And if both are
// provided, the __url__ will be used for validation, and
// __external_location_name__ will be ignored when checking overlapping
// urls.
//
// Either the __storage_credential_name__ or the cloud-specific credential
// must be provided.
//
// The caller must be a metastore admin or the storage credential owner or
// have the **CREATE_EXTERNAL_LOCATION** privilege on the metastore and the
// storage credential.
Validate(ctx context.Context, request ValidateStorageCredential) (*ValidateStorageCredentialResponse, error)
}
A storage credential represents an authentication and authorization mechanism for accessing data stored on your cloud tenant. Each storage credential is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to a storage credential in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.
Databricks recommends using external locations rather than using storage credentials directly.
To create storage credentials, you must be a Databricks account admin. The account admin who creates the storage credential can delegate ownership to another user or group to manage permissions on it.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type SystemSchemaInfo ¶ added in v0.10.0
type SystemSchemaInfo struct {
// Name of the system schema.
Schema string `json:"schema"`
// The current state of enablement for the system schema. An empty string
// means the system schema is available and ready for opt-in. Possible
// values: AVAILABLE | ENABLE_INITIALIZED | ENABLE_COMPLETED |
// DISABLE_INITIALIZED | UNAVAILABLE | MANAGED
State string `json:"state"`
}
type SystemSchemasAPI ¶ added in v0.10.0
type SystemSchemasAPI struct {
// contains filtered or unexported fields
}
A system schema is a schema that lives within the system catalog. A system schema may contain information about customer usage of Unity Catalog such as audit-logs, billing-logs, lineage information, etc.
func NewSystemSchemas ¶ added in v0.10.0
func NewSystemSchemas(client *client.DatabricksClient) *SystemSchemasAPI
func (*SystemSchemasAPI) Disable ¶ added in v0.10.0
func (a *SystemSchemasAPI) Disable(ctx context.Context, request DisableRequest) error
func (*SystemSchemasAPI) DisableByMetastoreIdAndSchemaName ¶ added in v0.10.0
func (a *SystemSchemasAPI) DisableByMetastoreIdAndSchemaName(ctx context.Context, metastoreId string, schemaName string) error
Disables the system schema and removes it from the system catalog. The caller must be an account admin or a metastore admin.
func (*SystemSchemasAPI) Enable ¶ added in v0.10.0
func (a *SystemSchemasAPI) Enable(ctx context.Context, request EnableRequest) error
func (*SystemSchemasAPI) List ¶ added in v0.24.0
func (a *SystemSchemasAPI) List(ctx context.Context, request ListSystemSchemasRequest) listing.Iterator[SystemSchemaInfo]
Gets an array of system schemas for a metastore. The caller must be an account admin or a metastore admin.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*SystemSchemasAPI) ListAll ¶ added in v0.10.0
func (a *SystemSchemasAPI) ListAll(ctx context.Context, request ListSystemSchemasRequest) ([]SystemSchemaInfo, error)
Gets an array of system schemas for a metastore. The caller must be an account admin or a metastore admin.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*SystemSchemasAPI) ListByMetastoreId ¶ added in v0.10.0
func (a *SystemSchemasAPI) ListByMetastoreId(ctx context.Context, metastoreId string) (*ListSystemSchemasResponse, error)
Gets an array of system schemas for a metastore. The caller must be an account admin or a metastore admin.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
type SystemSchemasInterface ¶ added in v0.29.0
type SystemSchemasInterface interface {
// Disables the system schema and removes it from the system catalog. The caller
// must be an account admin or a metastore admin.
Disable(ctx context.Context, request DisableRequest) error
// Disables the system schema and removes it from the system catalog. The caller
// must be an account admin or a metastore admin.
DisableByMetastoreIdAndSchemaName(ctx context.Context, metastoreId string, schemaName string) error
// Enables the system schema and adds it to the system catalog. The caller must
// be an account admin or a metastore admin.
Enable(ctx context.Context, request EnableRequest) error
// Gets an array of system schemas for a metastore. The caller must be an
// account admin or a metastore admin.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListSystemSchemasRequest) listing.Iterator[SystemSchemaInfo]
// Gets an array of system schemas for a metastore. The caller must be an
// account admin or a metastore admin.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListSystemSchemasRequest) ([]SystemSchemaInfo, error)
// Gets an array of system schemas for a metastore. The caller must be an
// account admin or a metastore admin.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
ListByMetastoreId(ctx context.Context, metastoreId string) (*ListSystemSchemasResponse, error)
}
type SystemSchemasService
deprecated
added in
v0.10.0
type SystemSchemasService interface {
// Disables the system schema and removes it from the system catalog. The
// caller must be an account admin or a metastore admin.
Disable(ctx context.Context, request DisableRequest) error
// Enables the system schema and adds it to the system catalog. The caller
// must be an account admin or a metastore admin.
Enable(ctx context.Context, request EnableRequest) error
// Gets an array of system schemas for a metastore. The caller must be an
// account admin or a metastore admin.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListSystemSchemasRequest) (*ListSystemSchemasResponse, error)
}
A system schema is a schema that lives within the system catalog. A system schema may contain information about customer usage of Unity Catalog such as audit-logs, billing-logs, lineage information, etc.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type SystemType ¶ added in v0.74.0
type SystemType string
const SystemTypeAmazonRedshift SystemType = `AMAZON_REDSHIFT`
const SystemTypeAzureSynapse SystemType = `AZURE_SYNAPSE`
const SystemTypeConfluent SystemType = `CONFLUENT`
const SystemTypeDatabricks SystemType = `DATABRICKS`
const SystemTypeGoogleBigquery SystemType = `GOOGLE_BIGQUERY`
const SystemTypeKafka SystemType = `KAFKA`
const SystemTypeLooker SystemType = `LOOKER`
const SystemTypeMicrosoftFabric SystemType = `MICROSOFT_FABRIC`
const SystemTypeMicrosoftSqlServer SystemType = `MICROSOFT_SQL_SERVER`
const SystemTypeMongodb SystemType = `MONGODB`
const SystemTypeMysql SystemType = `MYSQL`
const SystemTypeOracle SystemType = `ORACLE`
const SystemTypeOther SystemType = `OTHER`
const SystemTypePostgresql SystemType = `POSTGRESQL`
const SystemTypePowerBi SystemType = `POWER_BI`
const SystemTypeSalesforce SystemType = `SALESFORCE`
const SystemTypeSap SystemType = `SAP`
const SystemTypeServicenow SystemType = `SERVICENOW`
const SystemTypeSnowflake SystemType = `SNOWFLAKE`
const SystemTypeStreamNative SystemType = `STREAM_NATIVE`
const SystemTypeTableau SystemType = `TABLEAU`
const SystemTypeTeradata SystemType = `TERADATA`
const SystemTypeWorkday SystemType = `WORKDAY`
func (*SystemType) Set ¶ added in v0.74.0
func (f *SystemType) Set(v string) error
Set raw string value and validate it against allowed values
func (*SystemType) String ¶ added in v0.74.0
func (f *SystemType) String() string
String representation for fmt.Print
func (*SystemType) Type ¶ added in v0.74.0
func (f *SystemType) Type() string
Type always returns SystemType to satisfy [pflag.Value] interface
func (*SystemType) Values ¶ added in v0.74.0
func (f *SystemType) Values() []SystemType
Values returns all possible values for SystemType.
There is no guarantee on the order of the values in the slice.
type TableConstraint ¶
type TableConstraint struct {
ForeignKeyConstraint *ForeignKeyConstraint `json:"foreign_key_constraint,omitempty"`
NamedTableConstraint *NamedTableConstraint `json:"named_table_constraint,omitempty"`
PrimaryKeyConstraint *PrimaryKeyConstraint `json:"primary_key_constraint,omitempty"`
}
A table constraint, as defined by *one* of the following fields being set: __primary_key_constraint__, __foreign_key_constraint__, __named_table_constraint__.
type TableConstraintsAPI ¶
type TableConstraintsAPI struct {
// contains filtered or unexported fields
}
Primary key and foreign key constraints encode relationships between fields in tables.
Primary and foreign keys are informational only and are not enforced. Foreign keys must reference a primary key in another table. This primary key is the parent constraint of the foreign key and the table this primary key is on is the parent table of the foreign key. Similarly, the foreign key is the child constraint of its referenced primary key; the table of the foreign key is the child table of the primary key.
You can declare primary keys and foreign keys as part of the table specification during table creation. You can also add or drop constraints on existing tables.
func NewTableConstraints ¶
func NewTableConstraints(client *client.DatabricksClient) *TableConstraintsAPI
func (*TableConstraintsAPI) Create ¶
func (a *TableConstraintsAPI) Create(ctx context.Context, request CreateTableConstraint) (*TableConstraint, error)
func (*TableConstraintsAPI) Delete ¶
func (a *TableConstraintsAPI) Delete(ctx context.Context, request DeleteTableConstraintRequest) error
func (*TableConstraintsAPI) DeleteByFullName ¶
func (a *TableConstraintsAPI) DeleteByFullName(ctx context.Context, fullName string) error
Deletes a table constraint.
For the table constraint deletion to succeed, the user must satisfy both of these conditions: - the user must have the **USE_CATALOG** privilege on the table's parent catalog, the **USE_SCHEMA** privilege on the table's parent schema, and be the owner of the table. - if __cascade__ argument is **true**, the user must have the following permissions on all of the child tables: the **USE_CATALOG** privilege on the table's catalog, the **USE_SCHEMA** privilege on the table's schema, and be the owner of the table.
type TableConstraintsInterface ¶ added in v0.29.0
type TableConstraintsInterface interface {
// Creates a new table constraint.
//
// For the table constraint creation to succeed, the user must satisfy both of
// these conditions: - the user must have the **USE_CATALOG** privilege on the
// table's parent catalog, the **USE_SCHEMA** privilege on the table's parent
// schema, and be the owner of the table. - if the new constraint is a
// __ForeignKeyConstraint__, the user must have the **USE_CATALOG** privilege on
// the referenced parent table's catalog, the **USE_SCHEMA** privilege on the
// referenced parent table's schema, and be the owner of the referenced parent
// table.
Create(ctx context.Context, request CreateTableConstraint) (*TableConstraint, error)
// Deletes a table constraint.
//
// For the table constraint deletion to succeed, the user must satisfy both of
// these conditions: - the user must have the **USE_CATALOG** privilege on the
// table's parent catalog, the **USE_SCHEMA** privilege on the table's parent
// schema, and be the owner of the table. - if __cascade__ argument is **true**,
// the user must have the following permissions on all of the child tables: the
// **USE_CATALOG** privilege on the table's catalog, the **USE_SCHEMA**
// privilege on the table's schema, and be the owner of the table.
Delete(ctx context.Context, request DeleteTableConstraintRequest) error
// Deletes a table constraint.
//
// For the table constraint deletion to succeed, the user must satisfy both of
// these conditions: - the user must have the **USE_CATALOG** privilege on the
// table's parent catalog, the **USE_SCHEMA** privilege on the table's parent
// schema, and be the owner of the table. - if __cascade__ argument is **true**,
// the user must have the following permissions on all of the child tables: the
// **USE_CATALOG** privilege on the table's catalog, the **USE_SCHEMA**
// privilege on the table's schema, and be the owner of the table.
DeleteByFullName(ctx context.Context, fullName string) error
}
type TableConstraintsService
deprecated
type TableConstraintsService interface {
// Creates a new table constraint.
//
// For the table constraint creation to succeed, the user must satisfy both
// of these conditions: - the user must have the **USE_CATALOG** privilege
// on the table's parent catalog, the **USE_SCHEMA** privilege on the
// table's parent schema, and be the owner of the table. - if the new
// constraint is a __ForeignKeyConstraint__, the user must have the
// **USE_CATALOG** privilege on the referenced parent table's catalog, the
// **USE_SCHEMA** privilege on the referenced parent table's schema, and be
// the owner of the referenced parent table.
Create(ctx context.Context, request CreateTableConstraint) (*TableConstraint, error)
// Deletes a table constraint.
//
// For the table constraint deletion to succeed, the user must satisfy both
// of these conditions: - the user must have the **USE_CATALOG** privilege
// on the table's parent catalog, the **USE_SCHEMA** privilege on the
// table's parent schema, and be the owner of the table. - if __cascade__
// argument is **true**, the user must have the following permissions on all
// of the child tables: the **USE_CATALOG** privilege on the table's
// catalog, the **USE_SCHEMA** privilege on the table's schema, and be the
// owner of the table.
Delete(ctx context.Context, request DeleteTableConstraintRequest) error
}
Primary key and foreign key constraints encode relationships between fields in tables.
Primary and foreign keys are informational only and are not enforced. Foreign keys must reference a primary key in another table. This primary key is the parent constraint of the foreign key and the table this primary key is on is the parent table of the foreign key. Similarly, the foreign key is the child constraint of its referenced primary key; the table of the foreign key is the child table of the primary key.
You can declare primary keys and foreign keys as part of the table specification during table creation. You can also add or drop constraints on existing tables.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type TableDependency ¶
type TableDependency struct {
// Full name of the dependent table, in the form of
// __catalog_name__.__schema_name__.__table_name__.
TableFullName string `json:"table_full_name"`
}
A table that is dependent on a SQL object.
type TableExistsResponse ¶ added in v0.30.0
type TableExistsResponse struct {
// Whether the table exists or not.
TableExists bool `json:"table_exists,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (TableExistsResponse) MarshalJSON ¶ added in v0.30.0
func (s TableExistsResponse) MarshalJSON() ([]byte, error)
func (*TableExistsResponse) UnmarshalJSON ¶ added in v0.30.0
func (s *TableExistsResponse) UnmarshalJSON(b []byte) error
type TableInfo ¶
type TableInfo struct {
// The AWS access point to use when accesing s3 for this external location.
AccessPoint string `json:"access_point,omitempty"`
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
// Name of parent catalog.
CatalogName string `json:"catalog_name,omitempty"`
// The array of __ColumnInfo__ definitions of the table's columns.
Columns []ColumnInfo `json:"columns,omitempty"`
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Time at which this table was created, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty"`
// Username of table creator.
CreatedBy string `json:"created_by,omitempty"`
// Unique ID of the Data Access Configuration to use with the table data.
DataAccessConfigurationId string `json:"data_access_configuration_id,omitempty"`
DataSourceFormat DataSourceFormat `json:"data_source_format,omitempty"`
// Time at which this table was deleted, in epoch milliseconds. Field is
// omitted if table is not deleted.
DeletedAt int64 `json:"deleted_at,omitempty"`
// Information pertaining to current state of the delta table.
DeltaRuntimePropertiesKvpairs *DeltaRuntimePropertiesKvPairs `json:"delta_runtime_properties_kvpairs,omitempty"`
EffectivePredictiveOptimizationFlag *EffectivePredictiveOptimizationFlag `json:"effective_predictive_optimization_flag,omitempty"`
EnablePredictiveOptimization EnablePredictiveOptimization `json:"enable_predictive_optimization,omitempty"`
EncryptionDetails *EncryptionDetails `json:"encryption_details,omitempty"`
// Full name of table, in form of
// __catalog_name__.__schema_name__.__table_name__
FullName string `json:"full_name,omitempty"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// Name of table, relative to parent schema.
Name string `json:"name,omitempty"`
// Username of current owner of table.
Owner string `json:"owner,omitempty"`
// The pipeline ID of the table. Applicable for tables created by pipelines
// (Materialized View, Streaming Table, etc.).
PipelineId string `json:"pipeline_id,omitempty"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
RowFilter *TableRowFilter `json:"row_filter,omitempty"`
// Name of parent schema relative to its parent catalog.
SchemaName string `json:"schema_name,omitempty"`
// SecurableKindManifest of table, including capabilities the table has.
SecurableKindManifest *SecurableKindManifest `json:"securable_kind_manifest,omitempty"`
// List of schemes whose objects can be referenced without qualification.
SqlPath string `json:"sql_path,omitempty"`
// Name of the storage credential, when a storage credential is configured
// for use with this table.
StorageCredentialName string `json:"storage_credential_name,omitempty"`
// Storage root URL for table (for **MANAGED**, **EXTERNAL** tables).
StorageLocation string `json:"storage_location,omitempty"`
// List of table constraints. Note: this field is not set in the output of
// the __listTables__ API.
TableConstraints []TableConstraint `json:"table_constraints,omitempty"`
// The unique identifier of the table.
TableId string `json:"table_id,omitempty"`
TableType TableType `json:"table_type,omitempty"`
// Time at which this table was last modified, in epoch milliseconds.
UpdatedAt int64 `json:"updated_at,omitempty"`
// Username of user who last modified the table.
UpdatedBy string `json:"updated_by,omitempty"`
// View definition SQL (when __table_type__ is **VIEW**,
// **MATERIALIZED_VIEW**, or **STREAMING_TABLE**)
ViewDefinition string `json:"view_definition,omitempty"`
// View dependencies (when table_type == **VIEW** or **MATERIALIZED_VIEW**,
// **STREAMING_TABLE**) - when DependencyList is None, the dependency is not
// provided; - when DependencyList is an empty list, the dependency is
// provided but is empty; - when DependencyList is not an empty list,
// dependencies are provided and recorded.
ViewDependencies *DependencyList `json:"view_dependencies,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (TableInfo) MarshalJSON ¶ added in v0.23.0
func (*TableInfo) UnmarshalJSON ¶ added in v0.23.0
type TableOperation ¶ added in v0.47.0
type TableOperation string
const TableOperationRead TableOperation = `READ`
const TableOperationReadWrite TableOperation = `READ_WRITE`
func (*TableOperation) Set ¶ added in v0.47.0
func (f *TableOperation) Set(v string) error
Set raw string value and validate it against allowed values
func (*TableOperation) String ¶ added in v0.47.0
func (f *TableOperation) String() string
String representation for fmt.Print
func (*TableOperation) Type ¶ added in v0.47.0
func (f *TableOperation) Type() string
Type always returns TableOperation to satisfy [pflag.Value] interface
func (*TableOperation) Values ¶ added in v0.72.0
func (f *TableOperation) Values() []TableOperation
Values returns all possible values for TableOperation.
There is no guarantee on the order of the values in the slice.
type TableRowFilter ¶
type TableRowFilter struct {
// The full name of the row filter SQL UDF.
FunctionName string `json:"function_name"`
// The list of table columns to be passed as input to the row filter
// function. The column types should match the types of the filter function
// arguments.
InputColumnNames []string `json:"input_column_names"`
}
type TableSummary ¶
type TableSummary struct {
// The full name of the table.
FullName string `json:"full_name,omitempty"`
// SecurableKindManifest of table, including capabilities the table has.
SecurableKindManifest *SecurableKindManifest `json:"securable_kind_manifest,omitempty"`
TableType TableType `json:"table_type,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (TableSummary) MarshalJSON ¶ added in v0.23.0
func (s TableSummary) MarshalJSON() ([]byte, error)
func (*TableSummary) UnmarshalJSON ¶ added in v0.23.0
func (s *TableSummary) UnmarshalJSON(b []byte) error
type TableType ¶
type TableType string
const TableTypeExternal TableType = `EXTERNAL`
const TableTypeExternalShallowClone TableType = `EXTERNAL_SHALLOW_CLONE`
const TableTypeForeign TableType = `FOREIGN`
const TableTypeManaged TableType = `MANAGED`
const TableTypeManagedShallowClone TableType = `MANAGED_SHALLOW_CLONE`
const TableTypeMaterializedView TableType = `MATERIALIZED_VIEW`
const TableTypeMetricView TableType = `METRIC_VIEW`
const TableTypeStreamingTable TableType = `STREAMING_TABLE`
const TableTypeView TableType = `VIEW`
type TablesAPI ¶
type TablesAPI struct {
// contains filtered or unexported fields
}
A table resides in the third layer of Unity Catalog’s three-level namespace. It contains rows of data. To create a table, users must have CREATE_TABLE and USE_SCHEMA permissions on the schema, and they must have the USE_CATALOG permission on its parent catalog. To query a table, users must have the SELECT permission on the table, and they must have the USE_CATALOG permission on its parent catalog and the USE_SCHEMA permission on its parent schema.
A table can be managed or external. From an API perspective, a __VIEW__ is a particular kind of table (rather than a managed or external table).
func NewTables ¶
func NewTables(client *client.DatabricksClient) *TablesAPI
func (*TablesAPI) Create ¶ added in v0.80.0
func (a *TablesAPI) Create(ctx context.Context, request CreateTableRequest) (*TableInfo, error)
func (*TablesAPI) Delete ¶
func (a *TablesAPI) Delete(ctx context.Context, request DeleteTableRequest) error
func (*TablesAPI) DeleteByFullName ¶
Deletes a table from the specified parent catalog and schema. The caller must be the owner of the parent catalog, have the **USE_CATALOG** privilege on the parent catalog and be the owner of the parent schema, or be the owner of the table and have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*TablesAPI) Exists ¶ added in v0.30.0
func (a *TablesAPI) Exists(ctx context.Context, request ExistsRequest) (*TableExistsResponse, error)
func (*TablesAPI) ExistsByFullName ¶ added in v0.30.0
func (a *TablesAPI) ExistsByFullName(ctx context.Context, fullName string) (*TableExistsResponse, error)
Gets if a table exists in the metastore for a specific catalog and schema. The caller must satisfy one of the following requirements: * Be a metastore admin * Be the owner of the parent catalog * Be the owner of the parent schema and have the **USE_CATALOG** privilege on the parent catalog * Have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema, and either be the table owner or have the **SELECT** privilege on the table. * Have **BROWSE** privilege on the parent catalog * Have **BROWSE** privilege on the parent schema
func (*TablesAPI) Get ¶
func (a *TablesAPI) Get(ctx context.Context, request GetTableRequest) (*TableInfo, error)
Example (Tables) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
tableName := fmt.Sprintf("sdk-%x", time.Now().UnixNano())
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
_, err = w.StatementExecution.ExecuteAndWait(ctx, sql.ExecuteStatementRequest{
WarehouseId: os.Getenv("TEST_DEFAULT_WAREHOUSE_ID"),
Catalog: createdCatalog.Name,
Schema: createdSchema.Name,
Statement: fmt.Sprintf("CREATE TABLE %s AS SELECT 2+2 as four", tableName),
})
if err != nil {
panic(err)
}
tableFullName := fmt.Sprintf("%s.%s.%s", createdCatalog.Name, createdSchema.Name, tableName)
createdTable, err := w.Tables.GetByFullName(ctx, tableFullName)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdTable)
// cleanup
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Tables.DeleteByFullName(ctx, tableFullName)
if err != nil {
panic(err)
}
func (*TablesAPI) GetByFullName ¶
Gets a table from the metastore for a specific catalog and schema. The caller must satisfy one of the following requirements: * Be a metastore admin * Be the owner of the parent catalog * Be the owner of the parent schema and have the **USE_CATALOG** privilege on the parent catalog * Have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema, and either be the table owner or have the **SELECT** privilege on the table.
func (*TablesAPI) List ¶ added in v0.24.0
func (a *TablesAPI) List(ctx context.Context, request ListTablesRequest) listing.Iterator[TableInfo]
Gets an array of all tables for the current metastore under the parent catalog and schema. The caller must be a metastore admin or an owner of (or have the **SELECT** privilege on) the table. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (Tables) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
allTables, err := w.Tables.ListAll(ctx, catalog.ListTablesRequest{
CatalogName: createdCatalog.Name,
SchemaName: createdSchema.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", allTables)
// cleanup
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
func (*TablesAPI) ListAll ¶
func (a *TablesAPI) ListAll(ctx context.Context, request ListTablesRequest) ([]TableInfo, error)
Gets an array of all tables for the current metastore under the parent catalog and schema. The caller must be a metastore admin or an owner of (or have the **SELECT** privilege on) the table. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema. There is no guarantee of a specific ordering of the elements in the array.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*TablesAPI) ListSummaries ¶
func (a *TablesAPI) ListSummaries(ctx context.Context, request ListSummariesRequest) listing.Iterator[TableSummary]
Gets an array of summaries for tables for a schema and catalog within the metastore. The table summaries returned are either:
* summaries for tables (within the current metastore and parent catalog and schema), when the user is a metastore admin, or: * summaries for tables and schemas (within the current metastore and parent catalog) for which the user has ownership or the **SELECT** privilege on the table and ownership or **USE_SCHEMA** privilege on the schema, provided that the user also has ownership or the **USE_CATALOG** privilege on the parent catalog.
There is no guarantee of a specific ordering of the elements in the array.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (Tables) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
summaries, err := w.Tables.ListSummariesAll(ctx, catalog.ListSummariesRequest{
CatalogName: createdCatalog.Name,
SchemaNamePattern: createdSchema.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", summaries)
// cleanup
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
func (*TablesAPI) ListSummariesAll ¶ added in v0.10.0
func (a *TablesAPI) ListSummariesAll(ctx context.Context, request ListSummariesRequest) ([]TableSummary, error)
Gets an array of summaries for tables for a schema and catalog within the metastore. The table summaries returned are either:
* summaries for tables (within the current metastore and parent catalog and schema), when the user is a metastore admin, or: * summaries for tables and schemas (within the current metastore and parent catalog) for which the user has ownership or the **SELECT** privilege on the table and ownership or **USE_SCHEMA** privilege on the schema, provided that the user also has ownership or the **USE_CATALOG** privilege on the parent catalog.
There is no guarantee of a specific ordering of the elements in the array.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
type TablesInterface ¶ added in v0.29.0
type TablesInterface interface {
// Creates a new table in the specified catalog and schema.
//
// To create an external delta table, the caller must have the
// **EXTERNAL_USE_SCHEMA** privilege on the parent schema and the
// **EXTERNAL_USE_LOCATION** privilege on the external location. These
// privileges must always be granted explicitly, and cannot be inherited through
// ownership or **ALL_PRIVILEGES**.
//
// Standard UC permissions needed to create tables still apply: **USE_CATALOG**
// on the parent catalog (or ownership of the parent catalog), **CREATE_TABLE**
// and **USE_SCHEMA** on the parent schema (or ownership of the parent schema),
// and **CREATE_EXTERNAL_TABLE** on external location.
//
// The **columns** field needs to be in a Spark compatible format, so we
// recommend you use Spark to create these tables. The API itself does not
// validate the correctness of the column spec. If the spec is not Spark
// compatible, the tables may not be readable by Databricks Runtime.
//
// NOTE: The Create Table API for external clients only supports creating
// **external delta tables**. The values shown in the respective enums are all
// values supported by Databricks, however for this specific Create Table API,
// only **table_type** **EXTERNAL** and **data_source_format** **DELTA** are
// supported. Additionally, column masks are not supported when creating tables
// through this API.
Create(ctx context.Context, request CreateTableRequest) (*TableInfo, error)
// Deletes a table from the specified parent catalog and schema. The caller must
// be the owner of the parent catalog, have the **USE_CATALOG** privilege on the
// parent catalog and be the owner of the parent schema, or be the owner of the
// table and have the **USE_CATALOG** privilege on the parent catalog and the
// **USE_SCHEMA** privilege on the parent schema.
Delete(ctx context.Context, request DeleteTableRequest) error
// Deletes a table from the specified parent catalog and schema. The caller must
// be the owner of the parent catalog, have the **USE_CATALOG** privilege on the
// parent catalog and be the owner of the parent schema, or be the owner of the
// table and have the **USE_CATALOG** privilege on the parent catalog and the
// **USE_SCHEMA** privilege on the parent schema.
DeleteByFullName(ctx context.Context, fullName string) error
// Gets if a table exists in the metastore for a specific catalog and schema.
// The caller must satisfy one of the following requirements: * Be a metastore
// admin * Be the owner of the parent catalog * Be the owner of the parent
// schema and have the **USE_CATALOG** privilege on the parent catalog * Have
// the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema, and either be the table owner or have the
// **SELECT** privilege on the table. * Have **BROWSE** privilege on the parent
// catalog * Have **BROWSE** privilege on the parent schema
Exists(ctx context.Context, request ExistsRequest) (*TableExistsResponse, error)
// Gets if a table exists in the metastore for a specific catalog and schema.
// The caller must satisfy one of the following requirements: * Be a metastore
// admin * Be the owner of the parent catalog * Be the owner of the parent
// schema and have the **USE_CATALOG** privilege on the parent catalog * Have
// the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema, and either be the table owner or have the
// **SELECT** privilege on the table. * Have **BROWSE** privilege on the parent
// catalog * Have **BROWSE** privilege on the parent schema
ExistsByFullName(ctx context.Context, fullName string) (*TableExistsResponse, error)
// Gets a table from the metastore for a specific catalog and schema. The caller
// must satisfy one of the following requirements: * Be a metastore admin * Be
// the owner of the parent catalog * Be the owner of the parent schema and have
// the **USE_CATALOG** privilege on the parent catalog * Have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema, and either be the table owner or have the
// **SELECT** privilege on the table.
Get(ctx context.Context, request GetTableRequest) (*TableInfo, error)
// Gets a table from the metastore for a specific catalog and schema. The caller
// must satisfy one of the following requirements: * Be a metastore admin * Be
// the owner of the parent catalog * Be the owner of the parent schema and have
// the **USE_CATALOG** privilege on the parent catalog * Have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema, and either be the table owner or have the
// **SELECT** privilege on the table.
GetByFullName(ctx context.Context, fullName string) (*TableInfo, error)
// Gets an array of all tables for the current metastore under the parent
// catalog and schema. The caller must be a metastore admin or an owner of (or
// have the **SELECT** privilege on) the table. For the latter case, the caller
// must also be the owner or have the **USE_CATALOG** privilege on the parent
// catalog and the **USE_SCHEMA** privilege on the parent schema. There is no
// guarantee of a specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListTablesRequest) listing.Iterator[TableInfo]
// Gets an array of all tables for the current metastore under the parent
// catalog and schema. The caller must be a metastore admin or an owner of (or
// have the **SELECT** privilege on) the table. For the latter case, the caller
// must also be the owner or have the **USE_CATALOG** privilege on the parent
// catalog and the **USE_SCHEMA** privilege on the parent schema. There is no
// guarantee of a specific ordering of the elements in the array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListTablesRequest) ([]TableInfo, error)
// Gets an array of summaries for tables for a schema and catalog within the
// metastore. The table summaries returned are either:
//
// * summaries for tables (within the current metastore and parent catalog and
// schema), when the user is a metastore admin, or: * summaries for tables and
// schemas (within the current metastore and parent catalog) for which the user
// has ownership or the **SELECT** privilege on the table and ownership or
// **USE_SCHEMA** privilege on the schema, provided that the user also has
// ownership or the **USE_CATALOG** privilege on the parent catalog.
//
// There is no guarantee of a specific ordering of the elements in the array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListSummaries(ctx context.Context, request ListSummariesRequest) listing.Iterator[TableSummary]
// Gets an array of summaries for tables for a schema and catalog within the
// metastore. The table summaries returned are either:
//
// * summaries for tables (within the current metastore and parent catalog and
// schema), when the user is a metastore admin, or: * summaries for tables and
// schemas (within the current metastore and parent catalog) for which the user
// has ownership or the **SELECT** privilege on the table and ownership or
// **USE_SCHEMA** privilege on the schema, provided that the user also has
// ownership or the **USE_CATALOG** privilege on the parent catalog.
//
// There is no guarantee of a specific ordering of the elements in the array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListSummariesAll(ctx context.Context, request ListSummariesRequest) ([]TableSummary, error)
// Change the owner of the table. The caller must be the owner of the parent
// catalog, have the **USE_CATALOG** privilege on the parent catalog and be the
// owner of the parent schema, or be the owner of the table and have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
Update(ctx context.Context, request UpdateTableRequest) error
}
type TablesService
deprecated
type TablesService interface {
// Creates a new table in the specified catalog and schema.
//
// To create an external delta table, the caller must have the
// **EXTERNAL_USE_SCHEMA** privilege on the parent schema and the
// **EXTERNAL_USE_LOCATION** privilege on the external location. These
// privileges must always be granted explicitly, and cannot be inherited
// through ownership or **ALL_PRIVILEGES**.
//
// Standard UC permissions needed to create tables still apply:
// **USE_CATALOG** on the parent catalog (or ownership of the parent
// catalog), **CREATE_TABLE** and **USE_SCHEMA** on the parent schema (or
// ownership of the parent schema), and **CREATE_EXTERNAL_TABLE** on
// external location.
//
// The **columns** field needs to be in a Spark compatible format, so we
// recommend you use Spark to create these tables. The API itself does not
// validate the correctness of the column spec. If the spec is not Spark
// compatible, the tables may not be readable by Databricks Runtime.
//
// NOTE: The Create Table API for external clients only supports creating
// **external delta tables**. The values shown in the respective enums are
// all values supported by Databricks, however for this specific Create
// Table API, only **table_type** **EXTERNAL** and **data_source_format**
// **DELTA** are supported. Additionally, column masks are not supported
// when creating tables through this API.
Create(ctx context.Context, request CreateTableRequest) (*TableInfo, error)
// Deletes a table from the specified parent catalog and schema. The caller
// must be the owner of the parent catalog, have the **USE_CATALOG**
// privilege on the parent catalog and be the owner of the parent schema, or
// be the owner of the table and have the **USE_CATALOG** privilege on the
// parent catalog and the **USE_SCHEMA** privilege on the parent schema.
Delete(ctx context.Context, request DeleteTableRequest) error
// Gets if a table exists in the metastore for a specific catalog and
// schema. The caller must satisfy one of the following requirements: * Be a
// metastore admin * Be the owner of the parent catalog * Be the owner of
// the parent schema and have the **USE_CATALOG** privilege on the parent
// catalog * Have the **USE_CATALOG** privilege on the parent catalog and
// the **USE_SCHEMA** privilege on the parent schema, and either be the
// table owner or have the **SELECT** privilege on the table. * Have
// **BROWSE** privilege on the parent catalog * Have **BROWSE** privilege on
// the parent schema
Exists(ctx context.Context, request ExistsRequest) (*TableExistsResponse, error)
// Gets a table from the metastore for a specific catalog and schema. The
// caller must satisfy one of the following requirements: * Be a metastore
// admin * Be the owner of the parent catalog * Be the owner of the parent
// schema and have the **USE_CATALOG** privilege on the parent catalog *
// Have the **USE_CATALOG** privilege on the parent catalog and the
// **USE_SCHEMA** privilege on the parent schema, and either be the table
// owner or have the **SELECT** privilege on the table.
Get(ctx context.Context, request GetTableRequest) (*TableInfo, error)
// Gets an array of all tables for the current metastore under the parent
// catalog and schema. The caller must be a metastore admin or an owner of
// (or have the **SELECT** privilege on) the table. For the latter case, the
// caller must also be the owner or have the **USE_CATALOG** privilege on
// the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
// There is no guarantee of a specific ordering of the elements in the
// array.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
List(ctx context.Context, request ListTablesRequest) (*ListTablesResponse, error)
// Gets an array of summaries for tables for a schema and catalog within the
// metastore. The table summaries returned are either:
//
// * summaries for tables (within the current metastore and parent catalog
// and schema), when the user is a metastore admin, or: * summaries for
// tables and schemas (within the current metastore and parent catalog) for
// which the user has ownership or the **SELECT** privilege on the table and
// ownership or **USE_SCHEMA** privilege on the schema, provided that the
// user also has ownership or the **USE_CATALOG** privilege on the parent
// catalog.
//
// There is no guarantee of a specific ordering of the elements in the
// array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain
// zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
ListSummaries(ctx context.Context, request ListSummariesRequest) (*ListTableSummariesResponse, error)
// Change the owner of the table. The caller must be the owner of the parent
// catalog, have the **USE_CATALOG** privilege on the parent catalog and be
// the owner of the parent schema, or be the owner of the table and have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
Update(ctx context.Context, request UpdateTableRequest) error
}
A table resides in the third layer of Unity Catalog’s three-level namespace. It contains rows of data. To create a table, users must have CREATE_TABLE and USE_SCHEMA permissions on the schema, and they must have the USE_CATALOG permission on its parent catalog. To query a table, users must have the SELECT permission on the table, and they must have the USE_CATALOG permission on its parent catalog and the USE_SCHEMA permission on its parent schema.
A table can be managed or external. From an API perspective, a __VIEW__ is a particular kind of table (rather than a managed or external table).
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type TagKeyValue ¶ added in v0.59.0
type TagKeyValue struct {
// name of the tag
Key string `json:"key,omitempty"`
// value of the tag associated with the key, could be optional
Value string `json:"value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (TagKeyValue) MarshalJSON ¶ added in v0.59.0
func (s TagKeyValue) MarshalJSON() ([]byte, error)
func (*TagKeyValue) UnmarshalJSON ¶ added in v0.59.0
func (s *TagKeyValue) UnmarshalJSON(b []byte) error
type TemporaryCredentials ¶ added in v0.51.0
type TemporaryCredentials struct {
AwsTempCredentials *AwsCredentials `json:"aws_temp_credentials,omitempty"`
AzureAad *AzureActiveDirectoryToken `json:"azure_aad,omitempty"`
// Server time when the credential will expire, in epoch milliseconds. The
// API client is advised to cache the credential given this expiration time.
ExpirationTime int64 `json:"expiration_time,omitempty"`
GcpOauthToken *GcpOauthToken `json:"gcp_oauth_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (TemporaryCredentials) MarshalJSON ¶ added in v0.51.0
func (s TemporaryCredentials) MarshalJSON() ([]byte, error)
func (*TemporaryCredentials) UnmarshalJSON ¶ added in v0.51.0
func (s *TemporaryCredentials) UnmarshalJSON(b []byte) error
type TemporaryPathCredentialsAPI ¶ added in v0.80.0
type TemporaryPathCredentialsAPI struct {
// contains filtered or unexported fields
}
Temporary Path Credentials refer to short-lived, downscoped credentials used to access external cloud storage locations registered in Databricks. These credentials are employed to provide secure and time-limited access to data in cloud environments such as AWS, Azure, and Google Cloud. Each cloud provider has its own type of credentials: AWS uses temporary session tokens via AWS Security Token Service (STS), Azure utilizes Shared Access Signatures (SAS) for its data storage services, and Google Cloud supports temporary credentials through OAuth 2.0.
Temporary path credentials ensure that data access is limited in scope and duration, reducing the risk of unauthorized access or misuse. To use the temporary path credentials API, a metastore admin needs to enable the external_access_enabled flag (off by default) at the metastore level. A user needs to be granted the EXTERNAL USE LOCATION permission by external location owner. For requests on existing external tables, user also needs to be granted the EXTERNAL USE SCHEMA permission at the schema level by catalog admin.
Note that EXTERNAL USE SCHEMA is a schema level permission that can only be granted by catalog admin explicitly and is not included in schema ownership or ALL PRIVILEGES on the schema for security reasons. Similarly, EXTERNAL USE LOCATION is an external location level permission that can only be granted by external location owner explicitly and is not included in external location ownership or ALL PRIVILEGES on the external location for security reasons.
This API only supports temporary path credentials for external locations and external tables, and volumes will be supported in the future.
func NewTemporaryPathCredentials ¶ added in v0.80.0
func NewTemporaryPathCredentials(client *client.DatabricksClient) *TemporaryPathCredentialsAPI
func (*TemporaryPathCredentialsAPI) GenerateTemporaryPathCredentials ¶ added in v0.80.0
func (a *TemporaryPathCredentialsAPI) GenerateTemporaryPathCredentials(ctx context.Context, request GenerateTemporaryPathCredentialRequest) (*GenerateTemporaryPathCredentialResponse, error)
type TemporaryPathCredentialsInterface ¶ added in v0.80.0
type TemporaryPathCredentialsInterface interface {
// Get a short-lived credential for directly accessing cloud storage locations
// registered in Databricks. The Generate Temporary Path Credentials API is only
// supported for external storage paths, specifically external locations and
// external tables. Managed tables are not supported by this API. The metastore
// must have **external_access_enabled** flag set to true (default false). The
// caller must have the **EXTERNAL_USE_LOCATION** privilege on the external
// location; this privilege can only be granted by external location owners. For
// requests on existing external tables, the caller must also have the
// **EXTERNAL_USE_SCHEMA** privilege on the parent schema; this privilege can
// only be granted by catalog owners.
GenerateTemporaryPathCredentials(ctx context.Context, request GenerateTemporaryPathCredentialRequest) (*GenerateTemporaryPathCredentialResponse, error)
}
type TemporaryPathCredentialsService
deprecated
added in
v0.80.0
type TemporaryPathCredentialsService interface {
// Get a short-lived credential for directly accessing cloud storage
// locations registered in Databricks. The Generate Temporary Path
// Credentials API is only supported for external storage paths,
// specifically external locations and external tables. Managed tables are
// not supported by this API. The metastore must have
// **external_access_enabled** flag set to true (default false). The caller
// must have the **EXTERNAL_USE_LOCATION** privilege on the external
// location; this privilege can only be granted by external location owners.
// For requests on existing external tables, the caller must also have the
// **EXTERNAL_USE_SCHEMA** privilege on the parent schema; this privilege
// can only be granted by catalog owners.
GenerateTemporaryPathCredentials(ctx context.Context, request GenerateTemporaryPathCredentialRequest) (*GenerateTemporaryPathCredentialResponse, error)
}
Temporary Path Credentials refer to short-lived, downscoped credentials used to access external cloud storage locations registered in Databricks. These credentials are employed to provide secure and time-limited access to data in cloud environments such as AWS, Azure, and Google Cloud. Each cloud provider has its own type of credentials: AWS uses temporary session tokens via AWS Security Token Service (STS), Azure utilizes Shared Access Signatures (SAS) for its data storage services, and Google Cloud supports temporary credentials through OAuth 2.0.
Temporary path credentials ensure that data access is limited in scope and duration, reducing the risk of unauthorized access or misuse. To use the temporary path credentials API, a metastore admin needs to enable the external_access_enabled flag (off by default) at the metastore level. A user needs to be granted the EXTERNAL USE LOCATION permission by external location owner. For requests on existing external tables, user also needs to be granted the EXTERNAL USE SCHEMA permission at the schema level by catalog admin.
Note that EXTERNAL USE SCHEMA is a schema level permission that can only be granted by catalog admin explicitly and is not included in schema ownership or ALL PRIVILEGES on the schema for security reasons. Similarly, EXTERNAL USE LOCATION is an external location level permission that can only be granted by external location owner explicitly and is not included in external location ownership or ALL PRIVILEGES on the external location for security reasons.
This API only supports temporary path credentials for external locations and external tables, and volumes will be supported in the future.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type TemporaryTableCredentialsAPI ¶ added in v0.47.0
type TemporaryTableCredentialsAPI struct {
// contains filtered or unexported fields
}
Temporary Table Credentials refer to short-lived, downscoped credentials used to access cloud storage locations where table data is stored in Databricks. These credentials are employed to provide secure and time-limited access to data in cloud environments such as AWS, Azure, and Google Cloud. Each cloud provider has its own type of credentials: AWS uses temporary session tokens via AWS Security Token Service (STS), Azure utilizes Shared Access Signatures (SAS) for its data storage services, and Google Cloud supports temporary credentials through OAuth 2.0.
Temporary table credentials ensure that data access is limited in scope and duration, reducing the risk of unauthorized access or misuse. To use the temporary table credentials API, a metastore admin needs to enable the external_access_enabled flag (off by default) at the metastore level, and user needs to be granted the EXTERNAL USE SCHEMA permission at the schema level by catalog admin. Note that EXTERNAL USE SCHEMA is a schema level permission that can only be granted by catalog admin explicitly and is not included in schema ownership or ALL PRIVILEGES on the schema for security reasons.
func NewTemporaryTableCredentials ¶ added in v0.47.0
func NewTemporaryTableCredentials(client *client.DatabricksClient) *TemporaryTableCredentialsAPI
func (*TemporaryTableCredentialsAPI) GenerateTemporaryTableCredentials ¶ added in v0.47.0
func (a *TemporaryTableCredentialsAPI) GenerateTemporaryTableCredentials(ctx context.Context, request GenerateTemporaryTableCredentialRequest) (*GenerateTemporaryTableCredentialResponse, error)
type TemporaryTableCredentialsInterface ¶ added in v0.47.0
type TemporaryTableCredentialsInterface interface {
// Get a short-lived credential for directly accessing the table data on cloud
// storage. The metastore must have **external_access_enabled** flag set to true
// (default false). The caller must have the **EXTERNAL_USE_SCHEMA** privilege
// on the parent schema and this privilege can only be granted by catalog
// owners.
GenerateTemporaryTableCredentials(ctx context.Context, request GenerateTemporaryTableCredentialRequest) (*GenerateTemporaryTableCredentialResponse, error)
}
type TemporaryTableCredentialsService
deprecated
added in
v0.47.0
type TemporaryTableCredentialsService interface {
// Get a short-lived credential for directly accessing the table data on
// cloud storage. The metastore must have **external_access_enabled** flag
// set to true (default false). The caller must have the
// **EXTERNAL_USE_SCHEMA** privilege on the parent schema and this privilege
// can only be granted by catalog owners.
GenerateTemporaryTableCredentials(ctx context.Context, request GenerateTemporaryTableCredentialRequest) (*GenerateTemporaryTableCredentialResponse, error)
}
Temporary Table Credentials refer to short-lived, downscoped credentials used to access cloud storage locations where table data is stored in Databricks. These credentials are employed to provide secure and time-limited access to data in cloud environments such as AWS, Azure, and Google Cloud. Each cloud provider has its own type of credentials: AWS uses temporary session tokens via AWS Security Token Service (STS), Azure utilizes Shared Access Signatures (SAS) for its data storage services, and Google Cloud supports temporary credentials through OAuth 2.0.
Temporary table credentials ensure that data access is limited in scope and duration, reducing the risk of unauthorized access or misuse. To use the temporary table credentials API, a metastore admin needs to enable the external_access_enabled flag (off by default) at the metastore level, and user needs to be granted the EXTERNAL USE SCHEMA permission at the schema level by catalog admin. Note that EXTERNAL USE SCHEMA is a schema level permission that can only be granted by catalog admin explicitly and is not included in schema ownership or ALL PRIVILEGES on the schema for security reasons.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type TriggeredUpdateStatus ¶ added in v0.33.0
type TriggeredUpdateStatus struct {
// The last source table Delta version that was synced to the online table.
// Note that this Delta version may not be completely synced to the online
// 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 online table.
Timestamp string `json:"timestamp,omitempty"`
// Progress of the active data synchronization pipeline.
TriggeredUpdateProgress *PipelineProgress `json:"triggered_update_progress,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Detailed status of an online table. Shown if the online table is in the ONLINE_TRIGGERED_UPDATE or the ONLINE_NO_PENDING_UPDATE state.
func (TriggeredUpdateStatus) MarshalJSON ¶ added in v0.33.0
func (s TriggeredUpdateStatus) MarshalJSON() ([]byte, error)
func (*TriggeredUpdateStatus) UnmarshalJSON ¶ added in v0.33.0
func (s *TriggeredUpdateStatus) UnmarshalJSON(b []byte) error
type UnassignRequest ¶
type UpdateAccessRequestDestinationsRequest ¶ added in v0.81.0
type UpdateAccessRequestDestinationsRequest struct {
// The access request destinations to assign to the securable. For each
// destination, a **destination_id** and **destination_type** must be
// defined.
AccessRequestDestinations AccessRequestDestinations `json:"access_request_destinations"`
// The field mask must be a single string, with multiple fields separated by
// commas (no spaces). The field path is relative to the resource object,
// using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`).
// Specification of elements in sequence or map fields is not allowed, as
// only the entire collection field can be specified. Field names must
// exactly match the resource field names.
//
// A field mask of `*` indicates full replacement. It’s recommended to
// always explicitly list the fields being updated and avoid using `*`
// wildcards, as it can lead to unintended results if the API changes in the
// future.
UpdateMask string `json:"-" url:"update_mask"`
}
type UpdateAccountsMetastore ¶ added in v0.86.0
type UpdateAccountsMetastore struct {
// The organization name of a Delta Sharing entity, to be used in
// Databricks-to-Databricks Delta Sharing as the official name.
DeltaSharingOrganizationName string `json:"delta_sharing_organization_name,omitempty"`
// The lifetime of delta sharing recipient token in seconds.
DeltaSharingRecipientTokenLifetimeInSeconds int64 `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
// The scope of Delta Sharing enabled for the metastore.
DeltaSharingScope DeltaSharingScopeEnum `json:"delta_sharing_scope,omitempty"`
// Whether to allow non-DBR clients to directly access entities under the
// metastore.
ExternalAccessEnabled bool `json:"external_access_enabled,omitempty"`
// The owner of the metastore.
Owner string `json:"owner,omitempty"`
// Privilege model version of the metastore, of the form `major.minor`
// (e.g., `1.0`).
PrivilegeModelVersion string `json:"privilege_model_version,omitempty"`
// UUID of storage credential to access the metastore storage_root.
StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateAccountsMetastore) MarshalJSON ¶ added in v0.86.0
func (s UpdateAccountsMetastore) MarshalJSON() ([]byte, error)
func (*UpdateAccountsMetastore) UnmarshalJSON ¶ added in v0.86.0
func (s *UpdateAccountsMetastore) UnmarshalJSON(b []byte) error
type UpdateAccountsStorageCredential ¶ added in v0.86.0
type UpdateAccountsStorageCredential struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRoleRequest `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentityResponse `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// The Cloudflare API token configuration.
CloudflareApiToken *CloudflareApiToken `json:"cloudflare_api_token,omitempty"`
// Comment associated with the credential.
Comment string `json:"comment,omitempty"`
// The Databricks managed GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccountRequest `json:"databricks_gcp_service_account,omitempty"`
// Whether the current securable is accessible from all workspaces or a
// specific set of workspaces.
IsolationMode IsolationMode `json:"isolation_mode,omitempty"`
// Username of current owner of credential.
Owner string `json:"owner,omitempty"`
// Whether the credential is usable only for read operations. Only
// applicable when purpose is **STORAGE**.
ReadOnly bool `json:"read_only,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateAccountsStorageCredential) MarshalJSON ¶ added in v0.86.0
func (s UpdateAccountsStorageCredential) MarshalJSON() ([]byte, error)
func (*UpdateAccountsStorageCredential) UnmarshalJSON ¶ added in v0.86.0
func (s *UpdateAccountsStorageCredential) UnmarshalJSON(b []byte) error
type UpdateCatalog ¶
type UpdateCatalog struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Whether predictive optimization should be enabled for this object and
// objects under it.
EnablePredictiveOptimization EnablePredictiveOptimization `json:"enable_predictive_optimization,omitempty"`
// Whether the current securable is accessible from all workspaces or a
// specific set of workspaces.
IsolationMode CatalogIsolationMode `json:"isolation_mode,omitempty"`
// The name of the catalog.
Name string `json:"-" url:"-"`
// New name for the catalog.
NewName string `json:"new_name,omitempty"`
// A map of key-value properties attached to the securable.
Options map[string]string `json:"options,omitempty"`
// Username of current owner of catalog.
Owner string `json:"owner,omitempty"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateCatalog) MarshalJSON ¶ added in v0.23.0
func (s UpdateCatalog) MarshalJSON() ([]byte, error)
func (*UpdateCatalog) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateCatalog) UnmarshalJSON(b []byte) error
type UpdateCatalogWorkspaceBindingsResponse ¶ added in v0.69.0
type UpdateCatalogWorkspaceBindingsResponse struct {
// A list of workspace IDs
Workspaces []int64 `json:"workspaces,omitempty"`
}
type UpdateConnection ¶ added in v0.10.0
type UpdateConnection struct {
// Name of the connection.
Name string `json:"-" url:"-"`
// New name for the connection.
NewName string `json:"new_name,omitempty"`
// A map of key-value properties attached to the securable.
Options map[string]string `json:"options"`
// Username of current owner of the connection.
Owner string `json:"owner,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateConnection) MarshalJSON ¶ added in v0.23.0
func (s UpdateConnection) MarshalJSON() ([]byte, error)
func (*UpdateConnection) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateConnection) UnmarshalJSON(b []byte) error
type UpdateCredentialRequest ¶ added in v0.51.0
type UpdateCredentialRequest struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentity `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// Comment associated with the credential.
Comment string `json:"comment,omitempty"`
// The Databricks managed GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccount `json:"databricks_gcp_service_account,omitempty"`
// Force an update even if there are dependent services (when purpose is
// **SERVICE**) or dependent external locations and external tables (when
// purpose is **STORAGE**).
Force bool `json:"force,omitempty"`
// Whether the current securable is accessible from all workspaces or a
// specific set of workspaces.
IsolationMode IsolationMode `json:"isolation_mode,omitempty"`
// Name of the credential.
NameArg string `json:"-" url:"-"`
// New name of credential.
NewName string `json:"new_name,omitempty"`
// Username of current owner of credential.
Owner string `json:"owner,omitempty"`
// Whether the credential is usable only for read operations. Only
// applicable when purpose is **STORAGE**.
ReadOnly bool `json:"read_only,omitempty"`
// Supply true to this argument to skip validation of the updated
// credential.
SkipValidation bool `json:"skip_validation,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateCredentialRequest) MarshalJSON ¶ added in v0.51.0
func (s UpdateCredentialRequest) MarshalJSON() ([]byte, error)
func (*UpdateCredentialRequest) UnmarshalJSON ¶ added in v0.51.0
func (s *UpdateCredentialRequest) UnmarshalJSON(b []byte) error
type UpdateEntityTagAssignmentRequest ¶ added in v0.81.0
type UpdateEntityTagAssignmentRequest struct {
// The fully qualified name of the entity to which the tag is assigned
EntityName string `json:"-" url:"-"`
// The type of the entity to which the tag is assigned. Allowed values are:
// catalogs, schemas, tables, columns, volumes.
EntityType string `json:"-" url:"-"`
TagAssignment EntityTagAssignment `json:"tag_assignment"`
// The key of the tag
TagKey string `json:"-" url:"-"`
// The field mask must be a single string, with multiple fields separated by
// commas (no spaces). The field path is relative to the resource object,
// using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`).
// Specification of elements in sequence or map fields is not allowed, as
// only the entire collection field can be specified. Field names must
// exactly match the resource field names.
//
// A field mask of `*` indicates full replacement. It’s recommended to
// always explicitly list the fields being updated and avoid using `*`
// wildcards, as it can lead to unintended results if the API changes in the
// future.
UpdateMask string `json:"-" url:"update_mask"`
}
type UpdateExternalLineageRelationshipRequest ¶ added in v0.74.0
type UpdateExternalLineageRelationshipRequest struct {
ExternalLineageRelationship UpdateRequestExternalLineage `json:"external_lineage_relationship"`
// The field mask must be a single string, with multiple fields separated by
// commas (no spaces). The field path is relative to the resource object,
// using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`).
// Specification of elements in sequence or map fields is not allowed, as
// only the entire collection field can be specified. Field names must
// exactly match the resource field names.
//
// A field mask of `*` indicates full replacement. It’s recommended to
// always explicitly list the fields being updated and avoid using `*`
// wildcards, as it can lead to unintended results if the API changes in the
// future.
UpdateMask string `json:"-" url:"update_mask"`
}
type UpdateExternalLocation ¶
type UpdateExternalLocation struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Name of the storage credential used with this location.
CredentialName string `json:"credential_name,omitempty"`
// Whether to enable file events on this external location.
EnableFileEvents bool `json:"enable_file_events,omitempty"`
EncryptionDetails *EncryptionDetails `json:"encryption_details,omitempty"`
// Indicates whether fallback mode is enabled for this external location.
// When fallback mode is enabled, the access to the location falls back to
// cluster credentials if UC credentials are not sufficient.
Fallback bool `json:"fallback,omitempty"`
// File event queue settings. If `enable_file_events` is `true`, must be
// defined and have exactly one of the documented properties.
FileEventQueue *FileEventQueue `json:"file_event_queue,omitempty"`
// Force update even if changing url invalidates dependent external tables
// or mounts.
Force bool `json:"force,omitempty"`
IsolationMode IsolationMode `json:"isolation_mode,omitempty"`
// Name of the external location.
Name string `json:"-" url:"-"`
// New name for the external location.
NewName string `json:"new_name,omitempty"`
// The owner of the external location.
Owner string `json:"owner,omitempty"`
// Indicates whether the external location is read-only.
ReadOnly bool `json:"read_only,omitempty"`
// Skips validation of the storage credential associated with the external
// location.
SkipValidation bool `json:"skip_validation,omitempty"`
// Path URL of the external location.
Url string `json:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateExternalLocation) MarshalJSON ¶ added in v0.23.0
func (s UpdateExternalLocation) MarshalJSON() ([]byte, error)
func (*UpdateExternalLocation) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateExternalLocation) UnmarshalJSON(b []byte) error
type UpdateExternalMetadataRequest ¶ added in v0.74.0
type UpdateExternalMetadataRequest struct {
ExternalMetadata ExternalMetadata `json:"external_metadata"`
// Name of the external metadata object.
Name string `json:"-" url:"-"`
// The field mask must be a single string, with multiple fields separated by
// commas (no spaces). The field path is relative to the resource object,
// using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`).
// Specification of elements in sequence or map fields is not allowed, as
// only the entire collection field can be specified. Field names must
// exactly match the resource field names.
//
// A field mask of `*` indicates full replacement. It’s recommended to
// always explicitly list the fields being updated and avoid using `*`
// wildcards, as it can lead to unintended results if the API changes in the
// future.
UpdateMask string `json:"-" url:"update_mask"`
}
type UpdateFunction ¶
type UpdateFunction struct {
// The fully-qualified name of the function (of the form
// __catalog_name__.__schema_name__.__function__name__).
Name string `json:"-" url:"-"`
// Username of current owner of the function.
Owner string `json:"owner,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateFunction) MarshalJSON ¶ added in v0.23.0
func (s UpdateFunction) MarshalJSON() ([]byte, error)
func (*UpdateFunction) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateFunction) UnmarshalJSON(b []byte) error
type UpdateMetastore ¶
type UpdateMetastore struct {
// The organization name of a Delta Sharing entity, to be used in
// Databricks-to-Databricks Delta Sharing as the official name.
DeltaSharingOrganizationName string `json:"delta_sharing_organization_name,omitempty"`
// The lifetime of delta sharing recipient token in seconds.
DeltaSharingRecipientTokenLifetimeInSeconds int64 `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
// The scope of Delta Sharing enabled for the metastore.
DeltaSharingScope DeltaSharingScopeEnum `json:"delta_sharing_scope,omitempty"`
// Whether to allow non-DBR clients to directly access entities under the
// metastore.
ExternalAccessEnabled bool `json:"external_access_enabled,omitempty"`
// Unique ID of the metastore.
Id string `json:"-" url:"-"`
// New name for the metastore.
NewName string `json:"new_name,omitempty"`
// The owner of the metastore.
Owner string `json:"owner,omitempty"`
// Privilege model version of the metastore, of the form `major.minor`
// (e.g., `1.0`).
PrivilegeModelVersion string `json:"privilege_model_version,omitempty"`
// UUID of storage credential to access the metastore storage_root.
StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateMetastore) MarshalJSON ¶ added in v0.23.0
func (s UpdateMetastore) MarshalJSON() ([]byte, error)
func (*UpdateMetastore) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateMetastore) UnmarshalJSON(b []byte) error
type UpdateMetastoreAssignment ¶
type UpdateMetastoreAssignment struct {
// The name of the default catalog in the metastore. This field is
// deprecated. Please use "Default Namespace API" to configure the default
// catalog for a Databricks workspace.
DefaultCatalogName string `json:"default_catalog_name,omitempty"`
// The unique ID of the metastore.
MetastoreId string `json:"metastore_id,omitempty"`
// A workspace ID.
WorkspaceId int64 `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateMetastoreAssignment) MarshalJSON ¶ added in v0.23.0
func (s UpdateMetastoreAssignment) MarshalJSON() ([]byte, error)
func (*UpdateMetastoreAssignment) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateMetastoreAssignment) UnmarshalJSON(b []byte) error
type UpdateModelVersionRequest ¶ added in v0.18.0
type UpdateModelVersionRequest struct {
// List of aliases associated with the model version
Aliases []RegisteredModelAlias `json:"aliases,omitempty"`
// The name of the catalog containing the model version
CatalogName string `json:"catalog_name,omitempty"`
// The comment attached to the model version
Comment string `json:"comment,omitempty"`
CreatedAt int64 `json:"created_at,omitempty"`
// The identifier of the user who created the model version
CreatedBy string `json:"created_by,omitempty"`
// The three-level (fully qualified) name of the model version
FullName string `json:"-" url:"-"`
// The unique identifier of the model version
Id string `json:"id,omitempty"`
// The unique identifier of the metastore containing the model version
MetastoreId string `json:"metastore_id,omitempty"`
// The name of the parent registered model of the model version, relative to
// parent schema
ModelName string `json:"model_name,omitempty"`
// Model version dependencies, for feature-store packaged models
ModelVersionDependencies *DependencyList `json:"model_version_dependencies,omitempty"`
// MLflow run ID used when creating the model version, if “source“ was
// generated by an experiment run stored in an MLflow tracking server
RunId string `json:"run_id,omitempty"`
// ID of the Databricks workspace containing the MLflow run that generated
// this model version, if applicable
RunWorkspaceId int `json:"run_workspace_id,omitempty"`
// The name of the schema containing the model version, relative to parent
// catalog
SchemaName string `json:"schema_name,omitempty"`
// URI indicating the location of the source artifacts (files) for the model
// version
Source string `json:"source,omitempty"`
// Current status of the model version. Newly created model versions start
// in PENDING_REGISTRATION status, then move to READY status once the model
// version files are uploaded and the model version is finalized. Only model
// versions in READY status can be loaded for inference or served.
Status ModelVersionInfoStatus `json:"status,omitempty"`
// The storage location on the cloud under which model version data files
// are stored
StorageLocation string `json:"storage_location,omitempty"`
UpdatedAt int64 `json:"updated_at,omitempty"`
// The identifier of the user who updated the model version last time
UpdatedBy string `json:"updated_by,omitempty"`
// The integer version number of the model version
Version int `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateModelVersionRequest) MarshalJSON ¶ added in v0.23.0
func (s UpdateModelVersionRequest) MarshalJSON() ([]byte, error)
func (*UpdateModelVersionRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateModelVersionRequest) UnmarshalJSON(b []byte) error
type UpdateMonitor ¶ added in v0.30.0
type UpdateMonitor struct {
// [Create:OPT Update:OPT] Baseline table name. Baseline data is used to
// compute drift from the data in the monitored `table_name`. The baseline
// table and the monitored table shall have the same schema.
BaselineTableName string `json:"baseline_table_name,omitempty"`
// [Create:OPT Update:OPT] Custom metrics.
CustomMetrics []MonitorMetric `json:"custom_metrics,omitempty"`
// [Create:ERR Update:OPT] Id of dashboard that visualizes the computed
// metrics. This can be empty if the monitor is in PENDING state.
DashboardId string `json:"dashboard_id,omitempty"`
// [Create:OPT Update:OPT] Data classification related config.
DataClassificationConfig *MonitorDataClassificationConfig `json:"data_classification_config,omitempty"`
InferenceLog *MonitorInferenceLog `json:"inference_log,omitempty"`
// [Create:ERR Update:IGN] The latest error message for a monitor failure.
LatestMonitorFailureMsg string `json:"latest_monitor_failure_msg,omitempty"`
// [Create:OPT Update:OPT] Field for specifying notification settings.
Notifications *MonitorNotifications `json:"notifications,omitempty"`
// [Create:REQ Update:REQ] Schema where output tables are created. Needs to
// be in 2-level format {catalog}.{schema}
OutputSchemaName string `json:"output_schema_name"`
// [Create:OPT Update:OPT] The monitor schedule.
Schedule *MonitorCronSchedule `json:"schedule,omitempty"`
// [Create:OPT Update:OPT] List of column expressions to slice data with for
// targeted analysis. The data is grouped by each expression independently,
// resulting in a separate slice for each predicate and its complements. For
// example `slicing_exprs=[“col_1”, “col_2 > 10”]` will generate the
// following slices: two slices for `col_2 > 10` (True and False), and one
// slice per unique value in `col1`. For high-cardinality columns, only the
// top 100 unique values by frequency will generate slices.
SlicingExprs []string `json:"slicing_exprs,omitempty"`
// Configuration for monitoring snapshot tables.
Snapshot *MonitorSnapshot `json:"snapshot,omitempty"`
// UC table name in format `catalog.schema.table_name`. This field
// corresponds to the {full_table_name_arg} arg in the endpoint path.
TableName string `json:"-" url:"-"`
// Configuration for monitoring time series tables.
TimeSeries *MonitorTimeSeries `json:"time_series,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateMonitor) MarshalJSON ¶ added in v0.30.0
func (s UpdateMonitor) MarshalJSON() ([]byte, error)
func (*UpdateMonitor) UnmarshalJSON ¶ added in v0.30.0
func (s *UpdateMonitor) UnmarshalJSON(b []byte) error
type UpdatePermissions ¶
type UpdatePermissions struct {
// Array of permissions change objects.
Changes []PermissionsChange `json:"changes,omitempty"`
// Full name of securable.
FullName string `json:"-" url:"-"`
// Type of securable.
SecurableType string `json:"-" url:"-"`
}
type UpdatePermissionsResponse ¶ added in v0.72.0
type UpdatePermissionsResponse struct {
// The privileges assigned to each principal
PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"`
}
type UpdatePolicyRequest ¶ added in v0.80.0
type UpdatePolicyRequest struct {
// Required. The name of the policy to update.
Name string `json:"-" url:"-"`
// Required. The fully qualified name of the securable to update the policy
// for.
OnSecurableFullname string `json:"-" url:"-"`
// Required. The type of the securable to update the policy for.
OnSecurableType string `json:"-" url:"-"`
// Optional fields to update. This is the request body for updating a
// policy. Use `update_mask` field to specify which fields in the request is
// to be updated. - If `update_mask` is empty or "*", all specified fields
// will be updated. - If `update_mask` is specified, only the fields
// specified in the `update_mask` will be updated. If a field is specified
// in `update_mask` and not set in the request, the field will be cleared.
// Users can use the update mask to explicitly unset optional fields such as
// `exception_principals` and `when_condition`.
PolicyInfo PolicyInfo `json:"policy_info"`
// Optional. The update mask field for specifying user intentions on which
// fields to update in the request.
UpdateMask string `json:"-" url:"update_mask,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdatePolicyRequest) MarshalJSON ¶ added in v0.80.0
func (s UpdatePolicyRequest) MarshalJSON() ([]byte, error)
func (*UpdatePolicyRequest) UnmarshalJSON ¶ added in v0.80.0
func (s *UpdatePolicyRequest) UnmarshalJSON(b []byte) error
type UpdateRegisteredModelRequest ¶ added in v0.18.0
type UpdateRegisteredModelRequest struct {
// List of aliases associated with the registered model
Aliases []RegisteredModelAlias `json:"aliases,omitempty"`
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
// The name of the catalog where the schema and the registered model reside
CatalogName string `json:"catalog_name,omitempty"`
// The comment attached to the registered model
Comment string `json:"comment,omitempty"`
// Creation timestamp of the registered model in milliseconds since the Unix
// epoch
CreatedAt int64 `json:"created_at,omitempty"`
// The identifier of the user who created the registered model
CreatedBy string `json:"created_by,omitempty"`
// The three-level (fully qualified) name of the registered model
FullName string `json:"-" url:"-"`
// The unique identifier of the metastore
MetastoreId string `json:"metastore_id,omitempty"`
// The name of the registered model
Name string `json:"name,omitempty"`
// New name for the registered model.
NewName string `json:"new_name,omitempty"`
// The identifier of the user who owns the registered model
Owner string `json:"owner,omitempty"`
// The name of the schema where the registered model resides
SchemaName string `json:"schema_name,omitempty"`
// The storage location on the cloud under which model version data files
// are stored
StorageLocation string `json:"storage_location,omitempty"`
// Last-update timestamp of the registered model in milliseconds since the
// Unix epoch
UpdatedAt int64 `json:"updated_at,omitempty"`
// The identifier of the user who updated the registered model last time
UpdatedBy string `json:"updated_by,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateRegisteredModelRequest) MarshalJSON ¶ added in v0.23.0
func (s UpdateRegisteredModelRequest) MarshalJSON() ([]byte, error)
func (*UpdateRegisteredModelRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateRegisteredModelRequest) UnmarshalJSON(b []byte) error
type UpdateRequestExternalLineage ¶ added in v0.74.0
type UpdateRequestExternalLineage struct {
// List of column relationships between source and target objects.
Columns []ColumnRelationship `json:"columns,omitempty"`
// Unique identifier of the external lineage relationship.
Id string `json:"id,omitempty"`
// Key-value properties associated with the external lineage relationship.
Properties map[string]string `json:"properties,omitempty"`
// Source object of the external lineage relationship.
Source ExternalLineageObject `json:"source"`
// Target object of the external lineage relationship.
Target ExternalLineageObject `json:"target"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateRequestExternalLineage) MarshalJSON ¶ added in v0.74.0
func (s UpdateRequestExternalLineage) MarshalJSON() ([]byte, error)
func (*UpdateRequestExternalLineage) UnmarshalJSON ¶ added in v0.74.0
func (s *UpdateRequestExternalLineage) UnmarshalJSON(b []byte) error
type UpdateSchema ¶
type UpdateSchema struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty"`
// Whether predictive optimization should be enabled for this object and
// objects under it.
EnablePredictiveOptimization EnablePredictiveOptimization `json:"enable_predictive_optimization,omitempty"`
// Full name of the schema.
FullName string `json:"-" url:"-"`
// New name for the schema.
NewName string `json:"new_name,omitempty"`
// Username of current owner of schema.
Owner string `json:"owner,omitempty"`
// A map of key-value properties attached to the securable.
Properties map[string]string `json:"properties,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateSchema) MarshalJSON ¶ added in v0.23.0
func (s UpdateSchema) MarshalJSON() ([]byte, error)
func (*UpdateSchema) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateSchema) UnmarshalJSON(b []byte) error
type UpdateStorageCredential ¶
type UpdateStorageCredential struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRoleRequest `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentityResponse `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// The Cloudflare API token configuration.
CloudflareApiToken *CloudflareApiToken `json:"cloudflare_api_token,omitempty"`
// Comment associated with the credential.
Comment string `json:"comment,omitempty"`
// The Databricks managed GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccountRequest `json:"databricks_gcp_service_account,omitempty"`
// Force update even if there are dependent external locations or external
// tables.
Force bool `json:"force,omitempty"`
// Whether the current securable is accessible from all workspaces or a
// specific set of workspaces.
IsolationMode IsolationMode `json:"isolation_mode,omitempty"`
// Name of the storage credential.
Name string `json:"-" url:"-"`
// New name for the storage credential.
NewName string `json:"new_name,omitempty"`
// Username of current owner of credential.
Owner string `json:"owner,omitempty"`
// Whether the credential is usable only for read operations. Only
// applicable when purpose is **STORAGE**.
ReadOnly bool `json:"read_only,omitempty"`
// Supplying true to this argument skips validation of the updated
// credential.
SkipValidation bool `json:"skip_validation,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateStorageCredential) MarshalJSON ¶ added in v0.23.0
func (s UpdateStorageCredential) MarshalJSON() ([]byte, error)
func (*UpdateStorageCredential) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateStorageCredential) UnmarshalJSON(b []byte) error
type UpdateTableRequest ¶ added in v0.13.0
type UpdateTableRequest struct {
// Full name of the table.
FullName string `json:"-" url:"-"`
// Username of current owner of table.
Owner string `json:"owner,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateTableRequest) MarshalJSON ¶ added in v0.23.0
func (s UpdateTableRequest) MarshalJSON() ([]byte, error)
func (*UpdateTableRequest) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateTableRequest) UnmarshalJSON(b []byte) error
type UpdateVolumeRequestContent ¶
type UpdateVolumeRequestContent struct {
// The comment attached to the volume
Comment string `json:"comment,omitempty"`
// The three-level (fully qualified) name of the volume
Name string `json:"-" url:"-"`
// New name for the volume.
NewName string `json:"new_name,omitempty"`
// The identifier of the user who owns the volume
Owner string `json:"owner,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateVolumeRequestContent) MarshalJSON ¶ added in v0.23.0
func (s UpdateVolumeRequestContent) MarshalJSON() ([]byte, error)
func (*UpdateVolumeRequestContent) UnmarshalJSON ¶ added in v0.23.0
func (s *UpdateVolumeRequestContent) UnmarshalJSON(b []byte) error
type UpdateWorkspaceBindings ¶ added in v0.9.0
type UpdateWorkspaceBindingsParameters ¶ added in v0.23.0
type UpdateWorkspaceBindingsParameters struct {
// List of workspace bindings to add. If a binding for the workspace already
// exists with a different binding_type, adding it again with a new
// binding_type will update the existing binding (e.g., from READ_WRITE to
// READ_ONLY).
Add []WorkspaceBinding `json:"add,omitempty"`
// List of workspace bindings to remove.
Remove []WorkspaceBinding `json:"remove,omitempty"`
// The name of the securable.
SecurableName string `json:"-" url:"-"`
// The type of the securable to bind to a workspace (catalog,
// storage_credential, credential, or external_location).
SecurableType string `json:"-" url:"-"`
}
type UpdateWorkspaceBindingsResponse ¶ added in v0.69.0
type UpdateWorkspaceBindingsResponse struct {
// List of workspace bindings.
Bindings []WorkspaceBinding `json:"bindings,omitempty"`
}
A list of workspace IDs that are bound to the securable
type ValidateCredentialRequest ¶ added in v0.51.0
type ValidateCredentialRequest struct {
AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
AzureManagedIdentity *AzureManagedIdentity `json:"azure_managed_identity,omitempty"`
// Required. The name of an existing credential or long-lived cloud
// credential to validate.
CredentialName string `json:"credential_name,omitempty"`
DatabricksGcpServiceAccount *DatabricksGcpServiceAccount `json:"databricks_gcp_service_account,omitempty"`
// The name of an existing external location to validate. Only applicable
// for storage credentials (purpose is **STORAGE**.)
ExternalLocationName string `json:"external_location_name,omitempty"`
// The purpose of the credential. This should only be used when the
// credential is specified.
Purpose CredentialPurpose `json:"purpose,omitempty"`
// Whether the credential is only usable for read operations. Only
// applicable for storage credentials (purpose is **STORAGE**.)
ReadOnly bool `json:"read_only,omitempty"`
// The external location url to validate. Only applicable when purpose is
// **STORAGE**.
Url string `json:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Next ID: 17
func (ValidateCredentialRequest) MarshalJSON ¶ added in v0.51.0
func (s ValidateCredentialRequest) MarshalJSON() ([]byte, error)
func (*ValidateCredentialRequest) UnmarshalJSON ¶ added in v0.51.0
func (s *ValidateCredentialRequest) UnmarshalJSON(b []byte) error
type ValidateCredentialResponse ¶ added in v0.51.0
type ValidateCredentialResponse struct {
// Whether the tested location is a directory in cloud storage. Only
// applicable for when purpose is **STORAGE**.
IsDir bool `json:"isDir,omitempty"`
// The results of the validation check.
Results []CredentialValidationResult `json:"results,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ValidateCredentialResponse) MarshalJSON ¶ added in v0.52.0
func (s ValidateCredentialResponse) MarshalJSON() ([]byte, error)
func (*ValidateCredentialResponse) UnmarshalJSON ¶ added in v0.52.0
func (s *ValidateCredentialResponse) UnmarshalJSON(b []byte) error
type ValidateCredentialResult ¶ added in v0.51.0
type ValidateCredentialResult string
A enum represents the result of the file operation
const ValidateCredentialResultFail ValidateCredentialResult = `FAIL`
const ValidateCredentialResultPass ValidateCredentialResult = `PASS`
const ValidateCredentialResultSkip ValidateCredentialResult = `SKIP`
func (*ValidateCredentialResult) Set ¶ added in v0.51.0
func (f *ValidateCredentialResult) Set(v string) error
Set raw string value and validate it against allowed values
func (*ValidateCredentialResult) String ¶ added in v0.51.0
func (f *ValidateCredentialResult) String() string
String representation for fmt.Print
func (*ValidateCredentialResult) Type ¶ added in v0.51.0
func (f *ValidateCredentialResult) Type() string
Type always returns ValidateCredentialResult to satisfy [pflag.Value] interface
func (*ValidateCredentialResult) Values ¶ added in v0.72.0
func (f *ValidateCredentialResult) Values() []ValidateCredentialResult
Values returns all possible values for ValidateCredentialResult.
There is no guarantee on the order of the values in the slice.
type ValidateStorageCredential ¶
type ValidateStorageCredential struct {
// The AWS IAM role configuration.
AwsIamRole *AwsIamRoleRequest `json:"aws_iam_role,omitempty"`
// The Azure managed identity configuration.
AzureManagedIdentity *AzureManagedIdentityRequest `json:"azure_managed_identity,omitempty"`
// The Azure service principal configuration.
AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
// The Cloudflare API token configuration.
CloudflareApiToken *CloudflareApiToken `json:"cloudflare_api_token,omitempty"`
// The Databricks created GCP service account configuration.
DatabricksGcpServiceAccount *DatabricksGcpServiceAccountRequest `json:"databricks_gcp_service_account,omitempty"`
// The name of an existing external location to validate.
ExternalLocationName string `json:"external_location_name,omitempty"`
// Whether the storage credential is only usable for read operations.
ReadOnly bool `json:"read_only,omitempty"`
// Required. The name of an existing credential or long-lived cloud
// credential to validate.
StorageCredentialName string `json:"storage_credential_name,omitempty"`
// The external location url to validate.
Url string `json:"url,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ValidateStorageCredential) MarshalJSON ¶ added in v0.23.0
func (s ValidateStorageCredential) MarshalJSON() ([]byte, error)
func (*ValidateStorageCredential) UnmarshalJSON ¶ added in v0.23.0
func (s *ValidateStorageCredential) UnmarshalJSON(b []byte) error
type ValidateStorageCredentialResponse ¶
type ValidateStorageCredentialResponse struct {
// Whether the tested location is a directory in cloud storage.
IsDir bool `json:"isDir,omitempty"`
// The results of the validation check.
Results []ValidationResult `json:"results,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ValidateStorageCredentialResponse) MarshalJSON ¶ added in v0.23.0
func (s ValidateStorageCredentialResponse) MarshalJSON() ([]byte, error)
func (*ValidateStorageCredentialResponse) UnmarshalJSON ¶ added in v0.23.0
func (s *ValidateStorageCredentialResponse) UnmarshalJSON(b []byte) error
type ValidationResult ¶
type ValidationResult struct {
// Error message would exist when the result does not equal to **PASS**.
Message string `json:"message,omitempty"`
// The operation tested.
Operation ValidationResultOperation `json:"operation,omitempty"`
// The results of the tested operation.
Result ValidationResultResult `json:"result,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ValidationResult) MarshalJSON ¶ added in v0.23.0
func (s ValidationResult) MarshalJSON() ([]byte, error)
func (*ValidationResult) UnmarshalJSON ¶ added in v0.23.0
func (s *ValidationResult) UnmarshalJSON(b []byte) error
type ValidationResultOperation ¶
type ValidationResultOperation string
A enum represents the file operation performed on the external location with the storage credential
const ValidationResultOperationDelete ValidationResultOperation = `DELETE`
const ValidationResultOperationList ValidationResultOperation = `LIST`
const ValidationResultOperationPathExists ValidationResultOperation = `PATH_EXISTS`
const ValidationResultOperationRead ValidationResultOperation = `READ`
const ValidationResultOperationWrite ValidationResultOperation = `WRITE`
func (*ValidationResultOperation) Set ¶
func (f *ValidationResultOperation) Set(v string) error
Set raw string value and validate it against allowed values
func (*ValidationResultOperation) String ¶
func (f *ValidationResultOperation) String() string
String representation for fmt.Print
func (*ValidationResultOperation) Type ¶
func (f *ValidationResultOperation) Type() string
Type always returns ValidationResultOperation to satisfy [pflag.Value] interface
func (*ValidationResultOperation) Values ¶ added in v0.72.0
func (f *ValidationResultOperation) Values() []ValidationResultOperation
Values returns all possible values for ValidationResultOperation.
There is no guarantee on the order of the values in the slice.
type ValidationResultResult ¶
type ValidationResultResult string
A enum represents the result of the file operation
const ValidationResultResultFail ValidationResultResult = `FAIL`
const ValidationResultResultPass ValidationResultResult = `PASS`
const ValidationResultResultSkip ValidationResultResult = `SKIP`
func (*ValidationResultResult) Set ¶
func (f *ValidationResultResult) Set(v string) error
Set raw string value and validate it against allowed values
func (*ValidationResultResult) String ¶
func (f *ValidationResultResult) String() string
String representation for fmt.Print
func (*ValidationResultResult) Type ¶
func (f *ValidationResultResult) Type() string
Type always returns ValidationResultResult to satisfy [pflag.Value] interface
func (*ValidationResultResult) Values ¶ added in v0.72.0
func (f *ValidationResultResult) Values() []ValidationResultResult
Values returns all possible values for ValidationResultResult.
There is no guarantee on the order of the values in the slice.
type VolumeInfo ¶
type VolumeInfo struct {
// The AWS access point to use when accesing s3 for this external location.
AccessPoint string `json:"access_point,omitempty"`
// Indicates whether the principal is limited to retrieving metadata for the
// associated object through the BROWSE privilege when include_browse is
// enabled in the request.
BrowseOnly bool `json:"browse_only,omitempty"`
// The name of the catalog where the schema and the volume are
CatalogName string `json:"catalog_name,omitempty"`
// The comment attached to the volume
Comment string `json:"comment,omitempty"`
CreatedAt int64 `json:"created_at,omitempty"`
// The identifier of the user who created the volume
CreatedBy string `json:"created_by,omitempty"`
EncryptionDetails *EncryptionDetails `json:"encryption_details,omitempty"`
// The three-level (fully qualified) name of the volume
FullName string `json:"full_name,omitempty"`
// The unique identifier of the metastore
MetastoreId string `json:"metastore_id,omitempty"`
// The name of the volume
Name string `json:"name,omitempty"`
// The identifier of the user who owns the volume
Owner string `json:"owner,omitempty"`
// The name of the schema where the volume is
SchemaName string `json:"schema_name,omitempty"`
// The storage location on the cloud
StorageLocation string `json:"storage_location,omitempty"`
UpdatedAt int64 `json:"updated_at,omitempty"`
// The identifier of the user who updated the volume last time
UpdatedBy string `json:"updated_by,omitempty"`
// The unique identifier of the volume
VolumeId string `json:"volume_id,omitempty"`
// The type of the volume. An external volume is located in the specified
// external location. A managed volume is located in the default location
// which is specified by the parent schema, or the parent catalog, or the
// Metastore. [Learn more]
//
// [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external
VolumeType VolumeType `json:"volume_type,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (VolumeInfo) MarshalJSON ¶ added in v0.23.0
func (s VolumeInfo) MarshalJSON() ([]byte, error)
func (*VolumeInfo) UnmarshalJSON ¶ added in v0.23.0
func (s *VolumeInfo) UnmarshalJSON(b []byte) error
type VolumeType ¶
type VolumeType string
const VolumeTypeExternal VolumeType = `EXTERNAL`
const VolumeTypeManaged VolumeType = `MANAGED`
func (*VolumeType) Set ¶
func (f *VolumeType) Set(v string) error
Set raw string value and validate it against allowed values
func (*VolumeType) String ¶
func (f *VolumeType) String() string
String representation for fmt.Print
func (*VolumeType) Type ¶
func (f *VolumeType) Type() string
Type always returns VolumeType to satisfy [pflag.Value] interface
func (*VolumeType) Values ¶ added in v0.72.0
func (f *VolumeType) Values() []VolumeType
Values returns all possible values for VolumeType.
There is no guarantee on the order of the values in the slice.
type VolumesAPI ¶
type VolumesAPI struct {
// contains filtered or unexported fields
}
Volumes are a Unity Catalog (UC) capability for accessing, storing, governing, organizing and processing files. Use cases include running machine learning on unstructured data such as image, audio, video, or PDF files, organizing data sets during the data exploration stages in data science, working with libraries that require access to the local file system on cluster machines, storing library and config files of arbitrary formats such as .whl or .txt centrally and providing secure access across workspaces to it, or transforming and querying non-tabular data files in ETL.
func NewVolumes ¶
func NewVolumes(client *client.DatabricksClient) *VolumesAPI
func (*VolumesAPI) Create ¶
func (a *VolumesAPI) Create(ctx context.Context, request CreateVolumeRequestContent) (*VolumeInfo, error)
Example (Volumes) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
storageCredential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
Comment: "created via SDK",
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", storageCredential)
externalLocation, err := w.ExternalLocations.Create(ctx, catalog.CreateExternalLocation{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CredentialName: storageCredential.Name,
Comment: "created via SDK",
Url: "s3://" + os.Getenv("TEST_BUCKET") + "/" + fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", externalLocation)
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
createdVolume, err := w.Volumes.Create(ctx, catalog.CreateVolumeRequestContent{
CatalogName: createdCatalog.Name,
SchemaName: createdSchema.Name,
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
StorageLocation: externalLocation.Url,
VolumeType: catalog.VolumeTypeExternal,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdVolume)
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, storageCredential.Name)
if err != nil {
panic(err)
}
err = w.ExternalLocations.DeleteByName(ctx, externalLocation.Name)
if err != nil {
panic(err)
}
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Volumes.DeleteByName(ctx, createdVolume.FullName)
if err != nil {
panic(err)
}
func (*VolumesAPI) Delete ¶
func (a *VolumesAPI) Delete(ctx context.Context, request DeleteVolumeRequest) error
func (*VolumesAPI) DeleteByName ¶ added in v0.32.0
func (a *VolumesAPI) DeleteByName(ctx context.Context, name string) error
Deletes a volume from the specified parent catalog and schema.
The caller must be a metastore admin or an owner of the volume. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*VolumesAPI) GetByName ¶
func (a *VolumesAPI) GetByName(ctx context.Context, name string) (*VolumeInfo, error)
GetByName calls VolumesAPI.VolumeInfoNameToVolumeIdMap and returns a single VolumeInfo.
Returns an error if there's more than one VolumeInfo with the same .Name.
Note: All VolumeInfo instances are loaded into memory before returning matching by name.
This method is generated by Databricks SDK Code Generator.
func (*VolumesAPI) List ¶ added in v0.24.0
func (a *VolumesAPI) List(ctx context.Context, request ListVolumesRequest) listing.Iterator[VolumeInfo]
Gets an array of volumes for the current metastore under the parent catalog and schema.
The returned volumes are filtered based on the privileges of the calling user. For example, the metastore admin is able to list all the volumes. A regular user needs to be the owner or have the **READ VOLUME** privilege on the volume to receive the volumes in the response. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
There is no guarantee of a specific ordering of the elements in the array.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
Example (Volumes) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
allVolumes, err := w.Volumes.ListAll(ctx, catalog.ListVolumesRequest{
CatalogName: createdCatalog.Name,
SchemaName: createdSchema.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", allVolumes)
// cleanup
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
func (*VolumesAPI) ListAll ¶
func (a *VolumesAPI) ListAll(ctx context.Context, request ListVolumesRequest) ([]VolumeInfo, error)
Gets an array of volumes for the current metastore under the parent catalog and schema.
The returned volumes are filtered based on the privileges of the calling user. For example, the metastore admin is able to list all the volumes. A regular user needs to be the owner or have the **READ VOLUME** privilege on the volume to receive the volumes in the response. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
There is no guarantee of a specific ordering of the elements in the array.
PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*VolumesAPI) Read ¶
func (a *VolumesAPI) Read(ctx context.Context, request ReadVolumeRequest) (*VolumeInfo, error)
Example (Volumes) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
storageCredential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
Comment: "created via SDK",
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", storageCredential)
externalLocation, err := w.ExternalLocations.Create(ctx, catalog.CreateExternalLocation{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CredentialName: storageCredential.Name,
Comment: "created via SDK",
Url: "s3://" + os.Getenv("TEST_BUCKET") + "/" + fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", externalLocation)
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
createdVolume, err := w.Volumes.Create(ctx, catalog.CreateVolumeRequestContent{
CatalogName: createdCatalog.Name,
SchemaName: createdSchema.Name,
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
StorageLocation: externalLocation.Url,
VolumeType: catalog.VolumeTypeExternal,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdVolume)
loadedVolume, err := w.Volumes.ReadByName(ctx, createdVolume.FullName)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", loadedVolume)
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, storageCredential.Name)
if err != nil {
panic(err)
}
err = w.ExternalLocations.DeleteByName(ctx, externalLocation.Name)
if err != nil {
panic(err)
}
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Volumes.DeleteByName(ctx, createdVolume.FullName)
if err != nil {
panic(err)
}
func (*VolumesAPI) ReadByName ¶ added in v0.32.0
func (a *VolumesAPI) ReadByName(ctx context.Context, name string) (*VolumeInfo, error)
Gets a volume from the metastore for a specific catalog and schema.
The caller must be a metastore admin or an owner of (or have the **READ VOLUME** privilege on) the volume. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
func (*VolumesAPI) Update ¶
func (a *VolumesAPI) Update(ctx context.Context, request UpdateVolumeRequestContent) (*VolumeInfo, error)
Example (Volumes) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
storageCredential, err := w.StorageCredentials.Create(ctx, catalog.CreateStorageCredential{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
AwsIamRole: &catalog.AwsIamRoleRequest{
RoleArn: os.Getenv("TEST_METASTORE_DATA_ACCESS_ARN"),
},
Comment: "created via SDK",
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", storageCredential)
externalLocation, err := w.ExternalLocations.Create(ctx, catalog.CreateExternalLocation{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CredentialName: storageCredential.Name,
Comment: "created via SDK",
Url: "s3://" + os.Getenv("TEST_BUCKET") + "/" + fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", externalLocation)
createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)
createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
CatalogName: createdCatalog.Name,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)
createdVolume, err := w.Volumes.Create(ctx, catalog.CreateVolumeRequestContent{
CatalogName: createdCatalog.Name,
SchemaName: createdSchema.Name,
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
StorageLocation: externalLocation.Url,
VolumeType: catalog.VolumeTypeExternal,
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", createdVolume)
loadedVolume, err := w.Volumes.ReadByName(ctx, createdVolume.FullName)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", loadedVolume)
_, err = w.Volumes.Update(ctx, catalog.UpdateVolumeRequestContent{
Name: loadedVolume.FullName,
Comment: "Updated volume comment",
})
if err != nil {
panic(err)
}
// cleanup
err = w.StorageCredentials.DeleteByName(ctx, storageCredential.Name)
if err != nil {
panic(err)
}
err = w.ExternalLocations.DeleteByName(ctx, externalLocation.Name)
if err != nil {
panic(err)
}
err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: createdCatalog.Name,
Force: true,
})
if err != nil {
panic(err)
}
err = w.Volumes.DeleteByName(ctx, createdVolume.FullName)
if err != nil {
panic(err)
}
func (*VolumesAPI) VolumeInfoNameToVolumeIdMap ¶
func (a *VolumesAPI) VolumeInfoNameToVolumeIdMap(ctx context.Context, request ListVolumesRequest) (map[string]string, error)
VolumeInfoNameToVolumeIdMap calls VolumesAPI.ListAll and creates a map of results with VolumeInfo.Name as key and VolumeInfo.VolumeId as value.
Returns an error if there's more than one VolumeInfo with the same .Name.
Note: All VolumeInfo instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
type VolumesInterface ¶ added in v0.29.0
type VolumesInterface interface {
// Creates a new volume.
//
// The user could create either an external volume or a managed volume. An
// external volume will be created in the specified external location, while a
// managed volume will be located in the default location which is specified by
// the parent schema, or the parent catalog, or the Metastore.
//
// For the volume creation to succeed, the user must satisfy following
// conditions: - The caller must be a metastore admin, or be the owner of the
// parent catalog and schema, or have the **USE_CATALOG** privilege on the
// parent catalog and the **USE_SCHEMA** privilege on the parent schema. - The
// caller must have **CREATE VOLUME** privilege on the parent schema.
//
// For an external volume, following conditions also need to satisfy - The
// caller must have **CREATE EXTERNAL VOLUME** privilege on the external
// location. - There are no other tables, nor volumes existing in the specified
// storage location. - The specified storage location is not under the location
// of other tables, nor volumes, or catalogs or schemas.
Create(ctx context.Context, request CreateVolumeRequestContent) (*VolumeInfo, error)
// Deletes a volume from the specified parent catalog and schema.
//
// The caller must be a metastore admin or an owner of the volume. For the
// latter case, the caller must also be the owner or have the **USE_CATALOG**
// privilege on the parent catalog and the **USE_SCHEMA** privilege on the
// parent schema.
Delete(ctx context.Context, request DeleteVolumeRequest) error
// Deletes a volume from the specified parent catalog and schema.
//
// The caller must be a metastore admin or an owner of the volume. For the
// latter case, the caller must also be the owner or have the **USE_CATALOG**
// privilege on the parent catalog and the **USE_SCHEMA** privilege on the
// parent schema.
DeleteByName(ctx context.Context, name string) error
// Gets an array of volumes for the current metastore under the parent catalog
// and schema.
//
// The returned volumes are filtered based on the privileges of the calling
// user. For example, the metastore admin is able to list all the volumes. A
// regular user needs to be the owner or have the **READ VOLUME** privilege on
// the volume to receive the volumes in the response. For the latter case, the
// caller must also be the owner or have the **USE_CATALOG** privilege on the
// parent catalog and the **USE_SCHEMA** privilege on the parent schema.
//
// There is no guarantee of a specific ordering of the elements in the array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListVolumesRequest) listing.Iterator[VolumeInfo]
// Gets an array of volumes for the current metastore under the parent catalog
// and schema.
//
// The returned volumes are filtered based on the privileges of the calling
// user. For example, the metastore admin is able to list all the volumes. A
// regular user needs to be the owner or have the **READ VOLUME** privilege on
// the volume to receive the volumes in the response. For the latter case, the
// caller must also be the owner or have the **USE_CATALOG** privilege on the
// parent catalog and the **USE_SCHEMA** privilege on the parent schema.
//
// There is no guarantee of a specific ordering of the elements in the array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero
// results while still providing a next_page_token. Clients must continue
// reading pages until next_page_token is absent, which is the only indication
// that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListVolumesRequest) ([]VolumeInfo, error)
// VolumeInfoNameToVolumeIdMap calls [VolumesAPI.ListAll] and creates a map of results with [VolumeInfo].Name as key and [VolumeInfo].VolumeId as value.
//
// Returns an error if there's more than one [VolumeInfo] with the same .Name.
//
// Note: All [VolumeInfo] instances are loaded into memory before creating a map.
//
// This method is generated by Databricks SDK Code Generator.
VolumeInfoNameToVolumeIdMap(ctx context.Context, request ListVolumesRequest) (map[string]string, error)
// GetByName calls [VolumesAPI.VolumeInfoNameToVolumeIdMap] and returns a single [VolumeInfo].
//
// Returns an error if there's more than one [VolumeInfo] with the same .Name.
//
// Note: All [VolumeInfo] instances are loaded into memory before returning matching by name.
//
// This method is generated by Databricks SDK Code Generator.
GetByName(ctx context.Context, name string) (*VolumeInfo, error)
// Gets a volume from the metastore for a specific catalog and schema.
//
// The caller must be a metastore admin or an owner of (or have the **READ
// VOLUME** privilege on) the volume. For the latter case, the caller must also
// be the owner or have the **USE_CATALOG** privilege on the parent catalog and
// the **USE_SCHEMA** privilege on the parent schema.
Read(ctx context.Context, request ReadVolumeRequest) (*VolumeInfo, error)
// Gets a volume from the metastore for a specific catalog and schema.
//
// The caller must be a metastore admin or an owner of (or have the **READ
// VOLUME** privilege on) the volume. For the latter case, the caller must also
// be the owner or have the **USE_CATALOG** privilege on the parent catalog and
// the **USE_SCHEMA** privilege on the parent schema.
ReadByName(ctx context.Context, name string) (*VolumeInfo, error)
// Updates the specified volume under the specified parent catalog and schema.
//
// The caller must be a metastore admin or an owner of the volume. For the
// latter case, the caller must also be the owner or have the **USE_CATALOG**
// privilege on the parent catalog and the **USE_SCHEMA** privilege on the
// parent schema.
//
// Currently only the name, the owner or the comment of the volume could be
// updated.
Update(ctx context.Context, request UpdateVolumeRequestContent) (*VolumeInfo, error)
}
type VolumesService
deprecated
type VolumesService interface {
// Creates a new volume.
//
// The user could create either an external volume or a managed volume. An
// external volume will be created in the specified external location, while
// a managed volume will be located in the default location which is
// specified by the parent schema, or the parent catalog, or the Metastore.
//
// For the volume creation to succeed, the user must satisfy following
// conditions: - The caller must be a metastore admin, or be the owner of
// the parent catalog and schema, or have the **USE_CATALOG** privilege on
// the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
// - The caller must have **CREATE VOLUME** privilege on the parent schema.
//
// For an external volume, following conditions also need to satisfy - The
// caller must have **CREATE EXTERNAL VOLUME** privilege on the external
// location. - There are no other tables, nor volumes existing in the
// specified storage location. - The specified storage location is not under
// the location of other tables, nor volumes, or catalogs or schemas.
Create(ctx context.Context, request CreateVolumeRequestContent) (*VolumeInfo, error)
// Deletes a volume from the specified parent catalog and schema.
//
// The caller must be a metastore admin or an owner of the volume. For the
// latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
Delete(ctx context.Context, request DeleteVolumeRequest) error
// Gets an array of volumes for the current metastore under the parent
// catalog and schema.
//
// The returned volumes are filtered based on the privileges of the calling
// user. For example, the metastore admin is able to list all the volumes. A
// regular user needs to be the owner or have the **READ VOLUME** privilege
// on the volume to receive the volumes in the response. For the latter
// case, the caller must also be the owner or have the **USE_CATALOG**
// privilege on the parent catalog and the **USE_SCHEMA** privilege on the
// parent schema.
//
// There is no guarantee of a specific ordering of the elements in the
// array.
//
// PAGINATION BEHAVIOR: The API is by default paginated, a page may contain
// zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
List(ctx context.Context, request ListVolumesRequest) (*ListVolumesResponseContent, error)
// Gets a volume from the metastore for a specific catalog and schema.
//
// The caller must be a metastore admin or an owner of (or have the **READ
// VOLUME** privilege on) the volume. For the latter case, the caller must
// also be the owner or have the **USE_CATALOG** privilege on the parent
// catalog and the **USE_SCHEMA** privilege on the parent schema.
Read(ctx context.Context, request ReadVolumeRequest) (*VolumeInfo, error)
// Updates the specified volume under the specified parent catalog and
// schema.
//
// The caller must be a metastore admin or an owner of the volume. For the
// latter case, the caller must also be the owner or have the
// **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA**
// privilege on the parent schema.
//
// Currently only the name, the owner or the comment of the volume could be
// updated.
Update(ctx context.Context, request UpdateVolumeRequestContent) (*VolumeInfo, error)
}
Volumes are a Unity Catalog (UC) capability for accessing, storing, governing, organizing and processing files. Use cases include running machine learning on unstructured data such as image, audio, video, or PDF files, organizing data sets during the data exploration stages in data science, working with libraries that require access to the local file system on cluster machines, storing library and config files of arbitrary formats such as .whl or .txt centrally and providing secure access across workspaces to it, or transforming and querying non-tabular data files in ETL.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type WaitGetOnlineTableActive ¶ added in v0.50.0
type WaitGetOnlineTableActive[R any] struct { Response *R Name string `json:"name"` Poll func(time.Duration, func(*OnlineTable)) (*OnlineTable, error) // contains filtered or unexported fields }
WaitGetOnlineTableActive is a wrapper that calls OnlineTablesAPI.WaitGetOnlineTableActive and waits to reach ACTIVE state.
func (*WaitGetOnlineTableActive[R]) Get ¶ added in v0.50.0
func (w *WaitGetOnlineTableActive[R]) Get() (*OnlineTable, error)
Get the OnlineTable with the default timeout of 20 minutes.
func (*WaitGetOnlineTableActive[R]) GetWithTimeout ¶ added in v0.50.0
func (w *WaitGetOnlineTableActive[R]) GetWithTimeout(timeout time.Duration) (*OnlineTable, error)
Get the OnlineTable with custom timeout.
func (*WaitGetOnlineTableActive[R]) OnProgress ¶ added in v0.50.0
func (w *WaitGetOnlineTableActive[R]) OnProgress(callback func(*OnlineTable)) *WaitGetOnlineTableActive[R]
OnProgress invokes a callback every time it polls for the status update.
type WorkspaceBinding ¶ added in v0.23.0
type WorkspaceBinding struct {
// One of READ_WRITE/READ_ONLY. Default is READ_WRITE.
BindingType WorkspaceBindingBindingType `json:"binding_type,omitempty"`
// Required
WorkspaceId int64 `json:"workspace_id"`
}
type WorkspaceBindingBindingType ¶ added in v0.23.0
type WorkspaceBindingBindingType string
Using `BINDING_TYPE_` prefix here to avoid conflict with `TableOperation` enum in `credentials_common.proto`.
const WorkspaceBindingBindingTypeBindingTypeReadOnly WorkspaceBindingBindingType = `BINDING_TYPE_READ_ONLY`
const WorkspaceBindingBindingTypeBindingTypeReadWrite WorkspaceBindingBindingType = `BINDING_TYPE_READ_WRITE`
func (*WorkspaceBindingBindingType) Set ¶ added in v0.23.0
func (f *WorkspaceBindingBindingType) Set(v string) error
Set raw string value and validate it against allowed values
func (*WorkspaceBindingBindingType) String ¶ added in v0.23.0
func (f *WorkspaceBindingBindingType) String() string
String representation for fmt.Print
func (*WorkspaceBindingBindingType) Type ¶ added in v0.23.0
func (f *WorkspaceBindingBindingType) Type() string
Type always returns WorkspaceBindingBindingType to satisfy [pflag.Value] interface
func (*WorkspaceBindingBindingType) Values ¶ added in v0.72.0
func (f *WorkspaceBindingBindingType) Values() []WorkspaceBindingBindingType
Values returns all possible values for WorkspaceBindingBindingType.
There is no guarantee on the order of the values in the slice.
type WorkspaceBindingsAPI ¶ added in v0.9.0
type WorkspaceBindingsAPI struct {
// contains filtered or unexported fields
}
A securable in Databricks can be configured as __OPEN__ or __ISOLATED__. An __OPEN__ securable can be accessed from any workspace, while an __ISOLATED__ securable can only be accessed from a configured list of workspaces. This API allows you to configure (bind) securables to workspaces.
NOTE: The __isolation_mode__ is configured for the securable itself (using its Update method) and the workspace bindings are only consulted when the securable's __isolation_mode__ is set to __ISOLATED__.
A securable's workspace bindings can be configured by a metastore admin or the owner of the securable.
The original path (/api/2.1/unity-catalog/workspace-bindings/catalogs/{name}) is deprecated. Please use the new path (/api/2.1/unity-catalog/bindings/{securable_type}/{securable_name}) which introduces the ability to bind a securable in READ_ONLY mode (catalogs only).
Securable types that support binding: - catalog - storage_credential - credential - external_location
func NewWorkspaceBindings ¶ added in v0.9.0
func NewWorkspaceBindings(client *client.DatabricksClient) *WorkspaceBindingsAPI
func (*WorkspaceBindingsAPI) Get ¶ added in v0.9.0
func (a *WorkspaceBindingsAPI) Get(ctx context.Context, request GetWorkspaceBindingRequest) (*GetCatalogWorkspaceBindingsResponse, error)
Example (CatalogWorkspaceBindings) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
created, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
bindings, err := w.WorkspaceBindings.GetByName(ctx, created.Name)
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", bindings)
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: created.Name,
Force: true,
})
if err != nil {
panic(err)
}
func (*WorkspaceBindingsAPI) GetBindings ¶ added in v0.23.0
func (a *WorkspaceBindingsAPI) GetBindings(ctx context.Context, request GetBindingsRequest) listing.Iterator[WorkspaceBinding]
Gets workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*WorkspaceBindingsAPI) GetBindingsAll ¶ added in v0.44.0
func (a *WorkspaceBindingsAPI) GetBindingsAll(ctx context.Context, request GetBindingsRequest) ([]WorkspaceBinding, error)
Gets workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*WorkspaceBindingsAPI) GetBindingsBySecurableTypeAndSecurableName ¶ added in v0.23.0
func (a *WorkspaceBindingsAPI) GetBindingsBySecurableTypeAndSecurableName(ctx context.Context, securableType string, securableName string) (*GetWorkspaceBindingsResponse, error)
Gets workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable.
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
func (*WorkspaceBindingsAPI) GetByName ¶ added in v0.9.0
func (a *WorkspaceBindingsAPI) GetByName(ctx context.Context, name string) (*GetCatalogWorkspaceBindingsResponse, error)
Gets workspace bindings of the catalog. The caller must be a metastore admin or an owner of the catalog.
func (*WorkspaceBindingsAPI) Update ¶ added in v0.9.0
func (a *WorkspaceBindingsAPI) Update(ctx context.Context, request UpdateWorkspaceBindings) (*UpdateCatalogWorkspaceBindingsResponse, error)
Example (CatalogWorkspaceBindings) ¶
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
panic(err)
}
thisWorkspaceId := func(v string) int64 {
i, err := strconv.ParseInt(v, 10, 64)
if err != nil {
panic(fmt.Sprintf("`%s` is not int64: %s", v, err))
}
return i
}(os.Getenv("THIS_WORKSPACE_ID"))
created, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
panic(err)
}
logger.Infof(ctx, "found %v", created)
_, err = w.WorkspaceBindings.Update(ctx, catalog.UpdateWorkspaceBindings{
Name: created.Name,
AssignWorkspaces: []int64{thisWorkspaceId},
})
if err != nil {
panic(err)
}
// cleanup
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
Name: created.Name,
Force: true,
})
if err != nil {
panic(err)
}
func (*WorkspaceBindingsAPI) UpdateBindings ¶ added in v0.23.0
func (a *WorkspaceBindingsAPI) UpdateBindings(ctx context.Context, request UpdateWorkspaceBindingsParameters) (*UpdateWorkspaceBindingsResponse, error)
type WorkspaceBindingsInterface ¶ added in v0.29.0
type WorkspaceBindingsInterface interface {
// Gets workspace bindings of the catalog. The caller must be a metastore admin
// or an owner of the catalog.
Get(ctx context.Context, request GetWorkspaceBindingRequest) (*GetCatalogWorkspaceBindingsResponse, error)
// Gets workspace bindings of the catalog. The caller must be a metastore admin
// or an owner of the catalog.
GetByName(ctx context.Context, name string) (*GetCatalogWorkspaceBindingsResponse, error)
// Gets workspace bindings of the securable. The caller must be a metastore
// admin or an owner of the securable.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
GetBindings(ctx context.Context, request GetBindingsRequest) listing.Iterator[WorkspaceBinding]
// Gets workspace bindings of the securable. The caller must be a metastore
// admin or an owner of the securable.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
//
// This method is generated by Databricks SDK Code Generator.
GetBindingsAll(ctx context.Context, request GetBindingsRequest) ([]WorkspaceBinding, error)
// Gets workspace bindings of the securable. The caller must be a metastore
// admin or an owner of the securable.
//
// NOTE: we recommend using max_results=0 to use the paginated version of this
// API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients must
// continue reading pages until next_page_token is absent, which is the only
// indication that the end of results has been reached.
GetBindingsBySecurableTypeAndSecurableName(ctx context.Context, securableType string, securableName string) (*GetWorkspaceBindingsResponse, error)
// Updates workspace bindings of the catalog. The caller must be a metastore
// admin or an owner of the catalog.
Update(ctx context.Context, request UpdateWorkspaceBindings) (*UpdateCatalogWorkspaceBindingsResponse, error)
// Updates workspace bindings of the securable. The caller must be a metastore
// admin or an owner of the securable.
UpdateBindings(ctx context.Context, request UpdateWorkspaceBindingsParameters) (*UpdateWorkspaceBindingsResponse, error)
}
type WorkspaceBindingsService
deprecated
added in
v0.9.0
type WorkspaceBindingsService interface {
// Gets workspace bindings of the catalog. The caller must be a metastore
// admin or an owner of the catalog.
Get(ctx context.Context, request GetWorkspaceBindingRequest) (*GetCatalogWorkspaceBindingsResponse, error)
// Gets workspace bindings of the securable. The caller must be a metastore
// admin or an owner of the securable.
//
// NOTE: we recommend using max_results=0 to use the paginated version of
// this API. Unpaginated calls will be deprecated soon.
//
// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may
// contain zero results while still providing a next_page_token. Clients
// must continue reading pages until next_page_token is absent, which is the
// only indication that the end of results has been reached.
GetBindings(ctx context.Context, request GetBindingsRequest) (*GetWorkspaceBindingsResponse, error)
// Updates workspace bindings of the catalog. The caller must be a metastore
// admin or an owner of the catalog.
Update(ctx context.Context, request UpdateWorkspaceBindings) (*UpdateCatalogWorkspaceBindingsResponse, error)
// Updates workspace bindings of the securable. The caller must be a
// metastore admin or an owner of the securable.
UpdateBindings(ctx context.Context, request UpdateWorkspaceBindingsParameters) (*UpdateWorkspaceBindingsResponse, error)
}
A securable in Databricks can be configured as __OPEN__ or __ISOLATED__. An __OPEN__ securable can be accessed from any workspace, while an __ISOLATED__ securable can only be accessed from a configured list of workspaces. This API allows you to configure (bind) securables to workspaces.
NOTE: The __isolation_mode__ is configured for the securable itself (using its Update method) and the workspace bindings are only consulted when the securable's __isolation_mode__ is set to __ISOLATED__.
A securable's workspace bindings can be configured by a metastore admin or the owner of the securable.
The original path (/api/2.1/unity-catalog/workspace-bindings/catalogs/{name}) is deprecated. Please use the new path (/api/2.1/unity-catalog/bindings/{securable_type}/{securable_name}) which introduces the ability to bind a securable in READ_ONLY mode (catalogs only).
Securable types that support binding: - catalog - storage_credential - credential - external_location
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.