File tree 1 file changed +6
-7
lines changed
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ import org.apache.spark.sql.SparkSession
13
13
import scala .collection .JavaConverters ._
14
14
15
15
case class GcpFormatProvider (sparkSession : SparkSession ) extends FormatProvider {
16
+ // Order of Precedence for Default Project
17
+ // Explicitly configured project in code (e.g., setProjectId()).
18
+ // GOOGLE_CLOUD_PROJECT environment variable.
19
+ // project_id from the ADC service account JSON file.
20
+ // Active project in the gcloud CLI configuration.
21
+ // No default project: An error will occur if no project ID is available.
16
22
lazy val bqOptions = BigQueryOptions .getDefaultInstance
17
23
lazy val bigQueryClient = bqOptions.getService
18
24
@@ -31,13 +37,6 @@ case class GcpFormatProvider(sparkSession: SparkSession) extends FormatProvider
31
37
32
38
val btTableIdentifier : TableId = BigQueryUtil .parseTableId(tableName)
33
39
34
- // Order of Precedence for Default Project
35
- // Explicitly configured project in code (e.g., setProjectId()).
36
- // GOOGLE_CLOUD_PROJECT environment variable.
37
- // project_id from the ADC service account JSON file.
38
- // Active project in the gcloud CLI configuration.
39
- // No default project: An error will occur if no project ID is available.
40
-
41
40
val tableOpt = Option (bigQueryClient.getTable(btTableIdentifier.getDataset, btTableIdentifier.getTable))
42
41
tableOpt match {
43
42
case Some (table) => {
You can’t perform that action at this time.
0 commit comments