本文整理汇总了Golang中google/golang.org/api/bigquery/v2.JobConfigurationLoad.SourceFormat方法的典型用法代码示例。如果您正苦于以下问题:Golang JobConfigurationLoad.SourceFormat方法的具体用法?Golang JobConfigurationLoad.SourceFormat怎么用?Golang JobConfigurationLoad.SourceFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类google/golang.org/api/bigquery/v2.JobConfigurationLoad
的用法示例。
在下文中一共展示了JobConfigurationLoad.SourceFormat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: customizeLoadSrc
func (gcs *GCSReference) customizeLoadSrc(conf *bq.JobConfigurationLoad, projectID string) {
conf.SourceUris = gcs.uris
conf.SkipLeadingRows = gcs.SkipLeadingRows
conf.SourceFormat = string(gcs.SourceFormat)
conf.Encoding = string(gcs.Encoding)
conf.FieldDelimiter = gcs.FieldDelimiter
// TODO(mcgreevy): take into account gcs.ForceZeroQuote once the underlying library supports it.
conf.Quote = gcs.Quote
}
示例2: customizeLoadSrc
func (gcs *GCSReference) customizeLoadSrc(conf *bq.JobConfigurationLoad) {
conf.SourceUris = gcs.uris
conf.SkipLeadingRows = gcs.SkipLeadingRows
conf.SourceFormat = string(gcs.SourceFormat)
conf.Encoding = string(gcs.Encoding)
conf.FieldDelimiter = gcs.FieldDelimiter
if gcs.ForceZeroQuote {
quote := ""
conf.Quote = "e
} else if gcs.Quote != "" {
conf.Quote = &gcs.Quote
}
}
示例3: populateLoadConfig
func (fc *FileConfig) populateLoadConfig(conf *bq.JobConfigurationLoad) {
conf.SkipLeadingRows = fc.SkipLeadingRows
conf.SourceFormat = string(fc.SourceFormat)
conf.AllowJaggedRows = fc.AllowJaggedRows
conf.AllowQuotedNewlines = fc.AllowQuotedNewlines
conf.Encoding = string(fc.Encoding)
conf.FieldDelimiter = fc.FieldDelimiter
conf.IgnoreUnknownValues = fc.IgnoreUnknownValues
conf.MaxBadRecords = fc.MaxBadRecords
if fc.Schema != nil {
conf.Schema = fc.Schema.asTableSchema()
}
conf.Quote = fc.quote()
}