bigquery

package
v1.9.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GCPProjectID   = "project"
	GCPCredentials = "credentials"
	GCPLocation    = "location"
)

String constants for bigquery destination config

Variables

This section is empty.

Functions

func Connect

func Connect(context context.Context, cred *BQCredentials) (*bigquery.Client, error)

func WithConfig added in v1.8.0

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

Types

type BQCredentials added in v1.7.0

type BQCredentials struct {
	ProjectID   string
	Credentials string
}

type BigQuery added in v1.8.0

type BigQuery struct {
	Logger logger.Logger

	SlowQueryThreshold time.Duration
	// contains filtered or unexported fields
}

func New added in v1.8.0

func New() *BigQuery

func (*BigQuery) AddColumns added in v1.8.0

func (bq *BigQuery) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)

func (*BigQuery) AlterColumn added in v1.8.0

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

func (*BigQuery) Cleanup added in v1.8.0

func (bq *BigQuery) Cleanup()

func (*BigQuery) Connect added in v1.8.0

func (bq *BigQuery) Connect(warehouse model.Warehouse) (client.Client, error)

func (*BigQuery) CrashRecover added in v1.8.0

func (bq *BigQuery) CrashRecover()

func (*BigQuery) CreateSchema added in v1.8.0

func (bq *BigQuery) CreateSchema() (err error)

func (*BigQuery) CreateTable added in v1.8.0

func (bq *BigQuery) CreateTable(tableName string, columnMap model.TableSchema) error

func (*BigQuery) DeleteBy added in v1.8.0

func (bq *BigQuery) DeleteBy(tableNames []string, params warehouseutils.DeleteByParams) error

func (*BigQuery) DeleteTable added in v1.8.0

func (bq *BigQuery) DeleteTable(tableName string) (err error)

func (*BigQuery) DownloadIdentityRules added in v1.8.0

func (bq *BigQuery) DownloadIdentityRules(gzWriter *misc.GZipWriter) (err error)

func (*BigQuery) DropTable added in v1.8.0

func (bq *BigQuery) DropTable(tableName string) (err error)

func (*BigQuery) ErrorMappings added in v1.8.0

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

func (*BigQuery) FetchSchema added in v1.8.0

func (bq *BigQuery) FetchSchema() (model.Schema, model.Schema, error)

FetchSchema queries bigquery and returns the schema associated with provided namespace

func (*BigQuery) GetTotalCountInTable added in v1.8.0

func (bq *BigQuery) GetTotalCountInTable(ctx context.Context, tableName string) (int64, error)

func (*BigQuery) IsEmpty added in v1.8.0

func (bq *BigQuery) IsEmpty(warehouse model.Warehouse) (empty bool, err error)

func (*BigQuery) LoadIdentityMappingsTable added in v1.8.0

func (bq *BigQuery) LoadIdentityMappingsTable() (err error)

func (*BigQuery) LoadIdentityMergeRulesTable added in v1.8.0

func (bq *BigQuery) LoadIdentityMergeRulesTable() (err error)

func (*BigQuery) LoadTable added in v1.8.0

func (bq *BigQuery) LoadTable(_ context.Context, tableName string) error

func (*BigQuery) LoadTestTable added in v1.8.0

func (bq *BigQuery) LoadTestTable(location, tableName string, _ map[string]interface{}, _ string) (err error)

func (*BigQuery) LoadUserTables added in v1.8.0

func (bq *BigQuery) LoadUserTables(context.Context) (errorMap map[string]error)

func (*BigQuery) SetConnectionTimeout added in v1.8.0

func (*BigQuery) SetConnectionTimeout(_ time.Duration)

func (*BigQuery) Setup added in v1.8.0

func (bq *BigQuery) Setup(warehouse model.Warehouse, uploader warehouseutils.Uploader) (err error)

func (*BigQuery) TestConnection added in v1.8.0

func (*BigQuery) TestConnection(context.Context, model.Warehouse) (err error)

type StagingLoadTable added in v1.7.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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