bigquery

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const SourceKind string = "bigquery"

Variables

This section is empty.

Functions

This section is empty.

Types

type BigqueryClientCreator added in v0.13.0

type BigqueryClientCreator func(tokenString string, wantRestService bool) (*bigqueryapi.Client, *bigqueryrestapi.Service, error)

type Config

type Config struct {
	// BigQuery configs
	Name            string   `yaml:"name" validate:"required"`
	Kind            string   `yaml:"kind" validate:"required"`
	Project         string   `yaml:"project" validate:"required"`
	Location        string   `yaml:"location"`
	AllowedDatasets []string `yaml:"allowedDatasets"`
	UseClientOAuth  bool     `yaml:"useClientOAuth"`
}

func (Config) Initialize

func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error)

func (Config) SourceConfigKind

func (r Config) SourceConfigKind() string

type DataplexClientCreator added in v0.15.0

type DataplexClientCreator func(tokenString string) (*dataplexapi.CatalogClient, error)

type Source

type Source struct {
	// BigQuery Google SQL struct with client
	Name               string `yaml:"name"`
	Kind               string `yaml:"kind"`
	Project            string
	Location           string
	Client             *bigqueryapi.Client
	RestService        *bigqueryrestapi.Service
	TokenSource        oauth2.TokenSource
	MaxQueryResultRows int
	ClientCreator      BigqueryClientCreator
	AllowedDatasets    map[string]struct{}
	UseClientOAuth     bool
	// contains filtered or unexported fields
}

func (*Source) BigQueryAllowedDatasets added in v0.15.0

func (s *Source) BigQueryAllowedDatasets() []string

func (*Source) BigQueryClient

func (s *Source) BigQueryClient() *bigqueryapi.Client

func (*Source) BigQueryClientCreator added in v0.13.0

func (s *Source) BigQueryClientCreator() BigqueryClientCreator

func (*Source) BigQueryLocation added in v0.14.0

func (s *Source) BigQueryLocation() string

func (*Source) BigQueryProject added in v0.14.0

func (s *Source) BigQueryProject() string

func (*Source) BigQueryRestService added in v0.10.0

func (s *Source) BigQueryRestService() *bigqueryrestapi.Service

func (*Source) BigQueryTokenSource added in v0.13.0

func (s *Source) BigQueryTokenSource() oauth2.TokenSource

func (*Source) BigQueryTokenSourceWithScope added in v0.15.0

func (s *Source) BigQueryTokenSourceWithScope(ctx context.Context, scope string) (oauth2.TokenSource, error)

func (*Source) GetMaxQueryResultRows added in v0.13.0

func (s *Source) GetMaxQueryResultRows() int

func (*Source) IsDatasetAllowed added in v0.15.0

func (s *Source) IsDatasetAllowed(projectID, datasetID string) bool

IsDatasetAllowed checks if a given dataset is accessible based on the source's configuration.

func (*Source) MakeDataplexCatalogClient added in v0.15.0

func (s *Source) MakeDataplexCatalogClient() func() (*dataplexapi.CatalogClient, DataplexClientCreator, error)

func (*Source) SourceKind

func (s *Source) SourceKind() string

func (*Source) UseClientAuthorization added in v0.14.0

func (s *Source) UseClientAuthorization() bool

Jump to

Keyboard shortcuts

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