Documentation ¶
Index ¶
- Constants
- func NewBigQueryClient(c entity.Config, client *bigquery.Client) *defaultBigQueryClient
- type BigQueryClient
- type BigQueryInserter
- type Columns
- type Config
- type DatasetTableStatus
- type LoaderFactory
- func (lf *LoaderFactory) Close(ctx context.Context) error
- func (lf *LoaderFactory) NewLoader(ctx context.Context, c entity.Config) (entity.Loader, error)
- func (lf *LoaderFactory) NewSinkExtractor(ctx context.Context, c entity.Config) (entity.Extractor, error)
- func (lf *LoaderFactory) SinkId() string
- type Row
- type RowItem
Constants ¶
View Source
const ( TableUpdateBackoffTime = 8 * time.Second DefaultBigQueryDatasetLocation = "EU" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BigQueryClient ¶
type BigQueryClient interface { GetDatasetMetadata(ctx context.Context, dataset *bigquery.Dataset) (*bigquery.DatasetMetadata, DatasetTableStatus, error) CreateDatasetRef(datasetId string) *bigquery.Dataset CreateDataset(ctx context.Context, id string, md *bigquery.DatasetMetadata) error GetTableMetadata(ctx context.Context, table *bigquery.Table) (*bigquery.TableMetadata, DatasetTableStatus, error) CreateTableRef(datasetId string, tableId string) *bigquery.Table CreateTable(ctx context.Context, datasetId string, tableId string, tm *bigquery.TableMetadata) (*bigquery.Table, error) GetTableInserter(table *bigquery.Table) BigQueryInserter UpdateTable(ctx context.Context, table *bigquery.Table, tm bigquery.TableMetadataToUpdate, etag string) (*bigquery.TableMetadata, error) Close() error }
type Config ¶
type Config struct { // ProjectId (required) specifies GCP project ID for this deployment. ProjectId string }
type DatasetTableStatus ¶
type DatasetTableStatus int
const ( Unknown DatasetTableStatus = iota Existent NonExistent )
type LoaderFactory ¶
type LoaderFactory struct {
// contains filtered or unexported fields
}
func NewLoaderFactory ¶
func NewLoaderFactory(ctx context.Context, config Config, client BigQueryClient) (*LoaderFactory, error)
NewLoaderFactory creates a new BigQuery loader connector. For standard usage, set bqClient to nil, making a default BigQuery client to be created internally.
func (*LoaderFactory) NewSinkExtractor ¶
func (*LoaderFactory) SinkId ¶
func (lf *LoaderFactory) SinkId() string
Click to show internal directories.
Click to hide internal directories.