Skip to content

Commit bbf6383

Browse files
use a test key instead
Co-authored-by: Thomas Chow <[email protected]> Co-authored-by: Thomas Chow <[email protected]>
1 parent 59ad186 commit bbf6383

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
spark.chronon.table.format_provider.class: "ai.chronon.integrations.cloud_gcp.GcpFormatProvider"
1+
test.yaml.key: "test_yaml_key"

spark/src/test/scala/ai/chronon/spark/test/MigrationCompareTest.scala

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ class MigrationCompareTest {
8484

8585
//--------------------------------Staging Query-----------------------------
8686
val stagingQueryConf = Builders.StagingQuery(
87-
query = s"select * from ${joinConf.metaData.outputTable} WHERE ds BETWEEN '{{ start_date }}' AND '{{ end_date }}'",
87+
query =
88+
s"select * from ${joinConf.metaData.outputTable} WHERE ds BETWEEN '{{ start_date }}' AND '{{ end_date }}'",
8889
startPartition = ninetyDaysAgo,
8990
metaData = Builders.MetaData(name = "test.item_snapshot_features_sq_3",
90-
namespace = namespace,
91-
tableProperties = Map("key" -> "val"))
91+
namespace = namespace,
92+
tableProperties = Map("key" -> "val"))
9293
)
9394

9495
(joinConf, stagingQueryConf)
@@ -113,8 +114,8 @@ class MigrationCompareTest {
113114
query = s"select item, ts, ds from ${joinConf.metaData.outputTable}",
114115
startPartition = ninetyDaysAgo,
115116
metaData = Builders.MetaData(name = "test.item_snapshot_features_sq_4",
116-
namespace = namespace,
117-
tableProperties = Map("key" -> "val"))
117+
namespace = namespace,
118+
tableProperties = Map("key" -> "val"))
118119
)
119120

120121
val (compareDf, metricsDf, metrics: DataMetrics) =
@@ -141,8 +142,8 @@ class MigrationCompareTest {
141142
query = s"select * from ${joinConf.metaData.outputTable} where ds BETWEEN '${monthAgo}' AND '${today}'",
142143
startPartition = ninetyDaysAgo,
143144
metaData = Builders.MetaData(name = "test.item_snapshot_features_sq_5",
144-
namespace = namespace,
145-
tableProperties = Map("key" -> "val"))
145+
namespace = namespace,
146+
tableProperties = Map("key" -> "val"))
146147
)
147148

148149
val (compareDf, metricsDf, metrics: DataMetrics) =

spark/src/test/scala/ai/chronon/spark/test/OfflineSubcommandTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ class OfflineSubcommandTest {
8686
.map(parse(_).extract[Map[String, String]])
8787
.getOrElse(throw new IllegalArgumentException("Yaml conf not found or invalid yaml"))
8888

89-
val confKey = "spark.chronon.table.format_provider.class"
89+
val confKey = "test.yaml.key"
9090
assertEquals(confs.get(confKey), sparkSession.conf.getOption(confKey))
91-
assertEquals(Some("ai.chronon.integrations.cloud_gcp.GcpFormatProvider"), sparkSession.conf.getOption(confKey))
91+
assertEquals(Some("test_yaml_key"), sparkSession.conf.getOption(confKey))
9292
assertTrue(sparkSession.conf.getOption("nonexistent_key").isEmpty)
9393
}
9494
}

0 commit comments

Comments
 (0)