From 78f71546b6c9480c705697ae0dbe14bcfa2b3a36 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Mon, 17 Jun 2024 22:03:00 +0200 Subject: [PATCH] Make example work in staging --- bundle/tests/quality_monitor/databricks.yml | 15 +++++++++++---- bundle/tests/quality_monitor_test.go | 6 +++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bundle/tests/quality_monitor/databricks.yml b/bundle/tests/quality_monitor/databricks.yml index 3abcdfddaa..9700b854d3 100644 --- a/bundle/tests/quality_monitor/databricks.yml +++ b/bundle/tests/quality_monitor/databricks.yml @@ -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: @@ -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" diff --git a/bundle/tests/quality_monitor_test.go b/bundle/tests/quality_monitor_test.go index d5db05196c..07d3c8fee3 100644 --- a/bundle/tests/quality_monitor_test.go +++ b/bundle/tests/quality_monitor_test.go @@ -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) } @@ -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) } @@ -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)