sql-glider 0.1.18__py3-none-any.whl → 0.1.19__py3-none-any.whl
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.
- {sql_glider-0.1.18.dist-info → sql_glider-0.1.19.dist-info}/METADATA +1 -1
- {sql_glider-0.1.18.dist-info → sql_glider-0.1.19.dist-info}/RECORD +7 -7
- sqlglider/_version.py +2 -2
- sqlglider/lineage/analyzer.py +29 -19
- {sql_glider-0.1.18.dist-info → sql_glider-0.1.19.dist-info}/WHEEL +0 -0
- {sql_glider-0.1.18.dist-info → sql_glider-0.1.19.dist-info}/entry_points.txt +0 -0
- {sql_glider-0.1.18.dist-info → sql_glider-0.1.19.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sql-glider
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.19
|
|
4
4
|
Summary: SQL Utility Toolkit for better understanding, use, and governance of your queries in a native environment.
|
|
5
5
|
Project-URL: Homepage, https://github.com/rycowhi/sql-glider/
|
|
6
6
|
Project-URL: Repository, https://github.com/rycowhi/sql-glider/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlglider/__init__.py,sha256=gDf7s52dMcX7JuCZ1SLawcB1vb3U0yJCohu9RQAATBY,125
|
|
2
|
-
sqlglider/_version.py,sha256=
|
|
2
|
+
sqlglider/_version.py,sha256=fjpHGGz4Pr5zOvmurEGTqs99z8OU4DpgAvX1DM3jqc4,706
|
|
3
3
|
sqlglider/cli.py,sha256=9zNMaw3rgcqb6uG05VJTYbLUXmZzdX87gAOJ4Zg3xjY,65319
|
|
4
4
|
sqlglider/global_models.py,sha256=2vyJXAuXOsXQpE-D3F0ejj7eR9z0nDWFjTkielhzM8k,356
|
|
5
5
|
sqlglider/catalog/__init__.py,sha256=2PqFPyzFXJ14FpSUcBmVK2L-a_ypWQHAbHFHxLDk_LE,814
|
|
@@ -18,7 +18,7 @@ sqlglider/graph/models.py,sha256=EYmjv_WzDSNp_WfhJ6H-qBIOkAcoNKS7GRUryfKrHuY,933
|
|
|
18
18
|
sqlglider/graph/query.py,sha256=LHU8Cvn7ZPPSEnqdDn2pF8f1_LQjIvNIrZqs8cFlb6U,9433
|
|
19
19
|
sqlglider/graph/serialization.py,sha256=vMXn7s35jA499e7l90vNVaJE_3QR_VHf3rEfQ9ZlgTQ,2781
|
|
20
20
|
sqlglider/lineage/__init__.py,sha256=llXMeI5_PIZaiBo8tKk3-wOubF4m_6QBHbn1FtWxT7k,256
|
|
21
|
-
sqlglider/lineage/analyzer.py,sha256=
|
|
21
|
+
sqlglider/lineage/analyzer.py,sha256=XrYUO0zHDsE3n3KVS09VU0zWigwuqeL1_r7lI23uhRY,78457
|
|
22
22
|
sqlglider/lineage/formatters.py,sha256=_Y9wcTX4JXn1vVnZ1xI656g1FF2rMjcAVc-GHjbd9QA,10389
|
|
23
23
|
sqlglider/schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
sqlglider/schema/extractor.py,sha256=P7sVCmBACQ55D8wHS7munbTg0dvJ3-NnUzXf9ZgCAOA,7574
|
|
@@ -31,8 +31,8 @@ sqlglider/utils/__init__.py,sha256=KGp9-UzKz_OFBOTFoSy-g-NXDZsvyWXG_9-1zcC6ePE,2
|
|
|
31
31
|
sqlglider/utils/config.py,sha256=qx5zE9pjLCCzHQDFVPLVd7LgJ-lghxUa2x-aZOAHByY,4962
|
|
32
32
|
sqlglider/utils/file_utils.py,sha256=5_ff28E0r1R7emZzsOnRuHd-7zIX6873eyr1SuPEr4E,1093
|
|
33
33
|
sqlglider/utils/schema.py,sha256=LiWrYDunXKJdoSlpKmIaIQ2hLSaIN1iQHqkXjMpGzRE,1883
|
|
34
|
-
sql_glider-0.1.
|
|
35
|
-
sql_glider-0.1.
|
|
36
|
-
sql_glider-0.1.
|
|
37
|
-
sql_glider-0.1.
|
|
38
|
-
sql_glider-0.1.
|
|
34
|
+
sql_glider-0.1.19.dist-info/METADATA,sha256=7L9l2lne7VWfKFeKPhwuM-YHd4O3Y3xJ3z59H0NYbZc,28446
|
|
35
|
+
sql_glider-0.1.19.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
36
|
+
sql_glider-0.1.19.dist-info/entry_points.txt,sha256=HDuakHqHS5C0HFKsMIxMYmDU7-BLBGrnIJcYaVRu-s0,251
|
|
37
|
+
sql_glider-0.1.19.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
38
|
+
sql_glider-0.1.19.dist-info/RECORD,,
|
sqlglider/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
31
|
+
__version__ = version = '0.1.19'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 19)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
sqlglider/lineage/analyzer.py
CHANGED
|
@@ -1480,7 +1480,7 @@ class LineageAnalyzer:
|
|
|
1480
1480
|
|
|
1481
1481
|
def _extract_schema_from_statement(self, expr: exp.Expression) -> None:
|
|
1482
1482
|
"""
|
|
1483
|
-
Extract column definitions from CREATE VIEW/TABLE AS SELECT statements.
|
|
1483
|
+
Extract column definitions from CREATE VIEW/TABLE AS SELECT and CACHE TABLE statements.
|
|
1484
1484
|
|
|
1485
1485
|
This method builds up file-scoped schema context as statements are processed,
|
|
1486
1486
|
enabling SQLGlot to correctly expand SELECT * and trace cross-statement references.
|
|
@@ -1488,29 +1488,39 @@ class LineageAnalyzer:
|
|
|
1488
1488
|
Args:
|
|
1489
1489
|
expr: The SQL expression to extract schema from
|
|
1490
1490
|
"""
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
return
|
|
1494
|
-
if expr.kind not in ("VIEW", "TABLE"):
|
|
1495
|
-
return
|
|
1491
|
+
target_name: str | None = None
|
|
1492
|
+
select_node: exp.Expression | None = None
|
|
1496
1493
|
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1494
|
+
if isinstance(expr, exp.Create):
|
|
1495
|
+
if expr.kind not in ("VIEW", "TABLE"):
|
|
1496
|
+
return
|
|
1497
|
+
|
|
1498
|
+
target = expr.this
|
|
1499
|
+
if isinstance(target, exp.Schema):
|
|
1500
|
+
target = target.this
|
|
1501
|
+
if not isinstance(target, exp.Table):
|
|
1502
|
+
return
|
|
1503
1503
|
|
|
1504
|
-
|
|
1504
|
+
target_name = self._get_qualified_table_name(target)
|
|
1505
|
+
select_node = expr.expression
|
|
1505
1506
|
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1507
|
+
# Handle Subquery wrapper (e.g., CREATE VIEW AS (SELECT ...))
|
|
1508
|
+
if isinstance(select_node, exp.Subquery):
|
|
1509
|
+
select_node = select_node.this
|
|
1510
|
+
|
|
1511
|
+
elif isinstance(expr, exp.Cache):
|
|
1512
|
+
target = expr.this
|
|
1513
|
+
if not isinstance(target, exp.Table):
|
|
1514
|
+
return
|
|
1515
|
+
|
|
1516
|
+
target_name = self._get_qualified_table_name(target)
|
|
1517
|
+
select_node = expr.expression
|
|
1518
|
+
|
|
1519
|
+
else:
|
|
1509
1520
|
return
|
|
1510
1521
|
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
select_node = select_node.this
|
|
1522
|
+
if target_name is None or select_node is None:
|
|
1523
|
+
return
|
|
1514
1524
|
|
|
1515
1525
|
if not isinstance(
|
|
1516
1526
|
select_node, (exp.Select, exp.Union, exp.Intersect, exp.Except)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|