etlplus 0.14.3__py3-none-any.whl → 0.16.0__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/README.md +4 -4
- etlplus/api/README.md +33 -2
- etlplus/api/auth.py +1 -1
- etlplus/api/config.py +5 -10
- etlplus/api/endpoint_client.py +4 -4
- etlplus/api/pagination/config.py +1 -1
- etlplus/api/pagination/paginator.py +6 -7
- etlplus/api/rate_limiting/config.py +4 -4
- etlplus/api/rate_limiting/rate_limiter.py +1 -1
- etlplus/api/retry_manager.py +2 -2
- etlplus/api/transport.py +1 -1
- etlplus/api/types.py +99 -0
- etlplus/api/utils.py +6 -2
- etlplus/cli/README.md +2 -2
- etlplus/cli/commands.py +75 -42
- etlplus/cli/constants.py +1 -1
- etlplus/cli/handlers.py +33 -15
- etlplus/cli/io.py +2 -2
- etlplus/cli/main.py +2 -2
- etlplus/cli/state.py +4 -7
- etlplus/connector/__init__.py +43 -0
- etlplus/connector/api.py +161 -0
- etlplus/connector/connector.py +26 -0
- etlplus/connector/core.py +132 -0
- etlplus/connector/database.py +122 -0
- etlplus/connector/enums.py +52 -0
- etlplus/connector/file.py +120 -0
- etlplus/connector/types.py +40 -0
- etlplus/connector/utils.py +122 -0
- etlplus/database/README.md +2 -2
- etlplus/database/ddl.py +2 -2
- etlplus/database/engine.py +19 -3
- etlplus/database/orm.py +2 -0
- etlplus/enums.py +1 -33
- etlplus/file/README.md +2 -2
- etlplus/file/_imports.py +1 -0
- etlplus/file/_io.py +52 -4
- etlplus/file/accdb.py +3 -2
- etlplus/file/arrow.py +3 -2
- etlplus/file/avro.py +3 -2
- etlplus/file/bson.py +3 -2
- etlplus/file/cbor.py +3 -2
- etlplus/file/cfg.py +3 -2
- etlplus/file/conf.py +3 -2
- etlplus/file/core.py +11 -8
- etlplus/file/csv.py +3 -2
- etlplus/file/dat.py +3 -2
- etlplus/file/dta.py +3 -2
- etlplus/file/duckdb.py +3 -2
- etlplus/file/enums.py +1 -1
- etlplus/file/feather.py +3 -2
- etlplus/file/fwf.py +3 -2
- etlplus/file/gz.py +3 -2
- etlplus/file/hbs.py +3 -2
- etlplus/file/hdf5.py +3 -2
- etlplus/file/ini.py +3 -2
- etlplus/file/ion.py +3 -2
- etlplus/file/jinja2.py +3 -2
- etlplus/file/json.py +5 -16
- etlplus/file/log.py +3 -2
- etlplus/file/mat.py +3 -2
- etlplus/file/mdb.py +3 -2
- etlplus/file/msgpack.py +3 -2
- etlplus/file/mustache.py +3 -2
- etlplus/file/nc.py +3 -2
- etlplus/file/ndjson.py +3 -2
- etlplus/file/numbers.py +3 -2
- etlplus/file/ods.py +3 -2
- etlplus/file/orc.py +3 -2
- etlplus/file/parquet.py +3 -2
- etlplus/file/pb.py +3 -2
- etlplus/file/pbf.py +3 -2
- etlplus/file/properties.py +3 -2
- etlplus/file/proto.py +3 -2
- etlplus/file/psv.py +3 -2
- etlplus/file/rda.py +3 -2
- etlplus/file/rds.py +3 -2
- etlplus/file/sas7bdat.py +3 -2
- etlplus/file/sav.py +3 -2
- etlplus/file/sqlite.py +3 -2
- etlplus/file/stub.py +1 -0
- etlplus/file/sylk.py +3 -2
- etlplus/file/tab.py +3 -2
- etlplus/file/toml.py +3 -2
- etlplus/file/tsv.py +3 -2
- etlplus/file/txt.py +4 -3
- etlplus/file/vm.py +3 -2
- etlplus/file/wks.py +3 -2
- etlplus/file/xls.py +3 -2
- etlplus/file/xlsm.py +3 -2
- etlplus/file/xlsx.py +3 -2
- etlplus/file/xml.py +9 -3
- etlplus/file/xpt.py +3 -2
- etlplus/file/yaml.py +5 -16
- etlplus/file/zip.py +3 -2
- etlplus/file/zsav.py +3 -2
- etlplus/ops/extract.py +13 -1
- etlplus/ops/load.py +15 -2
- etlplus/ops/run.py +18 -13
- etlplus/ops/transform.py +2 -2
- etlplus/ops/utils.py +6 -35
- etlplus/ops/validate.py +3 -3
- etlplus/templates/README.md +2 -2
- etlplus/types.py +3 -2
- etlplus/utils.py +163 -29
- etlplus/{config → workflow}/README.md +6 -6
- etlplus/workflow/__init__.py +32 -0
- etlplus/{dag.py → workflow/dag.py} +6 -4
- etlplus/{config → workflow}/jobs.py +101 -38
- etlplus/{config → workflow}/pipeline.py +59 -51
- etlplus/{config → workflow}/profile.py +8 -5
- {etlplus-0.14.3.dist-info → etlplus-0.16.0.dist-info}/METADATA +4 -4
- etlplus-0.16.0.dist-info/RECORD +141 -0
- {etlplus-0.14.3.dist-info → etlplus-0.16.0.dist-info}/WHEEL +1 -1
- etlplus/config/__init__.py +0 -56
- etlplus/config/connector.py +0 -372
- etlplus/config/types.py +0 -204
- etlplus/config/utils.py +0 -120
- etlplus-0.14.3.dist-info/RECORD +0 -135
- {etlplus-0.14.3.dist-info → etlplus-0.16.0.dist-info}/entry_points.txt +0 -0
- {etlplus-0.14.3.dist-info → etlplus-0.16.0.dist-info}/licenses/LICENSE +0 -0
- {etlplus-0.14.3.dist-info → etlplus-0.16.0.dist-info}/top_level.txt +0 -0
etlplus/file/ods.py
CHANGED
|
@@ -29,6 +29,7 @@ from . import stub
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
__all__ = [
|
|
32
|
+
# Functions
|
|
32
33
|
'read',
|
|
33
34
|
'write',
|
|
34
35
|
]
|
|
@@ -41,7 +42,7 @@ def read(
|
|
|
41
42
|
path: Path,
|
|
42
43
|
) -> JSONList:
|
|
43
44
|
"""
|
|
44
|
-
Read ODS content from
|
|
45
|
+
Read ODS content from *path*.
|
|
45
46
|
|
|
46
47
|
Parameters
|
|
47
48
|
----------
|
|
@@ -61,7 +62,7 @@ def write(
|
|
|
61
62
|
data: JSONData,
|
|
62
63
|
) -> int:
|
|
63
64
|
"""
|
|
64
|
-
Write
|
|
65
|
+
Write *data* to ODS file at *path* and return record count.
|
|
65
66
|
|
|
66
67
|
Parameters
|
|
67
68
|
----------
|
etlplus/file/orc.py
CHANGED
|
@@ -30,6 +30,7 @@ from ._io import normalize_records
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
__all__ = [
|
|
33
|
+
# Functions
|
|
33
34
|
'read',
|
|
34
35
|
'write',
|
|
35
36
|
]
|
|
@@ -42,7 +43,7 @@ def read(
|
|
|
42
43
|
path: Path,
|
|
43
44
|
) -> JSONList:
|
|
44
45
|
"""
|
|
45
|
-
Read ORC content from
|
|
46
|
+
Read ORC content from *path*.
|
|
46
47
|
|
|
47
48
|
Parameters
|
|
48
49
|
----------
|
|
@@ -75,7 +76,7 @@ def write(
|
|
|
75
76
|
data: JSONData,
|
|
76
77
|
) -> int:
|
|
77
78
|
"""
|
|
78
|
-
Write
|
|
79
|
+
Write *data* to ORC at *path* and return record count.
|
|
79
80
|
|
|
80
81
|
Parameters
|
|
81
82
|
----------
|
etlplus/file/parquet.py
CHANGED
|
@@ -30,6 +30,7 @@ from ._io import normalize_records
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
__all__ = [
|
|
33
|
+
# Functions
|
|
33
34
|
'read',
|
|
34
35
|
'write',
|
|
35
36
|
]
|
|
@@ -42,7 +43,7 @@ def read(
|
|
|
42
43
|
path: Path,
|
|
43
44
|
) -> JSONList:
|
|
44
45
|
"""
|
|
45
|
-
Read Parquet content from
|
|
46
|
+
Read Parquet content from *path*.
|
|
46
47
|
|
|
47
48
|
Parameters
|
|
48
49
|
----------
|
|
@@ -76,7 +77,7 @@ def write(
|
|
|
76
77
|
data: JSONData,
|
|
77
78
|
) -> int:
|
|
78
79
|
"""
|
|
79
|
-
Write
|
|
80
|
+
Write *data* to Parquet at *path* and return record count.
|
|
80
81
|
|
|
81
82
|
Parameters
|
|
82
83
|
----------
|
etlplus/file/pb.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read PB content from
|
|
44
|
+
Read PB content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to PB at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|
etlplus/file/pbf.py
CHANGED
|
@@ -27,6 +27,7 @@ from . import stub
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
|
+
# Functions
|
|
30
31
|
'read',
|
|
31
32
|
'write',
|
|
32
33
|
]
|
|
@@ -39,7 +40,7 @@ def read(
|
|
|
39
40
|
path: Path,
|
|
40
41
|
) -> JSONList:
|
|
41
42
|
"""
|
|
42
|
-
Read PBF content from
|
|
43
|
+
Read PBF content from *path*.
|
|
43
44
|
|
|
44
45
|
Parameters
|
|
45
46
|
----------
|
|
@@ -59,7 +60,7 @@ def write(
|
|
|
59
60
|
data: JSONData,
|
|
60
61
|
) -> int:
|
|
61
62
|
"""
|
|
62
|
-
Write
|
|
63
|
+
Write *data* to PBF at *path* and return record count.
|
|
63
64
|
|
|
64
65
|
Parameters
|
|
65
66
|
----------
|
etlplus/file/properties.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read PROPERTIES content from
|
|
44
|
+
Read PROPERTIES content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to PROPERTIES at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|
etlplus/file/proto.py
CHANGED
|
@@ -27,6 +27,7 @@ from . import stub
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
|
+
# Functions
|
|
30
31
|
'read',
|
|
31
32
|
'write',
|
|
32
33
|
]
|
|
@@ -39,7 +40,7 @@ def read(
|
|
|
39
40
|
path: Path,
|
|
40
41
|
) -> JSONList:
|
|
41
42
|
"""
|
|
42
|
-
Read PROTO content from
|
|
43
|
+
Read PROTO content from *path*.
|
|
43
44
|
|
|
44
45
|
Parameters
|
|
45
46
|
----------
|
|
@@ -59,7 +60,7 @@ def write(
|
|
|
59
60
|
data: JSONData,
|
|
60
61
|
) -> int:
|
|
61
62
|
"""
|
|
62
|
-
Write
|
|
63
|
+
Write *data* to PROTO at *path* and return record count.
|
|
63
64
|
|
|
64
65
|
Parameters
|
|
65
66
|
----------
|
etlplus/file/psv.py
CHANGED
|
@@ -29,6 +29,7 @@ from . import stub
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
__all__ = [
|
|
32
|
+
# Functions
|
|
32
33
|
'read',
|
|
33
34
|
'write',
|
|
34
35
|
]
|
|
@@ -41,7 +42,7 @@ def read(
|
|
|
41
42
|
path: Path,
|
|
42
43
|
) -> JSONList:
|
|
43
44
|
"""
|
|
44
|
-
Read PSV content from
|
|
45
|
+
Read PSV content from *path*.
|
|
45
46
|
|
|
46
47
|
Parameters
|
|
47
48
|
----------
|
|
@@ -61,7 +62,7 @@ def write(
|
|
|
61
62
|
data: JSONData,
|
|
62
63
|
) -> int:
|
|
63
64
|
"""
|
|
64
|
-
Write
|
|
65
|
+
Write *data* to PSV file at *path* and return record count.
|
|
65
66
|
|
|
66
67
|
Parameters
|
|
67
68
|
----------
|
etlplus/file/rda.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read RDA content from
|
|
44
|
+
Read RDA content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to RDA file at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|
etlplus/file/rds.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read RDS content from
|
|
44
|
+
Read RDS content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to RDS file at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|
etlplus/file/sas7bdat.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read DAT content from
|
|
44
|
+
Read DAT content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to SAS7BDAT file at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|
etlplus/file/sav.py
CHANGED
|
@@ -27,6 +27,7 @@ from . import stub
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
|
+
# Functions
|
|
30
31
|
'read',
|
|
31
32
|
'write',
|
|
32
33
|
]
|
|
@@ -39,7 +40,7 @@ def read(
|
|
|
39
40
|
path: Path,
|
|
40
41
|
) -> JSONList:
|
|
41
42
|
"""
|
|
42
|
-
Read SAV content from
|
|
43
|
+
Read SAV content from *path*.
|
|
43
44
|
|
|
44
45
|
Parameters
|
|
45
46
|
----------
|
|
@@ -59,7 +60,7 @@ def write(
|
|
|
59
60
|
data: JSONData,
|
|
60
61
|
) -> int:
|
|
61
62
|
"""
|
|
62
|
-
Write
|
|
63
|
+
Write *data* to SAV file at *path* and return record count.
|
|
63
64
|
|
|
64
65
|
Parameters
|
|
65
66
|
----------
|
etlplus/file/sqlite.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read SQLITE content from
|
|
44
|
+
Read SQLITE content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to SQLITE at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|
etlplus/file/stub.py
CHANGED
etlplus/file/sylk.py
CHANGED
|
@@ -27,6 +27,7 @@ from . import stub
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
|
+
# Functions
|
|
30
31
|
'read',
|
|
31
32
|
'write',
|
|
32
33
|
]
|
|
@@ -39,7 +40,7 @@ def read(
|
|
|
39
40
|
path: Path,
|
|
40
41
|
) -> JSONList:
|
|
41
42
|
"""
|
|
42
|
-
Read SYLK content from
|
|
43
|
+
Read SYLK content from *path*.
|
|
43
44
|
|
|
44
45
|
Parameters
|
|
45
46
|
----------
|
|
@@ -59,7 +60,7 @@ def write(
|
|
|
59
60
|
data: JSONData,
|
|
60
61
|
) -> int:
|
|
61
62
|
"""
|
|
62
|
-
Write
|
|
63
|
+
Write *data* to SYLK file at *path* and return record count.
|
|
63
64
|
|
|
64
65
|
Parameters
|
|
65
66
|
----------
|
etlplus/file/tab.py
CHANGED
|
@@ -31,6 +31,7 @@ from . import stub
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
__all__ = [
|
|
34
|
+
# Functions
|
|
34
35
|
'read',
|
|
35
36
|
'write',
|
|
36
37
|
]
|
|
@@ -43,7 +44,7 @@ def read(
|
|
|
43
44
|
path: Path,
|
|
44
45
|
) -> JSONList:
|
|
45
46
|
"""
|
|
46
|
-
Read TAB content from
|
|
47
|
+
Read TAB content from *path*.
|
|
47
48
|
|
|
48
49
|
Parameters
|
|
49
50
|
----------
|
|
@@ -63,7 +64,7 @@ def write(
|
|
|
63
64
|
data: JSONData,
|
|
64
65
|
) -> int:
|
|
65
66
|
"""
|
|
66
|
-
Write
|
|
67
|
+
Write *data* to TAB file at *path* and return record count.
|
|
67
68
|
|
|
68
69
|
Parameters
|
|
69
70
|
----------
|
etlplus/file/toml.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read TOML content from
|
|
44
|
+
Read TOML content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to TOML at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|
etlplus/file/tsv.py
CHANGED
|
@@ -30,6 +30,7 @@ from ._io import write_delimited
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
__all__ = [
|
|
33
|
+
# Functions
|
|
33
34
|
'read',
|
|
34
35
|
'write',
|
|
35
36
|
]
|
|
@@ -42,7 +43,7 @@ def read(
|
|
|
42
43
|
path: Path,
|
|
43
44
|
) -> JSONList:
|
|
44
45
|
"""
|
|
45
|
-
Read TSV content from
|
|
46
|
+
Read TSV content from *path*.
|
|
46
47
|
|
|
47
48
|
Parameters
|
|
48
49
|
----------
|
|
@@ -62,7 +63,7 @@ def write(
|
|
|
62
63
|
data: JSONData,
|
|
63
64
|
) -> int:
|
|
64
65
|
"""
|
|
65
|
-
Write
|
|
66
|
+
Write *data* to TSV at *path* and return record count.
|
|
66
67
|
|
|
67
68
|
Parameters
|
|
68
69
|
----------
|
etlplus/file/txt.py
CHANGED
|
@@ -27,6 +27,7 @@ from ._io import normalize_records
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
|
+
# Functions
|
|
30
31
|
'read',
|
|
31
32
|
'write',
|
|
32
33
|
]
|
|
@@ -39,7 +40,7 @@ def read(
|
|
|
39
40
|
path: Path,
|
|
40
41
|
) -> JSONList:
|
|
41
42
|
"""
|
|
42
|
-
Read TXT content from
|
|
43
|
+
Read TXT content from *path*.
|
|
43
44
|
|
|
44
45
|
Parameters
|
|
45
46
|
----------
|
|
@@ -66,7 +67,7 @@ def write(
|
|
|
66
67
|
data: JSONData,
|
|
67
68
|
) -> int:
|
|
68
69
|
"""
|
|
69
|
-
Write
|
|
70
|
+
Write *data* to TXT at *path* and return record count.
|
|
70
71
|
|
|
71
72
|
Parameters
|
|
72
73
|
----------
|
|
@@ -83,7 +84,7 @@ def write(
|
|
|
83
84
|
Raises
|
|
84
85
|
------
|
|
85
86
|
TypeError
|
|
86
|
-
If any item in
|
|
87
|
+
If any item in *data* is not a dictionary or if any dictionary
|
|
87
88
|
does not contain a ``'text'`` key.
|
|
88
89
|
"""
|
|
89
90
|
rows = normalize_records(data, 'TXT')
|
etlplus/file/vm.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read VM content from
|
|
44
|
+
Read VM content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to VM file at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|
etlplus/file/wks.py
CHANGED
|
@@ -27,6 +27,7 @@ from . import stub
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
|
+
# Functions
|
|
30
31
|
'read',
|
|
31
32
|
'write',
|
|
32
33
|
]
|
|
@@ -39,7 +40,7 @@ def read(
|
|
|
39
40
|
path: Path,
|
|
40
41
|
) -> JSONList:
|
|
41
42
|
"""
|
|
42
|
-
Read WKS content from
|
|
43
|
+
Read WKS content from *path*.
|
|
43
44
|
|
|
44
45
|
Parameters
|
|
45
46
|
----------
|
|
@@ -59,7 +60,7 @@ def write(
|
|
|
59
60
|
data: JSONData,
|
|
60
61
|
) -> int:
|
|
61
62
|
"""
|
|
62
|
-
Write
|
|
63
|
+
Write *data* to WKS file at *path* and return record count.
|
|
63
64
|
|
|
64
65
|
Parameters
|
|
65
66
|
----------
|
etlplus/file/xls.py
CHANGED
|
@@ -17,6 +17,7 @@ from ._imports import get_pandas
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
__all__ = [
|
|
20
|
+
# Functions
|
|
20
21
|
'read',
|
|
21
22
|
'write',
|
|
22
23
|
]
|
|
@@ -29,7 +30,7 @@ def read(
|
|
|
29
30
|
path: Path,
|
|
30
31
|
) -> JSONList:
|
|
31
32
|
"""
|
|
32
|
-
Read XLS content from
|
|
33
|
+
Read XLS content from *path*.
|
|
33
34
|
|
|
34
35
|
Parameters
|
|
35
36
|
----------
|
|
@@ -62,7 +63,7 @@ def write(
|
|
|
62
63
|
data: JSONData,
|
|
63
64
|
) -> int:
|
|
64
65
|
"""
|
|
65
|
-
Write
|
|
66
|
+
Write *data* to XLS at *path* and return record count.
|
|
66
67
|
|
|
67
68
|
Notes
|
|
68
69
|
-----
|
etlplus/file/xlsm.py
CHANGED
|
@@ -29,6 +29,7 @@ from . import stub
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
__all__ = [
|
|
32
|
+
# Functions
|
|
32
33
|
'read',
|
|
33
34
|
'write',
|
|
34
35
|
]
|
|
@@ -41,7 +42,7 @@ def read(
|
|
|
41
42
|
path: Path,
|
|
42
43
|
) -> JSONList:
|
|
43
44
|
"""
|
|
44
|
-
Read XLSM content from
|
|
45
|
+
Read XLSM content from *path*.
|
|
45
46
|
|
|
46
47
|
Parameters
|
|
47
48
|
----------
|
|
@@ -61,7 +62,7 @@ def write(
|
|
|
61
62
|
data: JSONData,
|
|
62
63
|
) -> int:
|
|
63
64
|
"""
|
|
64
|
-
Write
|
|
65
|
+
Write *data* to XLSM file at *path* and return record count.
|
|
65
66
|
|
|
66
67
|
Parameters
|
|
67
68
|
----------
|
etlplus/file/xlsx.py
CHANGED
|
@@ -18,6 +18,7 @@ from ._io import normalize_records
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
__all__ = [
|
|
21
|
+
# Functions
|
|
21
22
|
'read',
|
|
22
23
|
'write',
|
|
23
24
|
]
|
|
@@ -30,7 +31,7 @@ def read(
|
|
|
30
31
|
path: Path,
|
|
31
32
|
) -> JSONList:
|
|
32
33
|
"""
|
|
33
|
-
Read XLSX content from
|
|
34
|
+
Read XLSX content from *path*.
|
|
34
35
|
|
|
35
36
|
Parameters
|
|
36
37
|
----------
|
|
@@ -63,7 +64,7 @@ def write(
|
|
|
63
64
|
data: JSONData,
|
|
64
65
|
) -> int:
|
|
65
66
|
"""
|
|
66
|
-
Write
|
|
67
|
+
Write *data* to XLSX at *path* and return record count.
|
|
67
68
|
|
|
68
69
|
Parameters
|
|
69
70
|
----------
|
etlplus/file/xml.py
CHANGED
|
@@ -29,6 +29,7 @@ from ..utils import count_records
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
__all__ = [
|
|
32
|
+
# Functions
|
|
32
33
|
'read',
|
|
33
34
|
'write',
|
|
34
35
|
]
|
|
@@ -137,7 +138,7 @@ def read(
|
|
|
137
138
|
path: Path,
|
|
138
139
|
) -> JSONDict:
|
|
139
140
|
"""
|
|
140
|
-
Read XML content from
|
|
141
|
+
Read XML content from *path*.
|
|
141
142
|
|
|
142
143
|
Parameters
|
|
143
144
|
----------
|
|
@@ -155,9 +156,14 @@ def read(
|
|
|
155
156
|
return {root.tag: _element_to_dict(root)}
|
|
156
157
|
|
|
157
158
|
|
|
158
|
-
def write(
|
|
159
|
+
def write(
|
|
160
|
+
path: Path,
|
|
161
|
+
data: JSONData,
|
|
162
|
+
*,
|
|
163
|
+
root_tag: str,
|
|
164
|
+
) -> int:
|
|
159
165
|
"""
|
|
160
|
-
Write
|
|
166
|
+
Write *data* to XML at *path* and return record count.
|
|
161
167
|
|
|
162
168
|
Parameters
|
|
163
169
|
----------
|
etlplus/file/xpt.py
CHANGED
|
@@ -28,6 +28,7 @@ from . import stub
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
+
# Functions
|
|
31
32
|
'read',
|
|
32
33
|
'write',
|
|
33
34
|
]
|
|
@@ -40,7 +41,7 @@ def read(
|
|
|
40
41
|
path: Path,
|
|
41
42
|
) -> JSONList:
|
|
42
43
|
"""
|
|
43
|
-
Read XPT content from
|
|
44
|
+
Read XPT content from *path*.
|
|
44
45
|
|
|
45
46
|
Parameters
|
|
46
47
|
----------
|
|
@@ -60,7 +61,7 @@ def write(
|
|
|
60
61
|
data: JSONData,
|
|
61
62
|
) -> int:
|
|
62
63
|
"""
|
|
63
|
-
Write
|
|
64
|
+
Write *data* to XPT file at *path* and return record count.
|
|
64
65
|
|
|
65
66
|
Parameters
|
|
66
67
|
----------
|