Skip to content

Commit

Permalink
Make example work in staging
Browse files Browse the repository at this point in the history
  • Loading branch information
lennartkats-db committed Jun 17, 2024
1 parent 64ec678 commit 78f7154
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 11 additions & 4 deletions bundle/tests/quality_monitor/databricks.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
bundle:
name: quality_monitors

resources:
quality_monitors:
my_monitor:
table_name: "main.test.thing1"
table_name: "numbers"
assets_dir: "/Shared/provider-test/databricks_monitoring/main.test.thing1"
output_schema_name: "test"
output_schema_name: "main.test"
inference_log:
granularities: ["1 day"]
timestamp_col: "timestamp"
prediction_col: "prediction"
model_id_col: "model_id"
problem_type: "PROBLEM_TYPE_REGRESSION"
schedule:
quartz_cron_expression: "0 0 12 * * ?" # every day at noon
timezone_id: UTC

targets:
development:
mode: development
default: true
resources:
quality_monitors:
my_monitor:
Expand All @@ -24,14 +31,14 @@ targets:
quality_monitors:
my_monitor:
table_name: "main.test.staging"
output_schema_name: "staging"
output_schema_name: "main.test"

production:
resources:
quality_monitors:
my_monitor:
table_name: "main.test.prod"
output_schema_name: "prod"
output_schema_name: "main.test"
inference_log:
granularities: ["1 hour"]
timestamp_col: "timestamp_prod"
Expand Down
6 changes: 3 additions & 3 deletions bundle/tests/quality_monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestMonitorTableNames(t *testing.T) {
p := b.Config.Resources.QualityMonitors["my_monitor"]
assert.Equal(t, "main.test.dev", p.TableName)
assert.Equal(t, "/Shared/provider-test/databricks_monitoring/main.test.thing1", p.AssetsDir)
assert.Equal(t, "test", p.OutputSchemaName)
assert.Equal(t, "main.test", p.OutputSchemaName)

assertExpectedMonitor(t, p)
}
Expand All @@ -36,7 +36,7 @@ func TestMonitorStaging(t *testing.T) {
p := b.Config.Resources.QualityMonitors["my_monitor"]
assert.Equal(t, "main.test.staging", p.TableName)
assert.Equal(t, "/Shared/provider-test/databricks_monitoring/main.test.thing1", p.AssetsDir)
assert.Equal(t, "staging", p.OutputSchemaName)
assert.Equal(t, "main.test", p.OutputSchemaName)

assertExpectedMonitor(t, p)
}
Expand All @@ -48,7 +48,7 @@ func TestMonitorProduction(t *testing.T) {
p := b.Config.Resources.QualityMonitors["my_monitor"]
assert.Equal(t, "main.test.prod", p.TableName)
assert.Equal(t, "/Shared/provider-test/databricks_monitoring/main.test.thing1", p.AssetsDir)
assert.Equal(t, "prod", p.OutputSchemaName)
assert.Equal(t, "main.test", p.OutputSchemaName)

inferenceLog := p.InferenceLog
assert.Equal(t, []string{"1 day", "1 hour"}, inferenceLog.Granularities)
Expand Down

0 comments on commit 78f7154

Please sign in to comment.