Documentation ¶
Index ¶
- Constants
- func ColumnsWithDataTypes(columns model.TableSchema, prefix string) string
- func GetDatabricksVersion() (databricksBuildVersion string)
- func WithConfig(h *Deltalake, config *config.Config)
- type Deltalake
- func (dl *Deltalake) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) error
- func (*Deltalake) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
- func (dl *Deltalake) Cleanup()
- func (dl *Deltalake) Connect(warehouse model.Warehouse) (warehouseclient.Client, error)
- func (dl *Deltalake) CrashRecover()
- func (dl *Deltalake) CreateSchema() (err error)
- func (dl *Deltalake) CreateTable(tableName string, columns model.TableSchema) (err error)
- func (*Deltalake) DeleteBy([]string, warehouseutils.DeleteByParams) error
- func (*Deltalake) DownloadIdentityRules(*misc.GZipWriter) (err error)
- func (dl *Deltalake) DropTable(tableName string) (err error)
- func (*Deltalake) ErrorMappings() []model.JobError
- func (*Deltalake) ExecuteSQLClient(client *client.Client, sqlStatement string) (err error)
- func (dl *Deltalake) FetchSchema() (model.Schema, model.Schema, error)
- func (dl *Deltalake) GetLogIdentifier(args ...string) string
- func (dl *Deltalake) GetTotalCountInTable(ctx context.Context, tableName string) (int64, error)
- func (*Deltalake) IsEmpty(model.Warehouse) (empty bool, err error)
- func (*Deltalake) LoadIdentityMappingsTable() (err error)
- func (*Deltalake) LoadIdentityMergeRulesTable() (err error)
- func (dl *Deltalake) LoadTable(_ context.Context, tableName string) error
- func (dl *Deltalake) LoadTestTable(location, tableName string, _ map[string]interface{}, format string) (err error)
- func (dl *Deltalake) LoadUserTables(context.Context) map[string]error
- func (dl *Deltalake) NewClient(cred *client.Credentials, connectTimeout time.Duration) (Client *client.Client, err error)
- func (dl *Deltalake) SetConnectionTimeout(timeout time.Duration)
- func (dl *Deltalake) Setup(warehouse model.Warehouse, uploader warehouseutils.Uploader) (err error)
- func (*Deltalake) TestConnection(context.Context, model.Warehouse) error
Constants ¶
const ( Host = "host" Port = "port" Path = "path" Token = "token" Catalog = "catalog" UseSTSTokens = "useSTSTokens" EnableExternalLocation = "enableExternalLocation" ExternalLocation = "externalLocation" )
Database configuration
Variables ¶
This section is empty.
Functions ¶
func ColumnsWithDataTypes ¶
func ColumnsWithDataTypes(columns model.TableSchema, prefix string) string
ColumnsWithDataTypes returns columns with specified prefix and data type
func GetDatabricksVersion ¶
func GetDatabricksVersion() (databricksBuildVersion string)
GetDatabricksVersion Gets the databricks version by making a grpc call to Version stub.
func WithConfig ¶
Types ¶
type Deltalake ¶
type Deltalake struct { Client *client.Client Namespace string ObjectStorage string Warehouse model.Warehouse Uploader warehouseutils.Uploader ConnectTimeout time.Duration Logger logger.Logger Stats stats.Stats Schema string SparkServerType string AuthMech string UID string ThriftTransport string SSL string UserAgent string GrpcTimeout time.Duration HealthTimeout time.Duration LoadTableStrategy string EnablePartitionPruning bool ConnectorURL string }
func (*Deltalake) AddColumns ¶
func (dl *Deltalake) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) error
func (*Deltalake) AlterColumn ¶
func (*Deltalake) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
AlterColumn alter table with column name and type
func (*Deltalake) CrashRecover ¶
func (dl *Deltalake) CrashRecover()
CrashRecover crash recover scenarios
func (*Deltalake) CreateSchema ¶
CreateSchema checks if schema exists or not. If it does not exist, it creates the schema.
func (*Deltalake) CreateTable ¶
func (dl *Deltalake) CreateTable(tableName string, columns model.TableSchema) (err error)
CreateTable creates tables with table name and columns
func (*Deltalake) DeleteBy ¶
func (*Deltalake) DeleteBy([]string, warehouseutils.DeleteByParams) error
func (*Deltalake) DownloadIdentityRules ¶
func (*Deltalake) DownloadIdentityRules(*misc.GZipWriter) (err error)
DownloadIdentityRules download identity rules
func (*Deltalake) ErrorMappings ¶
func (*Deltalake) ExecuteSQLClient ¶
ExecuteSQLClient executes sql client using grpc Client
func (*Deltalake) FetchSchema ¶
FetchSchema queries delta lake and returns the schema associated with provided namespace
func (*Deltalake) GetLogIdentifier ¶
GetLogIdentifier returns log identifier
func (*Deltalake) GetTotalCountInTable ¶
GetTotalCountInTable returns the total count in the table
func (*Deltalake) LoadIdentityMappingsTable ¶
LoadIdentityMappingsTable loads identifies mappings table
func (*Deltalake) LoadIdentityMergeRulesTable ¶
LoadIdentityMergeRulesTable loads identifies merge rules tables
func (*Deltalake) LoadTestTable ¶
func (*Deltalake) LoadUserTables ¶
LoadUserTables loads user tables
func (*Deltalake) NewClient ¶
func (dl *Deltalake) NewClient(cred *client.Credentials, connectTimeout time.Duration) (Client *client.Client, err error)
NewClient creates deltalake client