deltalake_native

package
v1.9.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithConfig

func WithConfig(h *Deltalake, config *config.Config)

Types

type Deltalake

type Deltalake struct {
	DB                     *sqlmiddleware.DB
	Namespace              string
	ObjectStorage          string
	Warehouse              model.Warehouse
	Uploader               warehouseutils.Uploader
	ConnectTimeout         time.Duration
	Logger                 logger.Logger
	Stats                  stats.Stats
	LoadTableStrategy      string
	EnablePartitionPruning bool
	SlowQueryThreshold     time.Duration
	MaxRetries             int
	RetryMinWait           time.Duration
	RetryMaxWait           time.Duration
}

func New

func New() *Deltalake

func (*Deltalake) AddColumns

func (d *Deltalake) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) error

AddColumns adds columns to the table.

func (*Deltalake) AlterColumn

func (*Deltalake) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)

AlterColumn alters a column in the warehouse

func (*Deltalake) Cleanup

func (d *Deltalake) Cleanup()

Cleanup cleans up the warehouse

func (*Deltalake) Connect

func (d *Deltalake) Connect(warehouse model.Warehouse) (warehouseclient.Client, error)

Connect returns Client

func (*Deltalake) CrashRecover

func (d *Deltalake) CrashRecover()

CrashRecover crash recover scenarios

func (*Deltalake) CreateSchema

func (d *Deltalake) CreateSchema() error

CreateSchema creates a schema in the warehouse if it does not exist.

func (*Deltalake) CreateTable

func (d *Deltalake) CreateTable(tableName string, columns model.TableSchema) error

CreateTable creates a table in the warehouse.

func (*Deltalake) DeleteBy

func (*Deltalake) DownloadIdentityRules

func (*Deltalake) DownloadIdentityRules(*misc.GZipWriter) error

DownloadIdentityRules downloadchecking if schema exists identity rules

func (*Deltalake) DropTable

func (d *Deltalake) DropTable(tableName string) error

DropTable drops a table in the warehouse

func (*Deltalake) ErrorMappings

func (*Deltalake) ErrorMappings() []model.JobError

ErrorMappings returns the error mappings

func (*Deltalake) FetchSchema

func (d *Deltalake) FetchSchema() (model.Schema, model.Schema, error)

FetchSchema fetches the schema from the warehouse

func (*Deltalake) GetTotalCountInTable

func (d *Deltalake) GetTotalCountInTable(ctx context.Context, tableName string) (int64, error)

GetTotalCountInTable returns the total count in the table

func (*Deltalake) IsEmpty

func (*Deltalake) IsEmpty(model.Warehouse) (bool, error)

IsEmpty checks if the warehouse is empty or not

func (*Deltalake) LoadIdentityMappingsTable

func (*Deltalake) LoadIdentityMappingsTable() error

LoadIdentityMappingsTable loads identifies mappings table

func (*Deltalake) LoadIdentityMergeRulesTable

func (*Deltalake) LoadIdentityMergeRulesTable() error

LoadIdentityMergeRulesTable loads identifies merge rules tables

func (*Deltalake) LoadTable

func (d *Deltalake) LoadTable(ctx context.Context, tableName string) error

LoadTable loads table for table name

func (*Deltalake) LoadTestTable

func (d *Deltalake) LoadTestTable(location, tableName string, _ map[string]interface{}, format string) error

LoadTestTable loads the test table

func (*Deltalake) LoadUserTables

func (d *Deltalake) LoadUserTables(ctx context.Context) map[string]error

LoadUserTables loads user tables

func (*Deltalake) SetConnectionTimeout

func (d *Deltalake) SetConnectionTimeout(timeout time.Duration)

SetConnectionTimeout sets the connection timeout

func (*Deltalake) Setup

func (d *Deltalake) Setup(warehouse model.Warehouse, uploader warehouseutils.Uploader) error

Setup sets up the warehouse

func (*Deltalake) TestConnection

func (d *Deltalake) TestConnection(ctx context.Context, _ model.Warehouse) error

TestConnection tests the connection to the warehouse

Jump to

Keyboard shortcuts

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