sqlh 0.3.2__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sqlh-0.3.2 → sqlh-0.3.4}/PKG-INFO +1 -1
- {sqlh-0.3.2 → sqlh-0.3.4}/pyproject.toml +1 -1
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/__init__.py +1 -1
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/core/graph.py +2 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/utils.py +2 -2
- {sqlh-0.3.2 → sqlh-0.3.4}/README.md +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/.DS_Store +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/cli.py +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/core/helper.py +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/core/keywords.py +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/static/dagre_template.html +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/static/mermaid_template.html +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/tests/test_cli.py +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/tests/test_graph.py +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/tests/test_import.py +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/tests/test_sqlhelper.py +0 -0
- {sqlh-0.3.2 → sqlh-0.3.4}/sqlh/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sqlh
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: A lightweight SQL lineage analysis library for tracking table dependencies in data pipelines
|
|
5
5
|
Keywords: sql,lineage,data-pipeline,dag,dependency,database,etl,data-engineering
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -351,6 +351,8 @@ class DagGraph:
|
|
|
351
351
|
mermaid_str = f"graph {direction}"
|
|
352
352
|
for _from, _to in self.__edges:
|
|
353
353
|
mermaid_str += f"\n {_from} --> {_to}"
|
|
354
|
+
# 去除花括号
|
|
355
|
+
mermaid_str = mermaid_str.replace("{", "").replace("}", "")
|
|
354
356
|
return mermaid_str
|
|
355
357
|
|
|
356
358
|
def to_dict(self) -> dict:
|
|
@@ -98,8 +98,8 @@ def __build_tables_and_graph(sql_stmt_str: str) -> Tuple[list, list, DagGraph]:
|
|
|
98
98
|
for sql_stmt in sql_stmt_lst:
|
|
99
99
|
table_info = get_source_target_tables(sql_stmt)
|
|
100
100
|
if table_info:
|
|
101
|
-
sources = [re.sub(r"`|\"", "", t) for t in table_info["source_tables"]]
|
|
102
|
-
targets = [re.sub(r"`|\"", "", t) for t in table_info["target_tables"]]
|
|
101
|
+
sources = [re.sub(r"`|\"|\{|\}", "", t) for t in table_info["source_tables"]]
|
|
102
|
+
targets = [re.sub(r"`|\"|\{|\}", "", t) for t in table_info["target_tables"]]
|
|
103
103
|
source_tables.update(sources)
|
|
104
104
|
target_tables.update(targets)
|
|
105
105
|
for src in sources:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|