bigquery

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: AGPL-3.0 Imports: 18 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 added in v0.1.10

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

func Init added in v0.1.10

func Init()

Types

type BQCredentialsT

type BQCredentialsT struct {
	ProjectID   string
	Credentials string
}

type HandleT

type HandleT struct {
	BQContext context.Context
	Db        *bigquery.Client
	Namespace string
	Warehouse warehouseutils.WarehouseT
	ProjectID string
	Uploader  warehouseutils.UploaderI
}

func (*HandleT) AddColumn added in v0.1.10

func (bq *HandleT) AddColumn(tableName, columnName, columnType string) (err error)

func (*HandleT) AlterColumn added in v0.1.10

func (bq *HandleT) AlterColumn(tableName, columnName, columnType string) (err error)

func (*HandleT) Cleanup added in v0.1.10

func (bq *HandleT) Cleanup()

func (*HandleT) Connect added in v0.1.10

func (bq *HandleT) Connect(warehouse warehouseutils.WarehouseT) (client.Client, error)

func (*HandleT) CrashRecover

func (bq *HandleT) CrashRecover(warehouse warehouseutils.WarehouseT) (err error)

func (*HandleT) CreateSchema added in v0.1.10

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

func (*HandleT) CreateTable added in v0.1.10

func (bq *HandleT) CreateTable(tableName string, columnMap map[string]string) (err error)

func (*HandleT) DeleteTable added in v0.1.10

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

func (*HandleT) DownloadIdentityRules added in v0.1.10

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

func (*HandleT) DropTable added in v0.1.10

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

func (*HandleT) FetchSchema added in v0.1.10

func (bq *HandleT) FetchSchema(warehouse warehouseutils.WarehouseT) (schema warehouseutils.SchemaT, err error)

FetchSchema queries bigquery and returns the schema assoiciated with provided namespace

func (*HandleT) GetTotalCountInTable added in v0.1.10

func (bq *HandleT) GetTotalCountInTable(tableName string) (total int64, err error)

func (*HandleT) IsEmpty added in v0.1.10

func (bq *HandleT) IsEmpty(warehouse warehouseutils.WarehouseT) (empty bool, err error)

func (*HandleT) LoadIdentityMappingsTable added in v0.1.10

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

func (*HandleT) LoadIdentityMergeRulesTable added in v0.1.10

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

func (*HandleT) LoadTable added in v0.1.10

func (bq *HandleT) LoadTable(tableName string) error

func (*HandleT) LoadTestTable added in v0.1.10

func (bq *HandleT) LoadTestTable(location, tableName string, payloadMap map[string]interface{}, format string) (err error)

func (*HandleT) LoadUserTables added in v0.1.10

func (bq *HandleT) LoadUserTables() (errorMap map[string]error)

func (*HandleT) SetConnectionTimeout added in v0.1.10

func (bq *HandleT) SetConnectionTimeout(timeout time.Duration)

func (*HandleT) Setup added in v0.1.10

func (bq *HandleT) Setup(warehouse warehouseutils.WarehouseT, uploader warehouseutils.UploaderI) (err error)

func (*HandleT) TestConnection added in v0.1.10

func (bq *HandleT) TestConnection(warehouse warehouseutils.WarehouseT) (err error)

type StagingLoadTableT added in v0.1.10

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

Jump to

Keyboard shortcuts

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