Documentation
¶
Index ¶
- Constants
- func CheckExpireForDateShardingTable(tableID string, expireDay int) (bool, error)
- type APIOptions
- type DateShardingTableTarget
- type ExportHandler
- type ExportShardingTablesLimit
- type ExportsReq
- type GCSReferenceForExportShardingTables
- type GCSReferenceForExportShardingTablesReq
- type Service
- type TargetTable
Constants ¶
View Source
const ( DefaultExportMaxTableSize = 50 * 1024 * 1024 * 1024 * 1024 DefaultExportMaxTableCount = 100000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIOptions ¶
type APIOptions func(options *apiOptions)
func WithStreamLogFn ¶
func WithStreamLogFn(f func(msg string)) APIOptions
WithStreamLogFn is Query結果を元にAPIを実行した時にログを処理できる関数を指定できる
type DateShardingTableTarget ¶
type ExportHandler ¶
type ExportHandler struct { }
func (*ExportHandler) Serve ¶
func (h *ExportHandler) Serve(ctx context.Context, w http.ResponseWriter, r *http.Request) *handlers.HTTPResponse
type ExportsReq ¶
type ExportsReq struct { Project string `json:"project"` Target *TargetTable `json:"target"` ToGCS *GCSReferenceForExportShardingTablesReq `json:"toGCS"` Limit *ExportShardingTablesLimit `json:"limit"` }
type GCSReferenceForExportShardingTables ¶
type GCSReferenceForExportShardingTables struct { // URI is Google Cloud Storage object URI string // DestinationFormat is the format to use when writing exported files. // Allowed values are: CSV, Avro, JSON. The default is CSV. // CSV is not supported for tables with nested or repeated fields. DestinationFormat bigquery.DataFormat // Compression specifies the type of compression to apply when writing data // to Google Cloud Storage, or using this GCSReference as an ExternalData // source with CSV or JSON SourceFormat. Default is None. // // Avro files allow additional compression types: DEFLATE and SNAPPY. Compression bigquery.Compression }
type GCSReferenceForExportShardingTablesReq ¶
type GCSReferenceForExportShardingTablesReq struct { // URI is Google Cloud Storage object // {{TABLE_ID}} を入れるとこれはExportするTableIDに置き換えられます // 対象のTableが1GBを超えることを想定してWildcardを含めてください // eg. gs://hoge/{{TABLE_ID}}/*.parquest URI string `json:"uri"` // DestinationFormat is the format to use when writing exported files. // Allowed values are: CSV, Avro, JSON. The default is CSV. // CSV is not supported for tables with nested or repeated fields. DestinationFormat string // Compression specifies the type of compression to apply when writing data // to Google Cloud Storage, or using this GCSReference as an ExternalData // source with CSV or JSON SourceFormat. Default is None. // // Avro files allow additional compression types: DEFLATE and SNAPPY. Compression string }
type Service ¶
func (*Service) ExportShardingTable ¶
func (*Service) ExportShardingTables ¶
func (s *Service) ExportShardingTables(ctx context.Context, to *GCSReferenceForExportShardingTables, projectID string, datasetID string, target *DateShardingTableTarget, jobFunc func(ctx context.Context, jobID string), limit *ExportShardingTablesLimit, ops ...APIOptions) ([]string, error)
Click to show internal directories.
Click to hide internal directories.