Skip to content

Commit

Permalink
Map MC's MISCONFIGURED status to UNKNOWN (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
mars-lan authored Jan 9, 2024
1 parent f23e5bf commit c354d18
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metaphor/monte_carlo/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"ERROR": DataMonitorStatus.ERROR,
"IN_PROGRESS": DataMonitorStatus.UNKNOWN,
"NO_STATUS": DataMonitorStatus.UNKNOWN,
"MISCONFIGURED": DataMonitorStatus.ERROR,
"MISCONFIGURED": DataMonitorStatus.UNKNOWN,
"IN_TRAINING": DataMonitorStatus.UNKNOWN,
}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metaphor-connectors"
version = "0.13.101"
version = "0.13.102"
license = "Apache-2.0"
description = "A collection of Python-based 'connectors' that extract metadata from various sources to ingest into the Metaphor app."
authors = ["Metaphor <[email protected]>"]
Expand Down
26 changes: 25 additions & 1 deletion tests/monte_carlo/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lastRun": "2023-06-23T03:54:35.817000+00:00",
"owner": "[email protected]",
"severity": "UNKNOWN",
"status": "ERROR",
"status": "UNKNOWN",
"targets": [],
"title": "auto_monitor_name_cd5b69bd-e465-4545-b3f9-a5d507ea766c",
"url": "https://getmontecarlo.com/monitors/e0dc143e-dd8a-4cb9-b4cc-dedec715d955"
Expand Down Expand Up @@ -53,5 +53,29 @@
"name": "db.metaphor.test2",
"platform": "SNOWFLAKE"
}
},
{
"dataQuality": {
"monitors": [
{
"description": "Field Health for all fields in db:metaphor.test3",
"lastRun": "2023-06-23T03:54:35.817000+00:00",
"owner": "[email protected]",
"severity": "UNKNOWN",
"status": "ERROR",
"targets": [],
"title": "auto_monitor_name_18637195-a3c4-416e-a3e2-a89cc10adbc8",
"url": "https://getmontecarlo.com/monitors/2c156c8d-ab4a-432f-b8bb-f9ea9f31ed3d"
}
],
"provider": "MONTE_CARLO",
"url": "https://getmontecarlo.com/assets/MCON++6418a1e2-9718-4413-9d2b-6a354e01ddf8++a19e22b4-7659-4064-8fd4-8d6122fabe1c++table++db:metaphor.test3/custom-monitors"
},
"id": "DATASET~EC9202BF4193DCE73F8EF04D5CAEAF75",
"logicalId": {
"account": "snow",
"name": "db.metaphor.test3",
"platform": "SNOWFLAKE"
}
}
]
20 changes: 20 additions & 0 deletions tests/monte_carlo/test_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ async def test_extractor(mock_pycarlo_client: MagicMock, test_root_dir: str):
"warehouse": {"connection_type": "SNOWFLAKE"},
}
},
{
"node": {
"mcon": "MCON++6418a1e2-9718-4413-9d2b-6a354e01ddf8++a19e22b4-7659-4064-8fd4-8d6122fabe1c++table++db:metaphor.test3",
"warehouse": {"connection_type": "SNOWFLAKE"},
}
},
],
"page_info": {
"end_corsor": "cursor",
Expand Down Expand Up @@ -74,6 +80,20 @@ async def test_extractor(mock_pycarlo_client: MagicMock, test_root_dir: str):
"creatorId": "[email protected]",
"prevExecutionTime": "2023-06-23T03:54:35.817000+00:00",
},
{
"uuid": "2c156c8d-ab4a-432f-b8bb-f9ea9f31ed3d",
"name": "auto_monitor_name_18637195-a3c4-416e-a3e2-a89cc10adbc8",
"description": "Field Health for all fields in db:metaphor.test3",
"entities": ["db:metaphor.test3"],
"entityMcons": [
"MCON++6418a1e2-9718-4413-9d2b-6a354e01ddf8++a19e22b4-7659-4064-8fd4-8d6122fabe1c++table++db:metaphor.test3"
],
"severity": None,
"monitorStatus": "ERROR",
"monitorFields": None,
"creatorId": "[email protected]",
"prevExecutionTime": "2023-06-23T03:54:35.817000+00:00",
},
]
},
]
Expand Down

0 comments on commit c354d18

Please sign in to comment.