From d16abb234cc86104acbd8227511ec72581522647 Mon Sep 17 00:00:00 2001 From: Joel Snipes Date: Thu, 18 May 2023 11:26:56 -0400 Subject: [PATCH 1/2] filtering fieldquality monitors from export as work around until Pycarlo supports them fully --- monitors/bulk_export_monitors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitors/bulk_export_monitors.py b/monitors/bulk_export_monitors.py index 91eb64f..ad5c12d 100644 --- a/monitors/bulk_export_monitors.py +++ b/monitors/bulk_export_monitors.py @@ -12,7 +12,7 @@ def get_monitors_query(limit: Optional[int] = 1000) -> Query: query = Query() - get_monitors = query.get_monitors(limit=limit,namespaces=["ui"]) + get_monitors = query.get_monitors(limit=limit,namespaces=["ui"],monitor_types=["CUSTOM_SQL", "STATS", "CATEGORIES", "FRESHNESS", "VOLUME", "JSON_SCHEMA" ]) get_monitors.__fields__("uuid","monitor_type","resource_id") return query From 3e07bd594dbf0c2b2f2a563aea16c8006b4e7997 Mon Sep 17 00:00:00 2001 From: Joel Snipes Date: Thu, 18 May 2023 13:20:24 -0400 Subject: [PATCH 2/2] adding TABLE_METRIC --- monitors/bulk_export_monitors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitors/bulk_export_monitors.py b/monitors/bulk_export_monitors.py index ad5c12d..1d25e1b 100644 --- a/monitors/bulk_export_monitors.py +++ b/monitors/bulk_export_monitors.py @@ -10,9 +10,10 @@ from yaml.loader import SafeLoader import textwrap +#Temporarily removing FIELD_QUALITY from monitor_types until it is supported in the PyCarlo SDKs def get_monitors_query(limit: Optional[int] = 1000) -> Query: query = Query() - get_monitors = query.get_monitors(limit=limit,namespaces=["ui"],monitor_types=["CUSTOM_SQL", "STATS", "CATEGORIES", "FRESHNESS", "VOLUME", "JSON_SCHEMA" ]) + get_monitors = query.get_monitors(limit=limit,namespaces=["ui"],monitor_types=["CUSTOM_SQL", "STATS", "CATEGORIES", "FRESHNESS", "VOLUME", "JSON_SCHEMA", "TABLE_METRIC" ]) get_monitors.__fields__("uuid","monitor_type","resource_id") return query