From 7a2601b7eaf78c971491eb9c2c542c9ea8893ab4 Mon Sep 17 00:00:00 2001 From: Tsung-Ju Lii Date: Mon, 9 Sep 2024 14:29:32 +0800 Subject: [PATCH 1/2] [sc-28620] Catch RecursionError in TLL parsing --- .../common/sql/table_level_lineage/table_level_lineage.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/metaphor/common/sql/table_level_lineage/table_level_lineage.py b/metaphor/common/sql/table_level_lineage/table_level_lineage.py index b4c9f07d..874d551d 100644 --- a/metaphor/common/sql/table_level_lineage/table_level_lineage.py +++ b/metaphor/common/sql/table_level_lineage/table_level_lineage.py @@ -150,6 +150,11 @@ def extract_table_level_lineage( if not _is_truncated_insert_into_with_values(sql): logger.warning(f"Cannot parse sql with SQLGlot, query_id = {query_id}") return Result() + except RecursionError: + logger.warning( + f"Cannot parse sql with SQLGlot (max recursion level exceeded), query_id = {query_id}" + ) + return Result() try: return Result( From e62632e91bb6f6415a3af60e451702a418f7d999 Mon Sep 17 00:00:00 2001 From: Tsung-Ju Lii Date: Mon, 9 Sep 2024 14:31:59 +0800 Subject: [PATCH 2/2] bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a0bf9af..61c0763b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "metaphor-connectors" -version = "0.14.102" +version = "0.14.103" 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 "]