Documentation ¶
Index ¶
- Constants
- func ColumnsWithDataTypes(columns map[string]string, prefix string) string
- func GetDatabricksVersion() (databricksBuildVersion string)
- func Init()
- func WithConfig(h *Deltalake, config *config.Config)
- type Deltalake
- func (dl *Deltalake) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
- func (*Deltalake) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
- func (dl *Deltalake) Cleanup()
- func (dl *Deltalake) Connect(warehouse warehouseutils.Warehouse) (warehouseclient.Client, error)
- func (dl *Deltalake) CrashRecover(warehouse warehouseutils.Warehouse) (err error)
- func (dl *Deltalake) CreateSchema() (err error)
- func (dl *Deltalake) CreateTable(tableName string, columns map[string]string) (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 (dl *Deltalake) ErrorMappings() []model.JobError
- func (*Deltalake) ExecuteSQLClient(client *client.Client, sqlStatement string) (err error)
- func (dl *Deltalake) FetchSchema(warehouse warehouseutils.Warehouse) (schema, unrecognizedSchema warehouseutils.SchemaT, err error)
- func (dl *Deltalake) GetLogIdentifier(args ...string) string
- func (dl *Deltalake) GetTotalCountInTable(ctx context.Context, tableName string) (int64, error)
- func (*Deltalake) IsEmpty(warehouseutils.Warehouse) (empty bool, err error)
- func (*Deltalake) LoadIdentityMappingsTable() (err error)
- func (*Deltalake) LoadIdentityMergeRulesTable() (err error)
- func (dl *Deltalake) LoadTable(tableName string) error
- func (dl *Deltalake) LoadTestTable(location, tableName string, _ map[string]interface{}, format string) (err error)
- func (dl *Deltalake) LoadUserTables() 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 warehouseutils.Warehouse, uploader warehouseutils.UploaderI) (err error)
- func (dl *Deltalake) TestConnection(warehouse warehouseutils.Warehouse) (err 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 ¶
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 warehouseutils.Warehouse Uploader warehouseutils.UploaderI 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 NewDeltalake ¶
func NewDeltalake() *Deltalake
func (*Deltalake) AddColumns ¶
func (dl *Deltalake) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
func (*Deltalake) AlterColumn ¶
func (*Deltalake) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
AlterColumn alter table with column name and type
func (*Deltalake) Connect ¶
func (dl *Deltalake) Connect(warehouse warehouseutils.Warehouse) (warehouseclient.Client, error)
Connect returns Client
func (*Deltalake) CrashRecover ¶
func (dl *Deltalake) CrashRecover(warehouse warehouseutils.Warehouse) (err error)
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 ¶
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 ¶
func (dl *Deltalake) FetchSchema(warehouse warehouseutils.Warehouse) (schema, unrecognizedSchema warehouseutils.SchemaT, err error)
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) IsEmpty ¶
func (*Deltalake) IsEmpty(warehouseutils.Warehouse) (empty bool, err error)
IsEmpty checks if the warehouse is empty or not
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
func (*Deltalake) SetConnectionTimeout ¶
func (*Deltalake) Setup ¶
func (dl *Deltalake) Setup(warehouse warehouseutils.Warehouse, uploader warehouseutils.UploaderI) (err error)
Setup populate the Deltalake
func (*Deltalake) TestConnection ¶
func (dl *Deltalake) TestConnection(warehouse warehouseutils.Warehouse) (err error)
TestConnection test the connection for the warehouse