schemarepository

package
v1.13.0-preview-1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseGlue

func UseGlue(w *model.Warehouse) bool

Types

type GlueSchemaRepository

type GlueSchemaRepository struct {
	GlueClient *glue.Glue

	Warehouse model.Warehouse
	Namespace string
	// contains filtered or unexported fields
}

func NewGlueSchemaRepository

func NewGlueSchemaRepository(wh model.Warehouse, log logger.Logger) (*GlueSchemaRepository, error)

func (*GlueSchemaRepository) AddColumns

func (gl *GlueSchemaRepository) AddColumns(ctx context.Context, tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)

func (*GlueSchemaRepository) AlterColumn

func (gl *GlueSchemaRepository) AlterColumn(ctx context.Context, tableName, columnName, columnType string) (model.AlterTableResponse, error)

func (*GlueSchemaRepository) CreateSchema

func (gl *GlueSchemaRepository) CreateSchema(ctx context.Context) (err error)

func (*GlueSchemaRepository) CreateTable

func (gl *GlueSchemaRepository) CreateTable(ctx context.Context, tableName string, columnMap model.TableSchema) (err error)

func (*GlueSchemaRepository) FetchSchema

func (gl *GlueSchemaRepository) FetchSchema(ctx context.Context, warehouse model.Warehouse) (model.Schema, model.Schema, error)

func (*GlueSchemaRepository) RefreshPartitions

func (gl *GlueSchemaRepository) RefreshPartitions(ctx context.Context, tableName string, loadFiles []warehouseutils.LoadFile) error

RefreshPartitions takes a tableName and a list of loadFiles and refreshes all the partitions that are modified by the path in those loadFiles. It returns any error reported by Glue

type LocalSchemaRepository

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

func NewLocalSchemaRepository

func NewLocalSchemaRepository(wh model.Warehouse, uploader warehouseutils.Uploader) (*LocalSchemaRepository, error)

func (*LocalSchemaRepository) AddColumns

func (ls *LocalSchemaRepository) AddColumns(ctx context.Context, tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)

func (*LocalSchemaRepository) AlterColumn

func (ls *LocalSchemaRepository) AlterColumn(ctx context.Context, tableName, columnName, columnType string) (model.AlterTableResponse, error)

func (*LocalSchemaRepository) CreateSchema

func (*LocalSchemaRepository) CreateSchema(context.Context) (err error)

func (*LocalSchemaRepository) CreateTable

func (ls *LocalSchemaRepository) CreateTable(ctx context.Context, tableName string, columnMap model.TableSchema) (err error)

func (*LocalSchemaRepository) FetchSchema

func (*LocalSchemaRepository) RefreshPartitions

type SchemaRepository

type SchemaRepository interface {
	FetchSchema(ctx context.Context, warehouse model.Warehouse) (model.Schema, model.Schema, error)
	CreateSchema(ctx context.Context) (err error)
	CreateTable(ctx context.Context, tableName string, columnMap model.TableSchema) (err error)
	AddColumns(ctx context.Context, tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
	AlterColumn(ctx context.Context, tableName, columnName, columnType string) (model.AlterTableResponse, error)
	RefreshPartitions(ctx context.Context, tableName string, loadFiles []warehouseutils.LoadFile) error
}

func NewSchemaRepository

func NewSchemaRepository(wh model.Warehouse, uploader warehouseutils.Uploader, logger logger.Logger) (SchemaRepository, error)

Jump to

Keyboard shortcuts

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