etlplus 0.5.4__py3-none-any.whl → 0.5.5__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.
- etlplus/cli/app.py +16 -16
- etlplus/cli/handlers.py +19 -20
- etlplus/cli/main.py +16 -16
- etlplus/run.py +2 -4
- {etlplus-0.5.4.dist-info → etlplus-0.5.5.dist-info}/METADATA +1 -1
- {etlplus-0.5.4.dist-info → etlplus-0.5.5.dist-info}/RECORD +10 -10
- {etlplus-0.5.4.dist-info → etlplus-0.5.5.dist-info}/WHEEL +0 -0
- {etlplus-0.5.4.dist-info → etlplus-0.5.5.dist-info}/entry_points.txt +0 -0
- {etlplus-0.5.4.dist-info → etlplus-0.5.5.dist-info}/licenses/LICENSE +0 -0
- {etlplus-0.5.4.dist-info → etlplus-0.5.5.dist-info}/top_level.txt +0 -0
etlplus/cli/app.py
CHANGED
|
@@ -57,14 +57,14 @@ from .. import __version__
|
|
|
57
57
|
from ..enums import DataConnectorType
|
|
58
58
|
from ..enums import FileFormat
|
|
59
59
|
from ..utils import json_type
|
|
60
|
-
from .handlers import
|
|
61
|
-
from .handlers import
|
|
62
|
-
from .handlers import
|
|
63
|
-
from .handlers import
|
|
64
|
-
from .handlers import
|
|
65
|
-
from .handlers import
|
|
66
|
-
from .handlers import
|
|
67
|
-
from .handlers import
|
|
60
|
+
from .handlers import check_handler
|
|
61
|
+
from .handlers import extract_handler
|
|
62
|
+
from .handlers import load_handler
|
|
63
|
+
from .handlers import pipeline_handler
|
|
64
|
+
from .handlers import render_handler
|
|
65
|
+
from .handlers import run_handler
|
|
66
|
+
from .handlers import transform_handler
|
|
67
|
+
from .handlers import validate_handler
|
|
68
68
|
|
|
69
69
|
# SECTION: EXPORTS ========================================================== #
|
|
70
70
|
|
|
@@ -819,7 +819,7 @@ def check_cmd(
|
|
|
819
819
|
targets=targets,
|
|
820
820
|
transforms=transforms,
|
|
821
821
|
)
|
|
822
|
-
return int(
|
|
822
|
+
return int(check_handler(ns))
|
|
823
823
|
|
|
824
824
|
|
|
825
825
|
@app.command('extract')
|
|
@@ -905,7 +905,7 @@ def extract_cmd(
|
|
|
905
905
|
source=resolved_source,
|
|
906
906
|
**format_kwargs,
|
|
907
907
|
)
|
|
908
|
-
return int(
|
|
908
|
+
return int(extract_handler(ns))
|
|
909
909
|
|
|
910
910
|
|
|
911
911
|
@app.command('load')
|
|
@@ -1007,7 +1007,7 @@ def load_cmd(
|
|
|
1007
1007
|
target=resolved_target,
|
|
1008
1008
|
**format_kwargs,
|
|
1009
1009
|
)
|
|
1010
|
-
return int(
|
|
1010
|
+
return int(load_handler(ns))
|
|
1011
1011
|
|
|
1012
1012
|
|
|
1013
1013
|
@app.command('pipeline')
|
|
@@ -1061,7 +1061,7 @@ def pipeline_cmd(
|
|
|
1061
1061
|
list=jobs,
|
|
1062
1062
|
run=run_target,
|
|
1063
1063
|
)
|
|
1064
|
-
return int(
|
|
1064
|
+
return int(pipeline_handler(ns))
|
|
1065
1065
|
|
|
1066
1066
|
|
|
1067
1067
|
@app.command('render')
|
|
@@ -1110,7 +1110,7 @@ def render_cmd(
|
|
|
1110
1110
|
template_path=template_path,
|
|
1111
1111
|
output=output,
|
|
1112
1112
|
)
|
|
1113
|
-
return int(
|
|
1113
|
+
return int(render_handler(ns))
|
|
1114
1114
|
|
|
1115
1115
|
|
|
1116
1116
|
@app.command('run')
|
|
@@ -1157,7 +1157,7 @@ def run_cmd(
|
|
|
1157
1157
|
job=job,
|
|
1158
1158
|
pipeline=pipeline,
|
|
1159
1159
|
)
|
|
1160
|
-
return int(
|
|
1160
|
+
return int(run_handler(ns))
|
|
1161
1161
|
|
|
1162
1162
|
|
|
1163
1163
|
@app.command('transform')
|
|
@@ -1294,7 +1294,7 @@ def transform_cmd(
|
|
|
1294
1294
|
target_format=target_format_kwargs['format'],
|
|
1295
1295
|
**target_format_kwargs,
|
|
1296
1296
|
)
|
|
1297
|
-
return int(
|
|
1297
|
+
return int(transform_handler(ns))
|
|
1298
1298
|
|
|
1299
1299
|
|
|
1300
1300
|
@app.command('validate')
|
|
@@ -1364,4 +1364,4 @@ def validate_cmd(
|
|
|
1364
1364
|
source_format=source_format,
|
|
1365
1365
|
**source_format_kwargs,
|
|
1366
1366
|
)
|
|
1367
|
-
return int(
|
|
1367
|
+
return int(validate_handler(ns))
|
etlplus/cli/handlers.py
CHANGED
|
@@ -36,14 +36,14 @@ from ..validate import validate
|
|
|
36
36
|
|
|
37
37
|
__all__ = [
|
|
38
38
|
# Functions
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
39
|
+
'extract_handler',
|
|
40
|
+
'check_handler',
|
|
41
|
+
'load_handler',
|
|
42
|
+
'pipeline_handler',
|
|
43
|
+
'render_handler',
|
|
44
|
+
'run_handler',
|
|
45
|
+
'transform_handler',
|
|
46
|
+
'validate_handler',
|
|
47
47
|
]
|
|
48
48
|
|
|
49
49
|
|
|
@@ -423,7 +423,7 @@ def _write_json_output(
|
|
|
423
423
|
# SECTION: FUNCTIONS ======================================================== #
|
|
424
424
|
|
|
425
425
|
|
|
426
|
-
def
|
|
426
|
+
def check_handler(
|
|
427
427
|
args: argparse.Namespace,
|
|
428
428
|
) -> int:
|
|
429
429
|
"""
|
|
@@ -448,7 +448,7 @@ def cmd_check(
|
|
|
448
448
|
return 0
|
|
449
449
|
|
|
450
450
|
|
|
451
|
-
def
|
|
451
|
+
def extract_handler(
|
|
452
452
|
args: argparse.Namespace,
|
|
453
453
|
) -> int:
|
|
454
454
|
"""
|
|
@@ -493,7 +493,7 @@ def cmd_extract(
|
|
|
493
493
|
return 0
|
|
494
494
|
|
|
495
495
|
|
|
496
|
-
def
|
|
496
|
+
def load_handler(
|
|
497
497
|
args: argparse.Namespace,
|
|
498
498
|
) -> int:
|
|
499
499
|
"""
|
|
@@ -552,7 +552,7 @@ def cmd_load(
|
|
|
552
552
|
return 0
|
|
553
553
|
|
|
554
554
|
|
|
555
|
-
def
|
|
555
|
+
def pipeline_handler(
|
|
556
556
|
args: argparse.Namespace,
|
|
557
557
|
) -> int:
|
|
558
558
|
"""
|
|
@@ -596,12 +596,11 @@ def cmd_pipeline(
|
|
|
596
596
|
return 0
|
|
597
597
|
|
|
598
598
|
|
|
599
|
-
def
|
|
599
|
+
def render_handler(
|
|
600
600
|
args: argparse.Namespace,
|
|
601
601
|
) -> int:
|
|
602
602
|
"""Render SQL DDL statements from table schema specs."""
|
|
603
|
-
|
|
604
|
-
_pretty, quiet = _presentation_flags(args)
|
|
603
|
+
_, quiet = _presentation_flags(args)
|
|
605
604
|
|
|
606
605
|
template_value = getattr(args, 'template', 'ddl') or 'ddl'
|
|
607
606
|
template_path = getattr(args, 'template_path', None)
|
|
@@ -657,7 +656,7 @@ def cmd_render(
|
|
|
657
656
|
return 0
|
|
658
657
|
|
|
659
658
|
|
|
660
|
-
def
|
|
659
|
+
def run_handler(
|
|
661
660
|
args: argparse.Namespace,
|
|
662
661
|
) -> int:
|
|
663
662
|
"""
|
|
@@ -685,7 +684,7 @@ def cmd_run(
|
|
|
685
684
|
return 0
|
|
686
685
|
|
|
687
686
|
|
|
688
|
-
def
|
|
687
|
+
def transform_handler(
|
|
689
688
|
args: argparse.Namespace,
|
|
690
689
|
) -> int:
|
|
691
690
|
"""
|
|
@@ -701,7 +700,7 @@ def cmd_transform(
|
|
|
701
700
|
int
|
|
702
701
|
Zero on success.
|
|
703
702
|
"""
|
|
704
|
-
pretty,
|
|
703
|
+
pretty, _ = _presentation_flags(args)
|
|
705
704
|
format_hint: str | None = getattr(args, 'source_format', None)
|
|
706
705
|
format_explicit: bool = format_hint is not None
|
|
707
706
|
|
|
@@ -726,7 +725,7 @@ def cmd_transform(
|
|
|
726
725
|
return 0
|
|
727
726
|
|
|
728
727
|
|
|
729
|
-
def
|
|
728
|
+
def validate_handler(
|
|
730
729
|
args: argparse.Namespace,
|
|
731
730
|
) -> int:
|
|
732
731
|
"""
|
|
@@ -742,7 +741,7 @@ def cmd_validate(
|
|
|
742
741
|
int
|
|
743
742
|
Zero on success.
|
|
744
743
|
"""
|
|
745
|
-
pretty,
|
|
744
|
+
pretty, _ = _presentation_flags(args)
|
|
746
745
|
format_explicit: bool = getattr(args, '_format_explicit', False)
|
|
747
746
|
format_hint: str | None = getattr(args, 'source_format', None)
|
|
748
747
|
payload = cast(
|
etlplus/cli/main.py
CHANGED
|
@@ -24,14 +24,14 @@ from ..enums import FileFormat
|
|
|
24
24
|
from ..utils import json_type
|
|
25
25
|
from .app import PROJECT_URL
|
|
26
26
|
from .app import app
|
|
27
|
-
from .handlers import
|
|
28
|
-
from .handlers import
|
|
29
|
-
from .handlers import
|
|
30
|
-
from .handlers import
|
|
31
|
-
from .handlers import
|
|
32
|
-
from .handlers import
|
|
33
|
-
from .handlers import
|
|
34
|
-
from .handlers import
|
|
27
|
+
from .handlers import check_handler
|
|
28
|
+
from .handlers import extract_handler
|
|
29
|
+
from .handlers import load_handler
|
|
30
|
+
from .handlers import pipeline_handler
|
|
31
|
+
from .handlers import render_handler
|
|
32
|
+
from .handlers import run_handler
|
|
33
|
+
from .handlers import transform_handler
|
|
34
|
+
from .handlers import validate_handler
|
|
35
35
|
|
|
36
36
|
# SECTION: EXPORTS ========================================================== #
|
|
37
37
|
|
|
@@ -329,7 +329,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
329
329
|
),
|
|
330
330
|
)
|
|
331
331
|
_add_format_options(extract_parser, context='source')
|
|
332
|
-
extract_parser.set_defaults(func=
|
|
332
|
+
extract_parser.set_defaults(func=extract_handler)
|
|
333
333
|
|
|
334
334
|
validate_parser = subparsers.add_parser(
|
|
335
335
|
'validate',
|
|
@@ -346,7 +346,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
346
346
|
default={},
|
|
347
347
|
help='Validation rules as JSON string',
|
|
348
348
|
)
|
|
349
|
-
validate_parser.set_defaults(func=
|
|
349
|
+
validate_parser.set_defaults(func=validate_handler)
|
|
350
350
|
|
|
351
351
|
transform_parser = subparsers.add_parser(
|
|
352
352
|
'transform',
|
|
@@ -394,7 +394,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
394
394
|
'File targets infer format from the extension.'
|
|
395
395
|
),
|
|
396
396
|
)
|
|
397
|
-
transform_parser.set_defaults(func=
|
|
397
|
+
transform_parser.set_defaults(func=transform_handler)
|
|
398
398
|
|
|
399
399
|
load_parser = subparsers.add_parser(
|
|
400
400
|
'load',
|
|
@@ -418,7 +418,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
418
418
|
),
|
|
419
419
|
)
|
|
420
420
|
_add_format_options(load_parser, context='target')
|
|
421
|
-
load_parser.set_defaults(func=
|
|
421
|
+
load_parser.set_defaults(func=load_handler)
|
|
422
422
|
|
|
423
423
|
pipe_parser = subparsers.add_parser(
|
|
424
424
|
'pipeline',
|
|
@@ -440,7 +440,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
440
440
|
metavar='JOB',
|
|
441
441
|
help='Run a specific job by name',
|
|
442
442
|
)
|
|
443
|
-
pipe_parser.set_defaults(func=
|
|
443
|
+
pipe_parser.set_defaults(func=pipeline_handler)
|
|
444
444
|
|
|
445
445
|
render_parser = subparsers.add_parser(
|
|
446
446
|
'render',
|
|
@@ -476,7 +476,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
476
476
|
'Explicit path to a Jinja template file (overrides template key).'
|
|
477
477
|
),
|
|
478
478
|
)
|
|
479
|
-
render_parser.set_defaults(func=
|
|
479
|
+
render_parser.set_defaults(func=render_handler)
|
|
480
480
|
|
|
481
481
|
check_parser = subparsers.add_parser(
|
|
482
482
|
'check',
|
|
@@ -516,7 +516,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
516
516
|
name='transforms',
|
|
517
517
|
help_text='List data transforms',
|
|
518
518
|
)
|
|
519
|
-
check_parser.set_defaults(func=
|
|
519
|
+
check_parser.set_defaults(func=check_handler)
|
|
520
520
|
|
|
521
521
|
run_parser = subparsers.add_parser(
|
|
522
522
|
'run',
|
|
@@ -537,7 +537,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
537
537
|
'--pipeline',
|
|
538
538
|
help='Name of the pipeline to run',
|
|
539
539
|
)
|
|
540
|
-
run_parser.set_defaults(func=
|
|
540
|
+
run_parser.set_defaults(func=run_handler)
|
|
541
541
|
|
|
542
542
|
return parser
|
|
543
543
|
|
etlplus/run.py
CHANGED
|
@@ -142,10 +142,8 @@ def run(
|
|
|
142
142
|
"""
|
|
143
143
|
Run a pipeline job defined in a YAML configuration.
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
from ``in/pipeline.yml``, but callers can provide an explicit
|
|
148
|
-
``config_path`` to override this.
|
|
145
|
+
By default it reads the configuration from ``in/pipeline.yml``, but callers
|
|
146
|
+
can provide an explicit ``config_path`` to override this.
|
|
149
147
|
|
|
150
148
|
Parameters
|
|
151
149
|
----------
|
|
@@ -8,7 +8,7 @@ etlplus/file.py,sha256=RxIAsGDN4f_vNA2B5-ct88JNd_ISAyYbooIRE5DstS8,17972
|
|
|
8
8
|
etlplus/load.py,sha256=BwF3gT4gIr-5CvNMz_aLTCl-w2ihWSTxNVd4X92XFwI,8737
|
|
9
9
|
etlplus/mixins.py,sha256=ifGpHwWv7U00yqGf-kN93vJax2IiK4jaGtTsPsO3Oak,1350
|
|
10
10
|
etlplus/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
etlplus/run.py,sha256=
|
|
11
|
+
etlplus/run.py,sha256=X4kp5FQlIWVf1_d9oSrchKau7BFDCE1Zkscvu7WPaWw,12340
|
|
12
12
|
etlplus/run_helpers.py,sha256=bj6MkaeFxjl3CeKG1HoXKx5DwAlXNERVW-GX-z1P_qQ,24373
|
|
13
13
|
etlplus/transform.py,sha256=uAUVDDHYCgx7GpVez9IK3OAZM-CnCuMa9iox3vwGGJA,25296
|
|
14
14
|
etlplus/types.py,sha256=SJiZ7wJiSnV4CEvF-9E5nSFLBo4DT9OqHQqj1GSHkv8,6042
|
|
@@ -32,9 +32,9 @@ etlplus/api/rate_limiting/__init__.py,sha256=ZySB1dZettEDnWvI1EHf_TZ9L08M_kKsNR-
|
|
|
32
32
|
etlplus/api/rate_limiting/config.py,sha256=2b4wIynblN-1EyMqI4aXa71SljzSjXYh5N1Nngr3jOg,9406
|
|
33
33
|
etlplus/api/rate_limiting/rate_limiter.py,sha256=Uxozqd_Ej5Lsj-M-mLT2WexChgWh7x35_YP10yqYPQA,7159
|
|
34
34
|
etlplus/cli/__init__.py,sha256=J97-Rv931IL1_b4AXnB7Fbbd7HKnHBpx18NQfC_kE6c,299
|
|
35
|
-
etlplus/cli/app.py,sha256=
|
|
36
|
-
etlplus/cli/handlers.py,sha256=
|
|
37
|
-
etlplus/cli/main.py,sha256=
|
|
35
|
+
etlplus/cli/app.py,sha256=SYPO-NDwXgymJrACw39jZ_NJrSKAs0O8anuWR5o42WM,35893
|
|
36
|
+
etlplus/cli/handlers.py,sha256=ZPoV9N48mtpUMf4S_czAKpo4ZqLFVb4tcTq0B36v-84,18941
|
|
37
|
+
etlplus/cli/main.py,sha256=ijYOy72SEsxrTEBan5yADW8CZyr0yddVF8HeMgFw6Zg,16576
|
|
38
38
|
etlplus/config/__init__.py,sha256=VZWzOg7d2YR9NT6UwKTv44yf2FRUMjTHynkm1Dl5Qzo,1486
|
|
39
39
|
etlplus/config/connector.py,sha256=0-TIwevHbKRHVmucvyGpPd-3tB1dKHB-dj0yJ6kq5eY,9809
|
|
40
40
|
etlplus/config/jobs.py,sha256=hmzRCqt0OvCEZZR4ONKrd3lvSv0OmayjLc4yOBk3ug8,7399
|
|
@@ -47,9 +47,9 @@ etlplus/templates/ddl.sql.j2,sha256=s8fMWvcb4eaJVXkifuib1aQPljtZ8buuyB_uA-ZdU3Q,
|
|
|
47
47
|
etlplus/templates/view.sql.j2,sha256=Iy8DHfhq5yyvrUKDxqp_aHIEXY4Tm6j4wT7YDEFWAhk,2180
|
|
48
48
|
etlplus/validation/__init__.py,sha256=Pe5Xg1_EA4uiNZGYu5WTF3j7odjmyxnAJ8rcioaplSQ,1254
|
|
49
49
|
etlplus/validation/utils.py,sha256=Mtqg449VIke0ziy_wd2r6yrwJzQkA1iulZC87FzXMjo,10201
|
|
50
|
-
etlplus-0.5.
|
|
51
|
-
etlplus-0.5.
|
|
52
|
-
etlplus-0.5.
|
|
53
|
-
etlplus-0.5.
|
|
54
|
-
etlplus-0.5.
|
|
55
|
-
etlplus-0.5.
|
|
50
|
+
etlplus-0.5.5.dist-info/licenses/LICENSE,sha256=MuNO63i6kWmgnV2pbP2SLqP54mk1BGmu7CmbtxMmT-U,1069
|
|
51
|
+
etlplus-0.5.5.dist-info/METADATA,sha256=I6_4VqX4PBWV2T5KYctjcoL9aCwp6Iixc9IZhgLUKFQ,19288
|
|
52
|
+
etlplus-0.5.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
53
|
+
etlplus-0.5.5.dist-info/entry_points.txt,sha256=6w-2-jzuPa55spzK34h-UKh2JTEShh38adFRONNP9QE,45
|
|
54
|
+
etlplus-0.5.5.dist-info/top_level.txt,sha256=aWWF-udn_sLGuHTM6W6MLh99ArS9ROkUWO8Mi8y1_2U,8
|
|
55
|
+
etlplus-0.5.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|