Skip to content

Commit

Permalink
fix(warehouse): use correct config for columns batch size (#2720)
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr authored Nov 23, 2022
1 parent 4f0d189 commit 0e26b30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion warehouse/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (bq *HandleT) loadTable(tableName string, _, getLoadFileLocFromTableUploads
loadFiles = bq.uploader.GetLoadFilesMetadata(warehouseutils.GetLoadFilesOptionsT{Table: tableName})
}
gcsLocations := warehouseutils.GetGCSLocations(loadFiles, warehouseutils.GCSLocationOptionsT{})
pkgLogger.Infof("BQ: Loading data into table: %s in bigquery dataset: %s in project: %s from %v", tableName, bq.namespace, bq.projectID, loadFiles)
pkgLogger.Infof("BQ: Loading data into table: %s in bigquery dataset: %s in project: %s", tableName, bq.namespace, bq.projectID)
gcsRef := bigquery.NewGCSReference(gcsLocations...)
gcsRef.SourceFormat = bigquery.JSON
gcsRef.MaxBadRecords = 0
Expand Down
2 changes: 1 addition & 1 deletion warehouse/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ func (job *UploadJobT) addColumnsToWarehouse(tName string, columnsMap map[string
pkgLogger.Infof(`[WH]: Adding columns for table %s in namespace %s of destination %s:%s`, tName, job.warehouse.Namespace, job.warehouse.Type, job.warehouse.Destination.ID)

destType := job.upload.DestinationType
columnsBatchSize := config.GetInt(fmt.Sprintf("Warehouse.%s.customDatasetPrefix", warehouseutils.WHDestNameMap[destType]), 100)
columnsBatchSize := config.GetInt(fmt.Sprintf("Warehouse.%s.columnsBatchSize", warehouseutils.WHDestNameMap[destType]), 100)

var columnsToAdd []warehouseutils.ColumnInfo
for columnName, columnType := range columnsMap {
Expand Down

0 comments on commit 0e26b30

Please sign in to comment.