catalog

package
v1.59.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxSqlExecWaitTimeout = 50

Functions

func DataSourceCatalog added in v1.44.0

func DataSourceCatalog() common.Resource

func DataSourceCatalogs

func DataSourceCatalogs() common.Resource

func DataSourceCurrentMetastore added in v1.34.0

func DataSourceCurrentMetastore() common.Resource

func DataSourceExternalLocation added in v1.40.0

func DataSourceExternalLocation() common.Resource

func DataSourceExternalLocations added in v1.40.0

func DataSourceExternalLocations() common.Resource

func DataSourceMetastore added in v1.22.0

func DataSourceMetastore() common.Resource

func DataSourceMetastores added in v1.22.0

func DataSourceMetastores() common.Resource

func DataSourceSchema added in v1.49.0

func DataSourceSchema() common.Resource

func DataSourceSchemas

func DataSourceSchemas() common.Resource

func DataSourceStorageCredential added in v1.37.0

func DataSourceStorageCredential() common.Resource

func DataSourceStorageCredentials added in v1.37.0

func DataSourceStorageCredentials() common.Resource

func DataSourceTable added in v1.44.0

func DataSourceTable() common.Resource

func DataSourceTables

func DataSourceTables() common.Resource

func DataSourceViews

func DataSourceViews() common.Resource

func DataSourceVolume added in v1.49.0

func DataSourceVolume() common.Resource

func DataSourceVolumes added in v1.36.0

func DataSourceVolumes() common.Resource

func GetSqlColumnInfoHCL added in v1.40.0

func GetSqlColumnInfoHCL(columnInfos []SqlColumnInfo) string

Given a slice of SqlColumnInfo, construct the corresponding HCL string.

func ResourceArtifactAllowlist added in v1.29.0

func ResourceArtifactAllowlist() common.Resource

func ResourceCatalog

func ResourceCatalog() common.Resource

func ResourceCatalogWorkspaceBinding added in v1.20.0

func ResourceCatalogWorkspaceBinding() common.Resource

func ResourceConnection added in v1.24.0

func ResourceConnection() common.Resource

func ResourceExternalLocation

func ResourceExternalLocation() common.Resource

func ResourceGrant added in v1.34.0

func ResourceGrant() common.Resource

func ResourceGrants

func ResourceGrants() common.Resource

func ResourceLakehouseMonitor added in v1.39.0

func ResourceLakehouseMonitor() common.Resource

func ResourceMetastore

func ResourceMetastore() common.Resource

func ResourceMetastoreAssignment

func ResourceMetastoreAssignment() common.Resource

func ResourceMetastoreDataAccess

func ResourceMetastoreDataAccess() common.Resource

func ResourceOnlineTable added in v1.39.0

func ResourceOnlineTable() common.Resource

func ResourceQualityMonitor added in v1.45.0

func ResourceQualityMonitor() common.Resource

func ResourceRegisteredModel added in v1.28.0

func ResourceRegisteredModel() common.Resource

func ResourceSchema

func ResourceSchema() common.Resource

func ResourceSqlTable added in v1.15.0

func ResourceSqlTable() common.Resource

func ResourceStorageCredential

func ResourceStorageCredential() common.Resource

func ResourceSystemSchema added in v1.28.0

func ResourceSystemSchema() common.Resource

func ResourceTable

func ResourceTable() common.Resource

func ResourceVolume added in v1.18.0

func ResourceVolume() common.Resource

func ResourceWorkspaceBinding added in v1.49.0

func ResourceWorkspaceBinding() common.Resource

func SuppressGcpSAKeyDiff added in v1.7.0

func SuppressGcpSAKeyDiff(k, old, new string, d *schema.ResourceData) bool

func WaitForMonitor added in v1.39.0

func WaitForMonitor(w *databricks.WorkspaceClient, ctx context.Context, monitorName string) error

Types

type ArtifactAllowlistInfo added in v1.29.0

type ArtifactAllowlistInfo struct {
	// A list of allowed artifact match patterns.
	ArtifactMatchers []catalog.ArtifactMatcher `json:"artifact_matchers" tf:"slice_set,alias:artifact_matcher"`
	// The artifact type of the allowlist.
	ArtifactType catalog.ArtifactType `json:"artifact_type" tf:"force_new"`
	// Time at which this artifact allowlist was set, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty" tf:"computed"`
	// Username of the user who set the artifact allowlist.
	CreatedBy string `json:"created_by,omitempty" tf:"computed"`
	// Unique identifier of parent metastore.
	MetastoreId string `json:"metastore_id,omitempty" tf:"computed"`
}

type CatalogInfo

type CatalogInfo struct {
	Name                         string            `json:"name"`
	Comment                      string            `json:"comment,omitempty"`
	StorageRoot                  string            `json:"storage_root,omitempty" tf:"force_new"`
	ProviderName                 string            `json:"provider_name,omitempty" tf:"force_new,conflicts:storage_root"`
	ShareName                    string            `json:"share_name,omitempty" tf:"force_new,conflicts:storage_root"`
	ConnectionName               string            `json:"connection_name,omitempty" tf:"force_new,conflicts:storage_root"`
	EnablePredictiveOptimization string            `json:"enable_predictive_optimization,omitempty" tf:"computed"`
	Options                      map[string]string `json:"options,omitempty" tf:"force_new"`
	Properties                   map[string]string `json:"properties,omitempty"`
	Owner                        string            `json:"owner,omitempty" tf:"computed"`
	IsolationMode                string            `json:"isolation_mode,omitempty" tf:"computed"`
	MetastoreID                  string            `json:"metastore_id,omitempty" tf:"computed"`
}

type ColumnInfo

type ColumnInfo struct {
	Name             string `json:"name"`
	TypeText         string `json:"type_text"`
	TypeJson         string `json:"type_json,omitempty"`
	TypeName         string `json:"type_name"`
	TypePrecision    int32  `json:"type_precision,omitempty"`
	TypeScale        int32  `json:"type_scale,omitempty"`
	TypeIntervalType string `json:"type_interval_type,omitempty"`
	Position         int32  `json:"position"`
	Comment          string `json:"comment,omitempty"`
	Nullable         bool   `json:"nullable,omitempty" tf:"default:true"`
	PartitionIndex   int32  `json:"partition_index,omitempty"`
}

type ConnectionInfo added in v1.24.0

type ConnectionInfo struct {
	// User-provided free-form text description.
	Comment string `json:"comment,omitempty" tf:"force_new"`
	// The type of connection.
	ConnectionType string `json:"connection_type" tf:"force_new"`
	// Unique identifier of parent metastore.
	MetastoreId string `json:"metastore_id,omitempty" tf:"computed"`
	// Name of the connection.
	Name string `json:"name"`
	// Name of the connection.
	NameArg string `json:"-" url:"-"`
	// A map of key-value properties attached to the securable.
	Options map[string]string `json:"options" tf:"sensitive"`
	// Username of current owner of the connection.
	Owner string `json:"owner,omitempty" tf:"computed"`
	// An object containing map of key-value properties attached to the
	// connection.
	Properties map[string]string `json:"properties,omitempty" tf:"force_new"`
	// If the connection is read only.
	ReadOnly bool `json:"read_only,omitempty" tf:"force_new,computed"`
}

This structure contains the fields of catalog.UpdateConnection and catalog.CreateConnection We need to create this because we need Owner, FullNameArg, SchemaName and CatalogName which aren't present in a single of them. We also need to annotate tf:"computed" for the Owner field.

type ExternalLocationInfo

type ExternalLocationInfo struct {
	Name           string                     `json:"name" tf:"force_new"`
	URL            string                     `json:"url"`
	CredentialName string                     `json:"credential_name"`
	Comment        string                     `json:"comment,omitempty"`
	SkipValidation bool                       `json:"skip_validation,omitempty"`
	Owner          string                     `json:"owner,omitempty" tf:"computed"`
	MetastoreID    string                     `json:"metastore_id,omitempty" tf:"computed"`
	ReadOnly       bool                       `json:"read_only,omitempty"`
	AccessPoint    string                     `json:"access_point,omitempty"`
	EncDetails     *catalog.EncryptionDetails `json:"encryption_details,omitempty"`
	IsolationMode  string                     `json:"isolation_mode,omitempty" tf:"computed"`
}

This structure contains the fields of both catalog.UpdateExternalLocation and catalog.CreateExternalLocation

type GcpServiceAccountKey added in v1.7.0

type GcpServiceAccountKey struct {
	Email        string `json:"email"`
	PrivateKeyId string `json:"private_key_id"`
	PrivateKey   string `json:"private_key" tf:"sensitive"`
}

type IdentityColumn added in v1.53.0

type IdentityColumn string
const IdentityColumnAlways IdentityColumn = "always"
const IdentityColumnDefault IdentityColumn = "default"
const IdentityColumnNone IdentityColumn = ""

type MetastoreInfo

type MetastoreInfo struct {
	Name                                        string `json:"name"`
	StorageRoot                                 string `json:"storage_root,omitempty" tf:"force_new"`
	DefaultDacID                                string `json:"default_data_access_config_id,omitempty" tf:"suppress_diff"`
	StorageRootCredentialId                     string `json:"storage_root_credential_id,omitempty" tf:"suppress_diff"`
	Owner                                       string `json:"owner,omitempty" tf:"computed"`
	MetastoreID                                 string `json:"metastore_id,omitempty" tf:"computed"`
	Region                                      string `json:"region,omitempty" tf:"computed"`
	Cloud                                       string `json:"cloud,omitempty" tf:"computed"`
	GlobalMetastoreId                           string `json:"global_metastore_id,omitempty" tf:"computed"`
	CreatedAt                                   int64  `json:"created_at,omitempty" tf:"computed"`
	CreatedBy                                   string `json:"created_by,omitempty" tf:"computed"`
	UpdatedAt                                   int64  `json:"updated_at,omitempty" tf:"computed"`
	UpdatedBy                                   string `json:"updated_by,omitempty" tf:"computed"`
	DeltaSharingScope                           string `json:"delta_sharing_scope,omitempty" tf:"suppress_diff"`
	DeltaSharingRecipientTokenLifetimeInSeconds int64  `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
	DeltaSharingOrganizationName                string `json:"delta_sharing_organization_name,omitempty"`
}

type PermissionsList

type PermissionsList struct {
	Assignments []PrivilegeAssignment `json:"privilege_assignments" tf:"slice_set,alias:grant"`
}

PermissionsList reflects it's shape on terraform resource with privilege_assignments column renamed to `grant` block for simplicity

type PrivilegeAssignment

type PrivilegeAssignment struct {
	Principal  string   `json:"principal"`
	Privileges []string `json:"privileges" tf:"slice_set"`
}

PrivilegeAssignment reflects on `grant` block

type SchemaInfo

type SchemaInfo struct {
	Name                         string            `json:"name" tf:"force_new"`
	CatalogName                  string            `json:"catalog_name" tf:"force_new"`
	StorageRoot                  string            `json:"storage_root,omitempty" tf:"force_new"`
	Comment                      string            `json:"comment,omitempty"`
	Properties                   map[string]string `json:"properties,omitempty"`
	EnablePredictiveOptimization string            `json:"enable_predictive_optimization,omitempty" tf:"computed"`
	Owner                        string            `json:"owner,omitempty" tf:"computed"`
	MetastoreID                  string            `json:"metastore_id,omitempty" tf:"computed"`
	FullName                     string            `json:"full_name,omitempty" tf:"computed"`
}

type SqlColumnInfo added in v1.15.0

type SqlColumnInfo struct {
	Name     string         `json:"name"`
	Type     string         `json:"type_text,omitempty" tf:"alias:type,computed"`
	Identity IdentityColumn `json:"identity,omitempty"`
	Comment  string         `json:"comment,omitempty"`
	Nullable bool           `json:"nullable,omitempty" tf:"default:true"`
	TypeJson string         `json:"type_json,omitempty" tf:"computed"`
}

type SqlTableInfo added in v1.15.0

type SqlTableInfo struct {
	Name                  string            `json:"name"`
	CatalogName           string            `json:"catalog_name" tf:"force_new"`
	SchemaName            string            `json:"schema_name" tf:"force_new"`
	TableType             string            `json:"table_type" tf:"force_new"`
	DataSourceFormat      string            `json:"data_source_format,omitempty" tf:"force_new"`
	ColumnInfos           []SqlColumnInfo   `json:"columns,omitempty" tf:"alias:column,computed"`
	Partitions            []string          `json:"partitions,omitempty" tf:"force_new"`
	ClusterKeys           []string          `json:"cluster_keys,omitempty"`
	StorageLocation       string            `json:"storage_location,omitempty" tf:"suppress_diff"`
	StorageCredentialName string            `json:"storage_credential_name,omitempty" tf:"force_new"`
	ViewDefinition        string            `json:"view_definition,omitempty"`
	Comment               string            `json:"comment,omitempty"`
	Properties            map[string]string `json:"properties,omitempty"`
	Options               map[string]string `json:"options,omitempty" tf:"force_new"`
	// EffectiveProperties includes both properties and options. Options are prefixed with `option.`.
	EffectiveProperties map[string]string `json:"effective_properties" tf:"computed"`
	ClusterID           string            `json:"cluster_id,omitempty" tf:"computed"`
	WarehouseID         string            `json:"warehouse_id,omitempty"`
	Owner               string            `json:"owner,omitempty" tf:"computed"`
	// contains filtered or unexported fields
}

func (SqlTableInfo) CustomizeSchema added in v1.52.0

func (*SqlTableInfo) FullName added in v1.15.0

func (ti *SqlTableInfo) FullName() string

func (*SqlTableInfo) SQLFullName added in v1.24.0

func (ti *SqlTableInfo) SQLFullName() string

type SqlTablesAPI added in v1.15.0

type SqlTablesAPI struct {
	// contains filtered or unexported fields
}

func NewSqlTablesAPI added in v1.15.0

func NewSqlTablesAPI(ctx context.Context, m any) SqlTablesAPI

type StorageCredentialInfo

type StorageCredentialInfo struct {
	Name                        string                                       `json:"name" tf:"force_new"`
	Owner                       string                                       `json:"owner,omitempty" tf:"computed"`
	Comment                     string                                       `json:"comment,omitempty"`
	Aws                         *catalog.AwsIamRoleResponse                  `json:"aws_iam_role,omitempty" tf:"group:access"`
	Azure                       *catalog.AzureServicePrincipal               `json:"azure_service_principal,omitempty" tf:"group:access"`
	AzMI                        *catalog.AzureManagedIdentityResponse        `json:"azure_managed_identity,omitempty" tf:"group:access"`
	GcpSAKey                    *GcpServiceAccountKey                        `json:"gcp_service_account_key,omitempty" tf:"group:access"`
	DatabricksGcpServiceAccount *catalog.DatabricksGcpServiceAccountResponse `json:"databricks_gcp_service_account,omitempty" tf:"computed"`
	CloudflareApiToken          *catalog.CloudflareApiToken                  `json:"cloudflare_api_token,omitempty" tf:"group:access"`
	MetastoreID                 string                                       `json:"metastore_id,omitempty" tf:"computed"`
	ReadOnly                    bool                                         `json:"read_only,omitempty"`
	SkipValidation              bool                                         `json:"skip_validation,omitempty"`
	IsolationMode               string                                       `json:"isolation_mode,omitempty" tf:"computed"`
}

type TableInfo

type TableInfo struct {
	Name                  string            `json:"name"`
	CatalogName           string            `json:"catalog_name" tf:"force_new"`
	SchemaName            string            `json:"schema_name" tf:"force_new"`
	TableType             string            `json:"table_type" tf:"force_new"`
	DataSourceFormat      string            `json:"data_source_format"`
	ColumnInfos           []ColumnInfo      `json:"columns" tf:"alias:column"`
	StorageLocation       string            `json:"storage_location,omitempty" tf:"suppress_diff"`
	StorageCredentialName string            `json:"storage_credential_name,omitempty" tf:"force_new"`
	ViewDefinition        string            `json:"view_definition,omitempty"`
	Owner                 string            `json:"owner,omitempty" tf:"computed"`
	Comment               string            `json:"comment,omitempty"`
	Properties            map[string]string `json:"properties,omitempty"`
}

func (TableInfo) FullName

func (ti TableInfo) FullName() string

type TablesAPI

type TablesAPI struct {
	// contains filtered or unexported fields
}

func NewTablesAPI

func NewTablesAPI(ctx context.Context, m any) TablesAPI

type TypeJson added in v1.53.0

type TypeJson struct {
	Metadata map[string]any `json:"metadata,omitempty"`
}

type VolumeInfo added in v1.18.0

type VolumeInfo struct {
	// The name of the catalog where the schema and the volume are
	CatalogName string `json:"catalog_name" tf:"force_new"`
	// The comment attached to the volume
	Comment string `json:"comment,omitempty"`
	// The name of the schema where the volume is
	SchemaName  string `json:"schema_name" tf:"force_new"`
	FullNameArg string `json:"-" url:"-"`
	// The name of the volume
	Name string `json:"name"`
	// The identifier of the user who owns the volume
	Owner string `json:"owner,omitempty" tf:"computed"`
	// The storage location on the cloud
	StorageLocation string             `json:"storage_location,omitempty" tf:"force_new"`
	VolumeType      catalog.VolumeType `json:"volume_type" tf:"force_new"`
}

This structure contains the fields of catalog.UpdateVolumeRequestContent and catalog.CreateVolumeRequestContent We need to create this because we need Owner, FullNameArg, SchemaName and CatalogName which aren't present in a single of them. We also need to annotate tf:"computed" for the Owner field.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL