Documentation

Overview

Package datatransfer is an auto-generated package for the BigQuery Data Transfer API.

Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis.

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit pkg.go.dev/cloud.google.com/go.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourcePath

func DataSourcePath(project, dataSource string) string

    DataSourcePath returns the path for the data source resource.

    Deprecated: Use

    fmt.Sprintf("projects/%s/dataSources/%s", project, dataSource)
    

    instead.

    func DefaultAuthScopes

    func DefaultAuthScopes() []string

      DefaultAuthScopes reports the default set of authentication scopes to use with this package.

      func LocationDataSourcePath

      func LocationDataSourcePath(project, location, dataSource string) string

        LocationDataSourcePath returns the path for the location data source resource.

        Deprecated: Use

        fmt.Sprintf("projects/%s/locations/%s/dataSources/%s", project, location, dataSource)
        

        instead.

        func LocationPath

        func LocationPath(project, location string) string

          LocationPath returns the path for the location resource.

          Deprecated: Use

          fmt.Sprintf("projects/%s/locations/%s", project, location)
          

          instead.

          func LocationRunPath

          func LocationRunPath(project, location, transferConfig, run string) string

            LocationRunPath returns the path for the location run resource.

            Deprecated: Use

            fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s/runs/%s", project, location, transferConfig, run)
            

            instead.

            func LocationTransferConfigPath

            func LocationTransferConfigPath(project, location, transferConfig string) string

              LocationTransferConfigPath returns the path for the location transfer config resource.

              Deprecated: Use

              fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s", project, location, transferConfig)
              

              instead.

              func ProjectPath

              func ProjectPath(project string) string

                ProjectPath returns the path for the project resource.

                Deprecated: Use

                fmt.Sprintf("projects/%s", project)
                

                instead.

                func RunPath

                func RunPath(project, transferConfig, run string) string

                  RunPath returns the path for the run resource.

                  Deprecated: Use

                  fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", project, transferConfig, run)
                  

                  instead.

                  func TransferConfigPath

                  func TransferConfigPath(project, transferConfig string) string

                    TransferConfigPath returns the path for the transfer config resource.

                    Deprecated: Use

                    fmt.Sprintf("projects/%s/transferConfigs/%s", project, transferConfig)
                    

                    instead.

                    Types

                    type CallOptions

                    type CallOptions struct {
                    	GetDataSource           []gax.CallOption
                    	ListDataSources         []gax.CallOption
                    	CreateTransferConfig    []gax.CallOption
                    	UpdateTransferConfig    []gax.CallOption
                    	DeleteTransferConfig    []gax.CallOption
                    	GetTransferConfig       []gax.CallOption
                    	ListTransferConfigs     []gax.CallOption
                    	ScheduleTransferRuns    []gax.CallOption
                    	StartManualTransferRuns []gax.CallOption
                    	GetTransferRun          []gax.CallOption
                    	DeleteTransferRun       []gax.CallOption
                    	ListTransferRuns        []gax.CallOption
                    	ListTransferLogs        []gax.CallOption
                    	CheckValidCreds         []gax.CallOption
                    }

                      CallOptions contains the retry settings for each method of Client.

                      type Client

                      type Client struct {
                      
                      	// The call options for this service.
                      	CallOptions *CallOptions
                      	// contains filtered or unexported fields
                      }

                        Client is a client for interacting with BigQuery Data Transfer API.

                        Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

                        func NewClient

                        func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

                          NewClient creates a new data transfer service client.

                          The Google BigQuery Data Transfer Service API enables BigQuery users to configure the transfer of their data from other Google Products into BigQuery. This service contains methods that are end user exposed. It backs up the frontend.

                          Example
                          Output:
                          
                          

                          func (*Client) CheckValidCreds

                            CheckValidCreds returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn’t support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.

                            Example
                            Output:
                            
                            

                            func (*Client) Close

                            func (c *Client) Close() error

                              Close closes the connection to the API service. The user should invoke this when the client is no longer required.

                              func (*Client) Connection

                              func (c *Client) Connection() *grpc.ClientConn

                                Connection returns a connection to the API service.

                                Deprecated.

                                func (*Client) CreateTransferConfig

                                  CreateTransferConfig creates a new data transfer configuration.

                                  Example
                                  Output:
                                  
                                  

                                  func (*Client) DeleteTransferConfig

                                  func (c *Client) DeleteTransferConfig(ctx context.Context, req *datatransferpb.DeleteTransferConfigRequest, opts ...gax.CallOption) error

                                    DeleteTransferConfig deletes a data transfer configuration, including any associated transfer runs and logs.

                                    Example
                                    Output:
                                    
                                    

                                    func (*Client) DeleteTransferRun

                                    func (c *Client) DeleteTransferRun(ctx context.Context, req *datatransferpb.DeleteTransferRunRequest, opts ...gax.CallOption) error

                                      DeleteTransferRun deletes the specified transfer run.

                                      Example
                                      Output:
                                      
                                      

                                      func (*Client) GetDataSource

                                        GetDataSource retrieves a supported data source and returns its settings, which can be used for UI rendering.

                                        Example
                                        Output:
                                        
                                        

                                        func (*Client) GetTransferConfig

                                          GetTransferConfig returns information about a data transfer config.

                                          Example
                                          Output:
                                          
                                          

                                          func (*Client) GetTransferRun

                                            GetTransferRun returns information about the particular transfer run.

                                            Example
                                            Output:
                                            
                                            

                                            func (*Client) ListDataSources

                                              ListDataSources lists supported data sources and returns their settings, which can be used for UI rendering.

                                              Example
                                              Output:
                                              
                                              

                                              func (*Client) ListTransferConfigs

                                                ListTransferConfigs returns information about all data transfers in the project.

                                                Example
                                                Output:
                                                
                                                

                                                func (*Client) ListTransferLogs

                                                  ListTransferLogs returns user facing log messages for the data transfer run.

                                                  Example
                                                  Output:
                                                  
                                                  

                                                  func (*Client) ListTransferRuns

                                                    ListTransferRuns returns information about running and completed jobs.

                                                    Example
                                                    Output:
                                                    
                                                    

                                                    func (*Client) ScheduleTransferRuns

                                                      ScheduleTransferRuns creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

                                                      Example
                                                      Output:
                                                      
                                                      

                                                      func (*Client) StartManualTransferRuns

                                                        StartManualTransferRuns start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.

                                                        Example
                                                        Output:
                                                        
                                                        

                                                        func (*Client) UpdateTransferConfig

                                                          UpdateTransferConfig updates a data transfer configuration. All fields must be set, even if they are not updated.

                                                          Example
                                                          Output:
                                                          
                                                          

                                                          type DataSourceIterator

                                                          type DataSourceIterator struct {
                                                          
                                                          	// Response is the raw response for the current page.
                                                          	// It must be cast to the RPC response type.
                                                          	// Calling Next() or InternalFetch() updates this value.
                                                          	Response interface{}
                                                          
                                                          	// InternalFetch is for use by the Google Cloud Libraries only.
                                                          	// It is not part of the stable interface of this package.
                                                          	//
                                                          	// InternalFetch returns results from a single call to the underlying RPC.
                                                          	// The number of results is no greater than pageSize.
                                                          	// If there are no more results, nextPageToken is empty and err is nil.
                                                          	InternalFetch func(pageSize int, pageToken string) (results []*datatransferpb.DataSource, nextPageToken string, err error)
                                                          	// contains filtered or unexported fields
                                                          }

                                                            DataSourceIterator manages a stream of *datatransferpb.DataSource.

                                                            func (*DataSourceIterator) Next

                                                              Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

                                                              func (*DataSourceIterator) PageInfo

                                                              func (it *DataSourceIterator) PageInfo() *iterator.PageInfo

                                                                PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

                                                                type TransferConfigIterator

                                                                type TransferConfigIterator struct {
                                                                
                                                                	// Response is the raw response for the current page.
                                                                	// It must be cast to the RPC response type.
                                                                	// Calling Next() or InternalFetch() updates this value.
                                                                	Response interface{}
                                                                
                                                                	// InternalFetch is for use by the Google Cloud Libraries only.
                                                                	// It is not part of the stable interface of this package.
                                                                	//
                                                                	// InternalFetch returns results from a single call to the underlying RPC.
                                                                	// The number of results is no greater than pageSize.
                                                                	// If there are no more results, nextPageToken is empty and err is nil.
                                                                	InternalFetch func(pageSize int, pageToken string) (results []*datatransferpb.TransferConfig, nextPageToken string, err error)
                                                                	// contains filtered or unexported fields
                                                                }

                                                                  TransferConfigIterator manages a stream of *datatransferpb.TransferConfig.

                                                                  func (*TransferConfigIterator) Next

                                                                    Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

                                                                    func (*TransferConfigIterator) PageInfo

                                                                    func (it *TransferConfigIterator) PageInfo() *iterator.PageInfo

                                                                      PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

                                                                      type TransferMessageIterator

                                                                      type TransferMessageIterator struct {
                                                                      
                                                                      	// Response is the raw response for the current page.
                                                                      	// It must be cast to the RPC response type.
                                                                      	// Calling Next() or InternalFetch() updates this value.
                                                                      	Response interface{}
                                                                      
                                                                      	// InternalFetch is for use by the Google Cloud Libraries only.
                                                                      	// It is not part of the stable interface of this package.
                                                                      	//
                                                                      	// InternalFetch returns results from a single call to the underlying RPC.
                                                                      	// The number of results is no greater than pageSize.
                                                                      	// If there are no more results, nextPageToken is empty and err is nil.
                                                                      	InternalFetch func(pageSize int, pageToken string) (results []*datatransferpb.TransferMessage, nextPageToken string, err error)
                                                                      	// contains filtered or unexported fields
                                                                      }

                                                                        TransferMessageIterator manages a stream of *datatransferpb.TransferMessage.

                                                                        func (*TransferMessageIterator) Next

                                                                          Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

                                                                          func (*TransferMessageIterator) PageInfo

                                                                          func (it *TransferMessageIterator) PageInfo() *iterator.PageInfo

                                                                            PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

                                                                            type TransferRunIterator

                                                                            type TransferRunIterator struct {
                                                                            
                                                                            	// Response is the raw response for the current page.
                                                                            	// It must be cast to the RPC response type.
                                                                            	// Calling Next() or InternalFetch() updates this value.
                                                                            	Response interface{}
                                                                            
                                                                            	// InternalFetch is for use by the Google Cloud Libraries only.
                                                                            	// It is not part of the stable interface of this package.
                                                                            	//
                                                                            	// InternalFetch returns results from a single call to the underlying RPC.
                                                                            	// The number of results is no greater than pageSize.
                                                                            	// If there are no more results, nextPageToken is empty and err is nil.
                                                                            	InternalFetch func(pageSize int, pageToken string) (results []*datatransferpb.TransferRun, nextPageToken string, err error)
                                                                            	// contains filtered or unexported fields
                                                                            }

                                                                              TransferRunIterator manages a stream of *datatransferpb.TransferRun.

                                                                              func (*TransferRunIterator) Next

                                                                                Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

                                                                                func (*TransferRunIterator) PageInfo

                                                                                func (it *TransferRunIterator) PageInfo() *iterator.PageInfo

                                                                                  PageInfo supports pagination. See the google.golang.org/api/iterator package for details.