cloe-nessy 0.3.13.5b0__py3-none-any.whl → 0.3.13.7b0__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.
- cloe_nessy/models/templates/create_table.sql.j2 +22 -0
- cloe_nessy/pipeline/actions/transform_join.py +38 -9
- cloe_nessy/pipeline/actions/transform_union.py +2 -2
- {cloe_nessy-0.3.13.5b0.dist-info → cloe_nessy-0.3.13.7b0.dist-info}/METADATA +2 -2
- {cloe_nessy-0.3.13.5b0.dist-info → cloe_nessy-0.3.13.7b0.dist-info}/RECORD +6 -6
- {cloe_nessy-0.3.13.5b0.dist-info → cloe_nessy-0.3.13.7b0.dist-info}/WHEEL +0 -0
|
@@ -13,6 +13,14 @@ USING delta
|
|
|
13
13
|
{% if table.storage_path %}
|
|
14
14
|
LOCATION '{{ table.storage_path }}'
|
|
15
15
|
{% endif %}
|
|
16
|
+
{% if table.properties %}
|
|
17
|
+
TBLPROPERTIES (
|
|
18
|
+
{%- for key, value in table.properties.items() %}
|
|
19
|
+
{%- if not loop.first %}, {% endif -%}
|
|
20
|
+
'{{key}}' = '{{value}}'
|
|
21
|
+
{%- endfor -%}
|
|
22
|
+
)
|
|
23
|
+
{% endif %}
|
|
16
24
|
{% if table.partition_by -%}
|
|
17
25
|
{%- if table.liquid_clustering -%} CLUSTER {%- else -%} PARTITIONED {%- endif %} BY (
|
|
18
26
|
{%- for column in table.partition_by -%}
|
|
@@ -34,3 +42,17 @@ ALTER TABLE {{ table.escaped_identifier }} ADD CONSTRAINT {{constraint.name}} CH
|
|
|
34
42
|
{%- if table.comment %}
|
|
35
43
|
COMMENT ON TABLE {{ table.escaped_identifier }} IS '{{ table.comment }}';
|
|
36
44
|
{%- endif %}
|
|
45
|
+
|
|
46
|
+
{%- if table.business_properties %}
|
|
47
|
+
{%- for tag_key, tag_value in table.business_properties.items() %}
|
|
48
|
+
SET TAG ON TABLE {{ table.escaped_identifier }} {{ tag_key }}{% if tag_value %}='{{ tag_value }}'{% endif %};
|
|
49
|
+
{%- endfor %}
|
|
50
|
+
{%- endif %}
|
|
51
|
+
|
|
52
|
+
{%- for column in table.columns %}
|
|
53
|
+
{%- if column.business_properties %}
|
|
54
|
+
{%- for tag_key, tag_value in column.business_properties.items() %}
|
|
55
|
+
SET TAG ON COLUMN {{ table.escaped_identifier }}.{{ column.name }} {{ tag_key }}{% if tag_value %}='{{ tag_value }}'{% endif %};
|
|
56
|
+
{%- endfor %}
|
|
57
|
+
{%- endif %}
|
|
58
|
+
{%- endfor %}
|
|
@@ -13,20 +13,49 @@ class TransformJoinAction(PipelineAction):
|
|
|
13
13
|
from [PySpark
|
|
14
14
|
documentation](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.DataFrame.join.html)
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
Examples:
|
|
17
|
+
=== "Simple Column Join"
|
|
18
|
+
```yaml
|
|
19
|
+
Join Tables:
|
|
20
|
+
action: TRANSFORM_JOIN
|
|
21
|
+
options:
|
|
22
|
+
joined_data: ((step:Transform First Table))
|
|
23
|
+
join_on: id
|
|
24
|
+
how: inner
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
=== "Multiple Columns Join"
|
|
28
|
+
```yaml
|
|
29
|
+
Join Tables:
|
|
30
|
+
action: TRANSFORM_JOIN
|
|
31
|
+
options:
|
|
32
|
+
joined_data: ((step:Transform First Table))
|
|
33
|
+
join_on: [customer_id, order_date]
|
|
34
|
+
how: left
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
=== "Dictionary Join (Different Column Names)"
|
|
38
|
+
```yaml
|
|
39
|
+
Join Tables:
|
|
40
|
+
action: TRANSFORM_JOIN
|
|
41
|
+
options:
|
|
42
|
+
joined_data: ((step:Transform First Table))
|
|
43
|
+
join_on:
|
|
44
|
+
customer_id: cust_id
|
|
45
|
+
order_date: date
|
|
46
|
+
how: inner
|
|
47
|
+
```
|
|
25
48
|
|
|
26
49
|
!!! note "Referencing a DataFrame from another step"
|
|
27
50
|
The `joined_data` parameter is a reference to the DataFrame from another step.
|
|
28
51
|
The DataFrame is accessed using the `result` attribute of the PipelineStep. The syntax
|
|
29
52
|
for referencing the DataFrame is `((step:Step Name))`, mind the double parentheses.
|
|
53
|
+
|
|
54
|
+
!!! tip "Dictionary Join Syntax"
|
|
55
|
+
When using a dictionary for `join_on`, the keys represent columns
|
|
56
|
+
from the DataFrame in context and the values represent columns from
|
|
57
|
+
the DataFrame in `joined_data` This is useful when joining tables
|
|
58
|
+
with different column names for the same logical entity.
|
|
30
59
|
"""
|
|
31
60
|
|
|
32
61
|
name: str = "TRANSFORM_JOIN"
|
|
@@ -22,8 +22,8 @@ class TransformUnionAction(PipelineAction):
|
|
|
22
22
|
action: TRANSFORM_UNION
|
|
23
23
|
options:
|
|
24
24
|
union_data:
|
|
25
|
-
- ((step:
|
|
26
|
-
- ((step:
|
|
25
|
+
- ((step:Filter First Table))
|
|
26
|
+
- ((step:SQL Transform Second Table))
|
|
27
27
|
```
|
|
28
28
|
!!! note "Referencing a DataFrame from another step"
|
|
29
29
|
The `union_data` parameter is a reference to the DataFrame from another step.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloe-nessy
|
|
3
|
-
Version: 0.3.13.
|
|
3
|
+
Version: 0.3.13.7b0
|
|
4
4
|
Summary: Your friendly datalake monster.
|
|
5
5
|
Project-URL: homepage, https://initions.com/
|
|
6
6
|
Author-email: initions <ICSMC_EXT_PYPIORG@accenture.com>
|
|
@@ -17,7 +17,7 @@ Requires-Dist: azure-identity<2.0.0,>=1.19.0
|
|
|
17
17
|
Requires-Dist: cloe-logging[databricks,log-analytics]<0.4,>=0.3.8
|
|
18
18
|
Requires-Dist: databricks-sdk<1.0.0,>=0.36.0
|
|
19
19
|
Requires-Dist: delta-spark>=3.3.2
|
|
20
|
-
Requires-Dist: fsspec<2025.
|
|
20
|
+
Requires-Dist: fsspec<2025.7.1,>=2025.7.0
|
|
21
21
|
Requires-Dist: httpx<1.0.0,>=0.27.2
|
|
22
22
|
Requires-Dist: jinja2<4.0.0,>=3.1.4
|
|
23
23
|
Requires-Dist: matplotlib<4.0.0,>=3.9.2
|
|
@@ -50,7 +50,7 @@ cloe_nessy/models/adapter/unity_catalog_adapter.py,sha256=a-14Ys-AevVYQd0xeJU1sy
|
|
|
50
50
|
cloe_nessy/models/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
51
|
cloe_nessy/models/mixins/read_instance_mixin.py,sha256=j5Y4aNWOh1jlskEaxNooZFJgPyxRmik00gAVLJnAaRs,4507
|
|
52
52
|
cloe_nessy/models/mixins/template_loader_mixin.py,sha256=5MXhEGBFlq3dwZvINEyBowSlipNnVun2H_TmhI_fsS4,549
|
|
53
|
-
cloe_nessy/models/templates/create_table.sql.j2,sha256=
|
|
53
|
+
cloe_nessy/models/templates/create_table.sql.j2,sha256=2KNa4CRAY6S8YAmS8uefwc9x-889Ae_TgRNn9xtMGqg,2429
|
|
54
54
|
cloe_nessy/models/templates/create_volume.sql.j2,sha256=XIUf1cHcvAxcGTyhzUiv4xpQ1cfDw_ra3_FKmOuLoBs,289
|
|
55
55
|
cloe_nessy/object_manager/__init__.py,sha256=3sle0vNpPwBOkycxA3XVS9m4XZf5LD3Qd4NGxdqcHno,186
|
|
56
56
|
cloe_nessy/object_manager/table_manager.py,sha256=suHx56TYXagaJ2dVkvTP7vwSI4xgTqXNkHYBbYh2pd4,13913
|
|
@@ -79,12 +79,12 @@ cloe_nessy/pipeline/actions/transform_filter.py,sha256=Nz_ggRfKIcNzYFfFOsgq1Qeat
|
|
|
79
79
|
cloe_nessy/pipeline/actions/transform_generic_sql.py,sha256=_naWfmPdYAUKjPNeHu5qJAohOL7DHCSYz_kwoeRv3OI,2741
|
|
80
80
|
cloe_nessy/pipeline/actions/transform_group_aggregate.py,sha256=KUHeeP-RIDi34dpbsPEJkzea5zFJA6MuyjNpOsFud9o,4045
|
|
81
81
|
cloe_nessy/pipeline/actions/transform_hash_columns.py,sha256=heRjBA-Gfu-nmNHOjTYlipEpKY8oNPAHAY40vjJk3aI,8383
|
|
82
|
-
cloe_nessy/pipeline/actions/transform_join.py,sha256=
|
|
82
|
+
cloe_nessy/pipeline/actions/transform_join.py,sha256=BjMn2h_Trq8l1n9R4QB55v1pAm0a9ft1vMLDBnHKG6g,4790
|
|
83
83
|
cloe_nessy/pipeline/actions/transform_json_normalize.py,sha256=petF7pnNq1EKc8MqVdG0weFALAHNILSe_eAu4Z5XxIo,4833
|
|
84
84
|
cloe_nessy/pipeline/actions/transform_rename_columns.py,sha256=4zJcPCONMU4C67qeuzsrX3AORRRHoq_selUI7FJyeg0,1952
|
|
85
85
|
cloe_nessy/pipeline/actions/transform_replace_values.py,sha256=1OPHTrjcphfyGepcO7ozYfeqfwA18pjlyHpVKUS_AAU,2049
|
|
86
86
|
cloe_nessy/pipeline/actions/transform_select_columns.py,sha256=-GhSEsb7iNnZIsYRm3BG9BX4_qUDJMbpj1DsKPY046w,4574
|
|
87
|
-
cloe_nessy/pipeline/actions/transform_union.py,sha256=
|
|
87
|
+
cloe_nessy/pipeline/actions/transform_union.py,sha256=SZtEzh567CIExUj9yMEgshE28h4dXKT7Wr2TDj4zB4k,2718
|
|
88
88
|
cloe_nessy/pipeline/actions/write_catalog_table.py,sha256=j7gRuG3Fedh8JgevIFBbHKock3laJVq4l6Mx3CGU5eo,2676
|
|
89
89
|
cloe_nessy/pipeline/actions/write_delta_append.py,sha256=fuL29SK9G5K14ycckU3iPexeK0XNXUfQscCwhXHxbKA,2498
|
|
90
90
|
cloe_nessy/pipeline/actions/write_delta_merge.py,sha256=gh3oD0ZGjDq0hw56NiRimK4HHCruDofqqdzFFgYLve8,5085
|
|
@@ -95,6 +95,6 @@ cloe_nessy/settings/__init__.py,sha256=ZbkneO3WaKOxon7qHFHnou7EnBOSnBFyKMDZblIEv
|
|
|
95
95
|
cloe_nessy/settings/settings.py,sha256=I4n129lrujriW-d8q4as2Kb4_kI932ModfZ5Ow_UpVM,3653
|
|
96
96
|
cloe_nessy/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
97
|
cloe_nessy/utils/file_and_directory_handler.py,sha256=r2EVt9xG81p6ScaJCwETC5an6pMT6WseB0jMOR-JlpU,602
|
|
98
|
-
cloe_nessy-0.3.13.
|
|
99
|
-
cloe_nessy-0.3.13.
|
|
100
|
-
cloe_nessy-0.3.13.
|
|
98
|
+
cloe_nessy-0.3.13.7b0.dist-info/METADATA,sha256=7KSpeLEZC_0uhqs_KNzRQkZLx9J0moYrlfpq-wBOuHw,3328
|
|
99
|
+
cloe_nessy-0.3.13.7b0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
100
|
+
cloe_nessy-0.3.13.7b0.dist-info/RECORD,,
|
|
File without changes
|