Skip to content

Commit

Permalink
Update Test.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
rohithvangapalli authored Sep 22, 2023
1 parent f12707a commit 38ace9b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ class Test extends AnyFunSuite with BeforeAndAfter {
spark.sparkContext.setLogLevel("ERROR")
val bigQueryDf: DataFrame = spark.read.parquet("src/test/resources/data/bigQueryTestTable.parquet")

val gcpToken: String = sys.env.getOrElse("GCP_TOKEN", throw new Exception("GCP_TOKEN environment variable is not set"))
spark.conf.set("gcpAccessToken", gcpToken)
// val gcpToken: String = sys.env.getOrElse("GCP_TOKEN", throw new Exception("GCP_TOKEN environment variable is not set"))
// spark.conf.set("gcpAccessToken", gcpToken)
val credentials : String = sys.env.getOrElse("GCP_STRING", throw new Exception("GCP_TOKEN environment variable is not set"))
spark.conf.set("credentials","ew0KICAidHlwZSI6ICJzZXJ2aWNlX2FjY291bnQiLA0KICAicHJvamVjdF9pZCI6ICJtb2Rhay1uYWJ1IiwNCiAgInByaXZhdGVfa2V5X2lkIjogIjk4NDlmZTFmZjVkZGU5NjA2NmZmODRjYTJlMDRmNzBmMzQ5ZTkzNGQiLA0KICAicHJpdmF0ZV9rZXkiOiAiLS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tXG5NSUlFdlFJQkFEQU5CZ2txaGtpRzl3MEJBUUVGQUFTQ0JLY3dnZ1NqQWdFQUFvSUJBUURPZ0lOejdrbjZmRjErXG54R2dvMUVicWJSUWdNVjFiNnJUbzJLRk5IWnJMeUE5YndIaW45cEVSTTd0YjA1VXE0TTAxelA4WHlGWTVpSW9jXG5OQSs2dzkzeU9ORkxyazN2bnBRQzhjT1pqSzZRL3ZWaVQzNG4zSVZGVmFmWkovTWhnNzJmTDNGQTRMaklNQVVRXG42dEducG9XR0xQVCszeHVQR1pNdmxOOEJZanBuR0FmV1BLNmxZMWozZjVNbXVodm9BV2xpbEFiajVTZVIy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uZ29vZ2xlLmNvbS9vL29hdXRoMi9hdXRoIiwNCiAgInRva2VuX3VyaSI6ICJodHRwczovL29hdXRoMi5nb29nbGVhcGlzLmNvbS90b2tlbiIsDQogICJhdXRoX3Byb3ZpZGVyX3g1MDlfY2VydF91cmwiOiAiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vb2F1dGgyL3YxL2NlcnRzIiwNCiAgImNsaWVudF94NTA5X2NlcnRfdXJsIjogImh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL3JvYm90L3YxL21ldGFkYXRhL3g1MDkvYmlncXVlcnktc2ElNDBtb2Rhay1uYWJ1LmlhbS5nc2VydmljZWFjY291bnQuY29tIg0KfQ")
spark.conf.set("viewsEnabled","true")
spark.conf.set("materializationDataset","nabu_spark")
//creating config map
Expand Down Expand Up @@ -75,4 +77,4 @@ class Test extends AnyFunSuite with BeforeAndAfter {
after {
spark.stop
}
}
}

0 comments on commit 38ace9b

Please sign in to comment.