bigquery

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

Google BigQuery Service

This service is google.golang.org/api/bigquery/v2.Service proxy

To check all supported method run

     endly -s='gcp/bigquery'

To check method contract run endly -s='gcp/bigquery' -a=methodName

    endly -s='gcp/bigquery' -a='datasetsList'

References:

Usage:
  1. Listing dataset
endy -run='gcp/bigquery:datasetsList' projectID=myProject
  1. Query with destination table
endy -r=query

@query.yaml

init:
  dataset: myDataset
defaults:
  credentials: gc
pipeline:
  query:
    action: gcp/bigquery:query
    query: SELECT * FROM mySourceTable
    allowlargeresults: false
    defaultdataset:
      projectid: ${gcp.projectID}
      datasetid: $dataset
    destinationtable:
      projectid: ${gcp.projectID}
      datasetid: $dataset
      tableid: myTable
    writedisposition: WRITE_APPEND

Documentation

Index

Constants

View Source
const (
	//ServiceID Google BigQuery Service ID.
	ServiceID = "gcp/bigquery"
)

Variables

This section is empty.

Functions

func InitRequest

func InitRequest(context *endly.Context, rawRequest map[string]interface{}) error

func New

func New() endly.Service

New creates a new BigQuery service.

Types

type CopyRequest added in v0.30.2

type CopyRequest struct {
	bigquery.JobConfigurationTableCopy
	Project string
	Job     *bigquery.JobReference
	Async   bool `description:"if set true, function does not wait for job completion"`
}

CopyRequest represents copy request

func (*CopyRequest) Validate added in v0.30.2

func (r *CopyRequest) Validate() error

Validate checks if request is valid

type CtxClient

type CtxClient struct {
	*gcp.AbstractClient
	// contains filtered or unexported fields
}

CtxClient represents context client

func GetClient

func GetClient(context *endly.Context) (*CtxClient, error)

func (*CtxClient) Service

func (s *CtxClient) Service() interface{}

func (*CtxClient) SetService

func (s *CtxClient) SetService(service interface{}) error

type JobWaitRequest added in v0.30.2

type JobWaitRequest struct {
	Job *bigquery.JobReference
}

func (*JobWaitRequest) Validate added in v0.30.2

func (r *JobWaitRequest) Validate() error

Validate checks if request is valid

type LoadRequest added in v0.30.2

type LoadRequest struct {
	bigquery.JobConfigurationLoad
	Job     *bigquery.JobReference
	Project string
	Async   bool `description:"if set true, function does not wait for job completion"`
}

LoadRequest represents load request

func (*LoadRequest) Validate added in v0.30.2

func (r *LoadRequest) Validate() error

Validate checks if request is valid

type QueryRequest added in v0.30.2

type QueryRequest struct {
	bigquery.JobConfigurationQuery
	Job     *bigquery.JobReference
	Project string
	Async   bool `description:"if set true, function does not wait for job completion"`
}

QueryRequest represents query request

func (*QueryRequest) Validate added in v0.30.2

func (r *QueryRequest) Validate() error

Validate checks if request is valid

Jump to

Keyboard shortcuts

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