fabricks 3.0.18__py3-none-any.whl → 3.0.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.
- fabricks/context/_types.py +2 -0
- fabricks/core/jobs/gold.py +12 -1
- fabricks/core/udfs.py +2 -1
- fabricks/utils/path.py +10 -0
- {fabricks-3.0.18.dist-info → fabricks-3.0.19.dist-info}/METADATA +1 -1
- {fabricks-3.0.18.dist-info → fabricks-3.0.19.dist-info}/RECORD +7 -7
- {fabricks-3.0.18.dist-info → fabricks-3.0.19.dist-info}/WHEEL +0 -0
fabricks/context/_types.py
CHANGED
|
@@ -16,10 +16,12 @@ class RuntimeTimeoutOptions(TypedDict):
|
|
|
16
16
|
pre_run: int
|
|
17
17
|
post_run: int
|
|
18
18
|
|
|
19
|
+
|
|
19
20
|
class UDFOptions(TypedDict):
|
|
20
21
|
prefix: Optional[str]
|
|
21
22
|
schema: Optional[str]
|
|
22
23
|
|
|
24
|
+
|
|
23
25
|
class StepTimeoutOptions(TypedDict):
|
|
24
26
|
step: Optional[int]
|
|
25
27
|
job: Optional[int]
|
fabricks/core/jobs/gold.py
CHANGED
|
@@ -126,7 +126,18 @@ class Gold(BaseJob):
|
|
|
126
126
|
invokers = self.options.invokers.get_list("run")
|
|
127
127
|
assert len(invokers) <= 1, "at most one invoker allowed when notebook is true"
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
path = None
|
|
130
|
+
if invokers:
|
|
131
|
+
notebook = invokers[0].get("notebook")
|
|
132
|
+
if notebook:
|
|
133
|
+
from fabricks.context import PATH_RUNTIME
|
|
134
|
+
|
|
135
|
+
path = PATH_RUNTIME.joinpath(notebook)
|
|
136
|
+
|
|
137
|
+
if path is None:
|
|
138
|
+
path = self.paths.runtime
|
|
139
|
+
|
|
140
|
+
global_temp_view = self.invoke(path=path, schema_only=schema_only, **kwargs)
|
|
130
141
|
assert global_temp_view is not None, "global_temp_view not found"
|
|
131
142
|
|
|
132
143
|
df = self.spark.sql(f"select * from global_temp.{global_temp_view}")
|
fabricks/core/udfs.py
CHANGED
|
@@ -5,7 +5,7 @@ from typing import Callable, List, Optional
|
|
|
5
5
|
|
|
6
6
|
from pyspark.sql import SparkSession
|
|
7
7
|
|
|
8
|
-
from fabricks.context import CATALOG, IS_UNITY_CATALOG, PATH_UDFS, SPARK
|
|
8
|
+
from fabricks.context import CATALOG, CONF_RUNTIME, IS_UNITY_CATALOG, PATH_UDFS, SPARK
|
|
9
9
|
from fabricks.context.log import DEFAULT_LOGGER
|
|
10
10
|
|
|
11
11
|
UDFS: dict[str, Callable] = {}
|
|
@@ -13,6 +13,7 @@ UDFS: dict[str, Callable] = {}
|
|
|
13
13
|
udf_schema = CONF_RUNTIME.get("udf_options", {}).get("schema", "default")
|
|
14
14
|
udf_prefix = CONF_RUNTIME.get("udf_options", {}).get("prefix", "udf_")
|
|
15
15
|
|
|
16
|
+
|
|
16
17
|
def register_all_udfs(extension: Optional[str] = None, override: bool = False):
|
|
17
18
|
"""
|
|
18
19
|
Register all user-defined functions (UDFs).
|
fabricks/utils/path.py
CHANGED
|
@@ -246,3 +246,13 @@ class Path:
|
|
|
246
246
|
|
|
247
247
|
def __str__(self) -> str:
|
|
248
248
|
return self.string
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class GitPath(Path):
|
|
252
|
+
def __init__(self, path: Union[str, PathlibPath]):
|
|
253
|
+
super().__init__(path=path, assume_git=True)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
class FileSharePath(Path):
|
|
257
|
+
def __init__(self, path: Union[str, PathlibPath]):
|
|
258
|
+
super().__init__(path=path, assume_git=False)
|
|
@@ -68,7 +68,7 @@ fabricks/cdc/templates/queries/scd2.sql.jinja,sha256=Nn0wUs9N-_QviZqUKRWAFdD17RR
|
|
|
68
68
|
fabricks/cdc/templates/queries/nocdc/complete.sql.jinja,sha256=cVKKCSbiuuw1K7BOzfusX6KvzQNHU3YNUgoXgsu-c6k,267
|
|
69
69
|
fabricks/cdc/templates/queries/nocdc/update.sql.jinja,sha256=mjNUwGVhZ08yUkdv9sCTkqyW60p0YavtWTqvSUVrwjA,1283
|
|
70
70
|
fabricks/context/__init__.py,sha256=qfntJ9O6omzY_t6AhDP6Ndu9C5LMiVdWbo6ikhtoe7o,1446
|
|
71
|
-
fabricks/context/_types.py,sha256=
|
|
71
|
+
fabricks/context/_types.py,sha256=B3CvR_RR0wXCbBADh7Z9S8_7AXRRtvPCnFh7OyQJboI,2802
|
|
72
72
|
fabricks/context/config.py,sha256=EmLUnswuWfrncaNJMDjvdMg-1lD8aneKAY8IDna7VPE,4814
|
|
73
73
|
fabricks/context/helpers.py,sha256=igY8LwLIxzfOWKCg23XMsJoY7Bw0welpdNry2mKHjF0,1600
|
|
74
74
|
fabricks/context/log.py,sha256=CadrRf8iL6iXlGIGIhEIswa7wGqC-E-oLwWcGTyJ10s,2074
|
|
@@ -80,7 +80,7 @@ fabricks/core/__init__.py,sha256=LaqDi4xuyHAoLOvS44PQdZdRfq9SmVr7mB6BDHyxYpc,209
|
|
|
80
80
|
fabricks/core/extenders.py,sha256=oJzfv0hWxusnGmrjMwbrGyKfot8xzA4XtNquPWfFgPo,727
|
|
81
81
|
fabricks/core/job_schema.py,sha256=6-70oy0ZJd3V9AiXfc0Q8b8NVEynxQza_h7mB13uB-s,853
|
|
82
82
|
fabricks/core/masks.py,sha256=0ARgXE6stazRlfjE2v2sOdQWjAH2TbCOgtuD33BeZqE,1531
|
|
83
|
-
fabricks/core/udfs.py,sha256=
|
|
83
|
+
fabricks/core/udfs.py,sha256=nYG5MrTziDB3skZOCgpuxIOvLzs8I5vY8DC0Zdmkysk,3308
|
|
84
84
|
fabricks/core/views.py,sha256=52tekqeP0Xk5EPYO220YdfFbzItX6NnObROb-ye9COQ,1181
|
|
85
85
|
fabricks/core/dags/__init__.py,sha256=0DUKzVcXcROvxkN19P_kaOJ7da5BAM7Vt8EGQbp2KSY,240
|
|
86
86
|
fabricks/core/dags/base.py,sha256=tFj27SqeZUZ7pB_LOWkpdowZz5gj30JUANI4gWK3Pl8,3139
|
|
@@ -98,7 +98,7 @@ fabricks/core/jobs/get_job_id.py,sha256=6dLyzxGHlRvJZVJSwZkCk3iXzWkIhePC_6FhoP0g
|
|
|
98
98
|
fabricks/core/jobs/get_jobs.py,sha256=nJ-8DPFq1GyzWo9Mxlwq2dEeAqwg1jeQg-CHietAb1Q,3341
|
|
99
99
|
fabricks/core/jobs/get_schedule.py,sha256=46pJR5LWZfuxUtLBmtB-RP6ng_W-K-ahJmD29KNmcGw,259
|
|
100
100
|
fabricks/core/jobs/get_schedules.py,sha256=kryDUBrBrtAaMp8Ou5YqMOCOMKvg1GmbbOQBtiiRleM,794
|
|
101
|
-
fabricks/core/jobs/gold.py,sha256=
|
|
101
|
+
fabricks/core/jobs/gold.py,sha256=6YOhuMpCAuqfRtottikIemLQ-L62Av0ZXFcOb9uh4yE,14896
|
|
102
102
|
fabricks/core/jobs/silver.py,sha256=kdrCBfh1jkhWJUFubGUV4kxan5eRUZl-LI-iSJxyJE4,13093
|
|
103
103
|
fabricks/core/jobs/base/__init__.py,sha256=_AdWtyL7yZG2TOZ9e8WyNPrOjmm6EDkI_TNym5cLDws,208
|
|
104
104
|
fabricks/core/jobs/base/_types.py,sha256=y66BtJlJskq7wGzn7te5XYjO-NEqeQGUC11kkbew8AU,8405
|
|
@@ -155,7 +155,7 @@ fabricks/utils/fdict.py,sha256=cdnvNBSXKJIDKSdhQGJA4CGv0qLn5IVYKQ111l7nM9I,7978
|
|
|
155
155
|
fabricks/utils/helpers.py,sha256=fKv6mpT-428xTSjdLfm7TnN1Xo9FadrSIY1qzYgWCzs,7909
|
|
156
156
|
fabricks/utils/log.py,sha256=LCQEM81PhdojiyLrtEzv1QM__bWbaEhGddyd0IqyGXM,7985
|
|
157
157
|
fabricks/utils/mermaid.py,sha256=XoiVxPaUJS4TC_ybA-e78qFzQkQ46uPf055JiiNDdSg,986
|
|
158
|
-
fabricks/utils/path.py,sha256=
|
|
158
|
+
fabricks/utils/path.py,sha256=H2jU2ixJ57eAd7Aq3Upln1wT9rJzy7od7AwdEnNvCgo,7082
|
|
159
159
|
fabricks/utils/pip.py,sha256=UHo7NTjFGJNghWBuuDow28xUkZYg2YrlbAP49IxZyXY,1522
|
|
160
160
|
fabricks/utils/pydantic.py,sha256=W0fiDLVMFrrInfQw2s5YPeSEvkN-4k864u3UyPoHaz4,2516
|
|
161
161
|
fabricks/utils/spark.py,sha256=QWVpbGwOvURIVBlR7ygt6NQ9MHUsIDvlquJ65iI8UBI,2007
|
|
@@ -171,6 +171,6 @@ fabricks/utils/schema/get_schema_for_type.py,sha256=5k-R6zCgUAtapQgxT4turcx1IQ-b
|
|
|
171
171
|
fabricks/utils/write/__init__.py,sha256=i0UnZenXj9Aq0b0_aU3s6882vg-Vu_AyKfQhl_dTp-g,200
|
|
172
172
|
fabricks/utils/write/delta.py,sha256=lTQ0CfUhcvn3xTCcT_Ns6PMDBsO5UEfa2S9XpJiLJ9c,1250
|
|
173
173
|
fabricks/utils/write/stream.py,sha256=wQBpAnQtYA6nl79sPKhVM6u5m-66suX7B6VQ6tW4TOs,622
|
|
174
|
-
fabricks-3.0.
|
|
175
|
-
fabricks-3.0.
|
|
176
|
-
fabricks-3.0.
|
|
174
|
+
fabricks-3.0.19.dist-info/METADATA,sha256=LVAn4EIa8k57SNEaZvYu7kFJ5LsQ6M64MpfYap63VYY,798
|
|
175
|
+
fabricks-3.0.19.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
176
|
+
fabricks-3.0.19.dist-info/RECORD,,
|
|
File without changes
|