Skip to content

Commit 3600f82

Browse files
committed
Temporarily set materializationProject and materializationDataset to get bq connector to create temp tables.
1 parent 7c2290a commit 3600f82

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
spark.chronon.table.format_provider.class: "ai.chronon.integrations.cloud_gcp.GcpFormatProvider"
22
spark.chronon.partition.format: "yyyy-MM-dd"
3-
spark.chronon.table.gcs.temporary_gcs_bucket: "zl-warehouse"
3+
spark.chronon.table.gcs.temporary_gcs_bucket: "zl-warehouse"
4+
spark.chronon.table.gcs.connector_output_dataset: "data"
5+
spark.chronon.table.gcs.connector_output_project: "canary-443022"

cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/GcpFormatProvider.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ case class GcpFormatProvider(sparkSession: SparkSession) extends FormatProvider
4343
val sparkOptions: Map[String, String] = Map(
4444
// todo(tchow): No longer needed after https://github.com/GoogleCloudDataproc/spark-bigquery-connector/pull/1320
4545
"temporaryGcsBucket" -> sparkSession.conf.get("spark.chronon.table.gcs.temporary_gcs_bucket"),
46-
"writeMethod" -> "indirect"
46+
"writeMethod" -> "indirect",
47+
"materializationProject" -> sparkSession.conf.get("spark.chronon.table.gcs.connector_output_project"),
48+
"materializationDataset" -> sparkSession.conf.get("spark.chronon.table.gcs.connector_output_dataset")
4749
) ++ partitionColumnOption
4850

4951
BigQueryFormat(tableId.getProject, sparkOptions)

0 commit comments

Comments
 (0)