sql-glider 0.1.8__py3-none-any.whl → 0.1.9__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.8.dist-info → sql_glider-0.1.9.dist-info}/METADATA +1 -1
- {sql_glider-0.1.8.dist-info → sql_glider-0.1.9.dist-info}/RECORD +7 -7
- sqlglider/_version.py +2 -2
- sqlglider/lineage/analyzer.py +22 -0
- {sql_glider-0.1.8.dist-info → sql_glider-0.1.9.dist-info}/WHEEL +0 -0
- {sql_glider-0.1.8.dist-info → sql_glider-0.1.9.dist-info}/entry_points.txt +0 -0
- {sql_glider-0.1.8.dist-info → sql_glider-0.1.9.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.9
|
|
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=ib8ckvf-NNDfacXd8unW0p5cf-gl57XyQvjoEMc_pvc,704
|
|
3
3
|
sqlglider/cli.py,sha256=9sweHRVLk2iBSzCzT2Gcj8y1g1XKzq26iApQsMaFbx4,51786
|
|
4
4
|
sqlglider/global_models.py,sha256=2vyJXAuXOsXQpE-D3F0ejj7eR9z0nDWFjTkielhzM8k,356
|
|
5
5
|
sqlglider/catalog/__init__.py,sha256=2PqFPyzFXJ14FpSUcBmVK2L-a_ypWQHAbHFHxLDk_LE,814
|
|
@@ -17,7 +17,7 @@ sqlglider/graph/models.py,sha256=EYmjv_WzDSNp_WfhJ6H-qBIOkAcoNKS7GRUryfKrHuY,933
|
|
|
17
17
|
sqlglider/graph/query.py,sha256=LHU8Cvn7ZPPSEnqdDn2pF8f1_LQjIvNIrZqs8cFlb6U,9433
|
|
18
18
|
sqlglider/graph/serialization.py,sha256=vMXn7s35jA499e7l90vNVaJE_3QR_VHf3rEfQ9ZlgTQ,2781
|
|
19
19
|
sqlglider/lineage/__init__.py,sha256=llXMeI5_PIZaiBo8tKk3-wOubF4m_6QBHbn1FtWxT7k,256
|
|
20
|
-
sqlglider/lineage/analyzer.py,sha256=
|
|
20
|
+
sqlglider/lineage/analyzer.py,sha256=4VoJAsNRpz8T4sifF9VW4_SkSSU-8GtcBdDORCfPV_0,65581
|
|
21
21
|
sqlglider/lineage/formatters.py,sha256=_Y9wcTX4JXn1vVnZ1xI656g1FF2rMjcAVc-GHjbd9QA,10389
|
|
22
22
|
sqlglider/templating/__init__.py,sha256=g3_wb6rSDI0usq2UUMDpn-J5kVwlAw3NtLdwbxL6UHs,1435
|
|
23
23
|
sqlglider/templating/base.py,sha256=y5bWAW7qXl_4pPyo5KycfHwNVvt1-7slZ63DAsvTE1s,2902
|
|
@@ -27,8 +27,8 @@ sqlglider/templating/variables.py,sha256=5593PtLBcOxsnMCSRm2pGAD5I0Y9f__VV3_J_Hf
|
|
|
27
27
|
sqlglider/utils/__init__.py,sha256=KGp9-UzKz_OFBOTFoSy-g-NXDZsvyWXG_9-1zcC6ePE,276
|
|
28
28
|
sqlglider/utils/config.py,sha256=iNJgSXFw3pmL2MCdvW3SJp4X2T3AQP2QyQuXIXT-6H0,4761
|
|
29
29
|
sqlglider/utils/file_utils.py,sha256=5_ff28E0r1R7emZzsOnRuHd-7zIX6873eyr1SuPEr4E,1093
|
|
30
|
-
sql_glider-0.1.
|
|
31
|
-
sql_glider-0.1.
|
|
32
|
-
sql_glider-0.1.
|
|
33
|
-
sql_glider-0.1.
|
|
34
|
-
sql_glider-0.1.
|
|
30
|
+
sql_glider-0.1.9.dist-info/METADATA,sha256=LOSe-vTRzfkFsnas1cHSFgnRJZL3bO34ujqLcUWMN1Q,28445
|
|
31
|
+
sql_glider-0.1.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
32
|
+
sql_glider-0.1.9.dist-info/entry_points.txt,sha256=HDuakHqHS5C0HFKsMIxMYmDU7-BLBGrnIJcYaVRu-s0,251
|
|
33
|
+
sql_glider-0.1.9.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
34
|
+
sql_glider-0.1.9.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.9'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 9)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
sqlglider/lineage/analyzer.py
CHANGED
|
@@ -615,6 +615,12 @@ class LineageAnalyzer:
|
|
|
615
615
|
if isinstance(target, exp.Table):
|
|
616
616
|
return (self._get_qualified_table_name(target), ObjectType.UNKNOWN)
|
|
617
617
|
|
|
618
|
+
# CACHE TABLE
|
|
619
|
+
elif isinstance(self.expr, exp.Cache):
|
|
620
|
+
target = self.expr.this
|
|
621
|
+
if isinstance(target, exp.Table):
|
|
622
|
+
return (self._get_qualified_table_name(target), ObjectType.TABLE)
|
|
623
|
+
|
|
618
624
|
# DELETE FROM table
|
|
619
625
|
elif isinstance(self.expr, exp.Delete):
|
|
620
626
|
target = self.expr.this
|
|
@@ -706,6 +712,10 @@ class LineageAnalyzer:
|
|
|
706
712
|
elif isinstance(self.expr, exp.Drop):
|
|
707
713
|
return table_node is self.expr.this
|
|
708
714
|
|
|
715
|
+
# For CACHE TABLE, the target is self.expr.this
|
|
716
|
+
elif isinstance(self.expr, exp.Cache):
|
|
717
|
+
return table_node is self.expr.this
|
|
718
|
+
|
|
709
719
|
return False
|
|
710
720
|
|
|
711
721
|
def _analyze_column_lineage_internal(
|
|
@@ -889,6 +899,7 @@ class LineageAnalyzer:
|
|
|
889
899
|
"Drop": f"DROP {getattr(target_expr, 'kind', '')}".strip(),
|
|
890
900
|
"Alter": "ALTER",
|
|
891
901
|
"Truncate": "TRUNCATE",
|
|
902
|
+
"Cache": "CACHE TABLE",
|
|
892
903
|
"Command": "COMMAND",
|
|
893
904
|
}
|
|
894
905
|
|
|
@@ -943,6 +954,17 @@ class LineageAnalyzer:
|
|
|
943
954
|
):
|
|
944
955
|
return (target_name, select_node)
|
|
945
956
|
|
|
957
|
+
# Check for CACHE TABLE AS SELECT
|
|
958
|
+
elif isinstance(self.expr, exp.Cache):
|
|
959
|
+
target = self.expr.this
|
|
960
|
+
if isinstance(target, exp.Table):
|
|
961
|
+
target_name = self._get_qualified_table_name(target)
|
|
962
|
+
select_node = self.expr.expression
|
|
963
|
+
if isinstance(
|
|
964
|
+
select_node, (exp.Select, exp.Union, exp.Intersect, exp.Except)
|
|
965
|
+
):
|
|
966
|
+
return (target_name, select_node)
|
|
967
|
+
|
|
946
968
|
# Check for MERGE statement
|
|
947
969
|
elif isinstance(self.expr, exp.Merge):
|
|
948
970
|
target = self.expr.this
|
|
File without changes
|
|
File without changes
|
|
File without changes
|