etlplus 0.12.9__tar.gz → 0.12.10__tar.gz
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-0.12.9/etlplus.egg-info → etlplus-0.12.10}/PKG-INFO +31 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/README.md +30 -0
- etlplus-0.12.10/etlplus/file/accdb.py +78 -0
- etlplus-0.12.10/etlplus/file/arrow.py +78 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/avro.py +13 -1
- etlplus-0.12.10/etlplus/file/bson.py +77 -0
- etlplus-0.12.10/etlplus/file/cbor.py +78 -0
- etlplus-0.12.10/etlplus/file/cfg.py +79 -0
- etlplus-0.12.10/etlplus/file/conf.py +80 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/csv.py +13 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/dat.py +13 -1
- etlplus-0.12.10/etlplus/file/duckdb.py +78 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/feather.py +13 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/fwf.py +12 -1
- etlplus-0.12.10/etlplus/file/ini.py +79 -0
- etlplus-0.12.10/etlplus/file/ion.py +78 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/json.py +13 -1
- etlplus-0.12.10/etlplus/file/log.py +78 -0
- etlplus-0.12.10/etlplus/file/mdb.py +78 -0
- etlplus-0.12.10/etlplus/file/msgpack.py +78 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/ndjson.py +12 -6
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/orc.py +13 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/parquet.py +13 -1
- etlplus-0.12.10/etlplus/file/pb.py +78 -0
- etlplus-0.12.10/etlplus/file/pbf.py +77 -0
- etlplus-0.12.10/etlplus/file/properties.py +78 -0
- etlplus-0.12.10/etlplus/file/proto.py +77 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/psv.py +14 -1
- etlplus-0.12.10/etlplus/file/sqlite.py +78 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/tab.py +3 -4
- etlplus-0.12.10/etlplus/file/toml.py +78 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/tsv.py +14 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/txt.py +11 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/xml.py +12 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/yaml.py +12 -1
- {etlplus-0.12.9 → etlplus-0.12.10/etlplus.egg-info}/PKG-INFO +31 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus.egg-info/SOURCES.txt +18 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/file/test_u_file_core.py +24 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/.coveragerc +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/.editorconfig +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/.gitattributes +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/.github/actions/python-bootstrap/action.yml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/.github/workflows/ci.yml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/.gitignore +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/.pre-commit-config.yaml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/.ruff.toml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/CODE_OF_CONDUCT.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/CONTRIBUTING.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/DEMO.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/LICENSE +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/MANIFEST.in +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/Makefile +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/REFERENCES.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/SECURITY.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/SUPPORT.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/docs/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/docs/pipeline-guide.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/docs/snippets/installation_version.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/__main__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/__version__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/auth.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/config.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/endpoint_client.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/errors.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/pagination/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/pagination/client.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/pagination/config.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/pagination/paginator.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/rate_limiting/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/rate_limiting/config.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/rate_limiting/rate_limiter.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/request_manager.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/retry_manager.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/transport.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/api/types.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/commands.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/constants.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/handlers.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/io.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/main.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/options.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/state.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/cli/types.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/config/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/config/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/config/connector.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/config/jobs.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/config/pipeline.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/config/profile.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/config/types.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/config/utils.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/database/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/database/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/database/ddl.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/database/engine.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/database/orm.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/database/schema.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/database/types.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/enums.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/extract.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/_imports.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/_io.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/core.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/enums.py +1 -1
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/gz.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/stub.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/xls.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/xlsx.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/file/zip.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/load.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/mixins.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/py.typed +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/run.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/run_helpers.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/templates/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/templates/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/templates/ddl.sql.j2 +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/templates/view.sql.j2 +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/transform.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/types.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/utils.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/validate.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/validation/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/validation/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus/validation/utils.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus.egg-info/dependency_links.txt +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus.egg-info/entry_points.txt +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus.egg-info/requires.txt +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/etlplus.egg-info/top_level.txt +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/README.md +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/configs/ddl_spec.yml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/configs/pipeline.yml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/data/sample.csv +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/data/sample.json +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/data/sample.xml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/data/sample.xsd +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/data/sample.yaml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/examples/quickstart_python.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/pyproject.toml +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/pytest.ini +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/setup.cfg +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/setup.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/__init__.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/conftest.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/conftest.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/test_i_cli.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/test_i_examples_data_parity.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/test_i_pagination_strategy.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/test_i_pipeline_smoke.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/test_i_pipeline_yaml_load.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/test_i_run.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/test_i_run_profile_pagination_defaults.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/integration/test_i_run_profile_rate_limit_defaults.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/conftest.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_auth.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_config.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_endpoint_client.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_mocks.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_pagination_client.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_pagination_config.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_paginator.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_rate_limit_config.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_rate_limiter.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_request_manager.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_retry_manager.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_transport.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/api/test_u_types.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/cli/conftest.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/cli/test_u_cli_handlers.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/cli/test_u_cli_io.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/cli/test_u_cli_main.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/cli/test_u_cli_state.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/config/test_u_config_utils.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/config/test_u_connector.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/config/test_u_jobs.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/config/test_u_pipeline.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/conftest.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/database/test_u_database_ddl.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/database/test_u_database_engine.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/database/test_u_database_orm.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/database/test_u_database_schema.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/file/test_u_file_enums.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/file/test_u_file_yaml.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_enums.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_extract.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_load.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_main.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_mixins.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_run.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_run_helpers.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_transform.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_utils.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_validate.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/test_u_version.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tests/unit/validation/test_u_validation_utils.py +0 -0
- {etlplus-0.12.9 → etlplus-0.12.10}/tools/update_demo_snippets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: etlplus
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.10
|
|
4
4
|
Summary: A Swiss Army knife for simple ETL operations
|
|
5
5
|
Home-page: https://github.com/Dagitali/ETLPlus
|
|
6
6
|
Author: ETLPlus Team
|
|
@@ -77,8 +77,10 @@ package and command-line interface for data extraction, validation, transformati
|
|
|
77
77
|
- [Semi-Structured Text](#semi-structured-text)
|
|
78
78
|
- [Columnar / Analytics-Friendly](#columnar--analytics-friendly)
|
|
79
79
|
- [Binary Serialization and Interchange](#binary-serialization-and-interchange)
|
|
80
|
+
- [Databases and Embedded Storage](#databases-and-embedded-storage)
|
|
80
81
|
- [Spreadsheets](#spreadsheets)
|
|
81
82
|
- [Data Archives](#data-archives)
|
|
83
|
+
- [Logs and Event Streams](#logs-and-event-streams)
|
|
82
84
|
- [Usage](#usage)
|
|
83
85
|
- [Command Line Interface](#command-line-interface)
|
|
84
86
|
- [Argument Order and Required Options](#argument-order-and-required-options)
|
|
@@ -246,8 +248,13 @@ File formats are grouped as in `FileFormat`. Support is marked as:
|
|
|
246
248
|
|
|
247
249
|
| Format | Supported | Description |
|
|
248
250
|
| --- | --- | --- |
|
|
251
|
+
| `cfg` | N | Config-style key-value pairs |
|
|
252
|
+
| `conf` | N | Config-style key-value pairs |
|
|
253
|
+
| `ini` | N | Config-style key-value pairs |
|
|
249
254
|
| `json` | Y | JavaScript Object Notation |
|
|
250
255
|
| `ndjson` | Y | Newline-Delimited JSON |
|
|
256
|
+
| `properties` | N | Java-style key-value pairs |
|
|
257
|
+
| `toml` | N | Tom's Obvious Minimal Language |
|
|
251
258
|
| `xml` | Y | Extensible Markup Language |
|
|
252
259
|
| `yaml` | Y | YAML Ain't Markup Language |
|
|
253
260
|
|
|
@@ -255,6 +262,7 @@ File formats are grouped as in `FileFormat`. Support is marked as:
|
|
|
255
262
|
|
|
256
263
|
| Format | Supported | Description |
|
|
257
264
|
| --- | --- | --- |
|
|
265
|
+
| `arrow` | N | Apache Arrow IPC |
|
|
258
266
|
| `feather` | Y | Apache Arrow Feather |
|
|
259
267
|
| `orc` | Y | Optimized Row Columnar; common in Hadoop |
|
|
260
268
|
| `parquet` | Y | Apache Parquet; common in Big Data |
|
|
@@ -264,6 +272,22 @@ File formats are grouped as in `FileFormat`. Support is marked as:
|
|
|
264
272
|
| Format | Supported | Description |
|
|
265
273
|
| --- | --- | --- |
|
|
266
274
|
| `avro` | Y | Apache Avro |
|
|
275
|
+
| `bson` | N | Binary JSON; common with MongoDB exports/dumps |
|
|
276
|
+
| `cbor` | N | Concise Binary Object Representation |
|
|
277
|
+
| `ion` | N | Amazon Ion |
|
|
278
|
+
| `msgpack` | N | MessagePack |
|
|
279
|
+
| `pb` | N | Protocol Buffers (Google Protobuf) |
|
|
280
|
+
| `pbf` | N | Protocolbuffer Binary Format; often for GIS data |
|
|
281
|
+
| `proto` | N | Protocol Buffers schema; often in .pb / .bin |
|
|
282
|
+
|
|
283
|
+
#### Databases and Embedded Storage
|
|
284
|
+
|
|
285
|
+
| Format | Supported | Description |
|
|
286
|
+
| --- | --- | --- |
|
|
287
|
+
| `accdb` | N | Microsoft Access database file (newer format) |
|
|
288
|
+
| `duckdb` | N | DuckDB database file |
|
|
289
|
+
| `mdb` | N | Microsoft Access database file (older format) |
|
|
290
|
+
| `sqlite` | N | SQLite database file |
|
|
267
291
|
|
|
268
292
|
#### Spreadsheets
|
|
269
293
|
|
|
@@ -279,6 +303,12 @@ File formats are grouped as in `FileFormat`. Support is marked as:
|
|
|
279
303
|
| `gz` | Y | Gzip-compressed file |
|
|
280
304
|
| `zip` | Y | ZIP archive |
|
|
281
305
|
|
|
306
|
+
#### Logs and Event Streams
|
|
307
|
+
|
|
308
|
+
| Format | Supported | Description |
|
|
309
|
+
| --- | --- | --- |
|
|
310
|
+
| `log` | N | Generic log file |
|
|
311
|
+
|
|
282
312
|
## Usage
|
|
283
313
|
|
|
284
314
|
### Command Line Interface
|
|
@@ -27,8 +27,10 @@ package and command-line interface for data extraction, validation, transformati
|
|
|
27
27
|
- [Semi-Structured Text](#semi-structured-text)
|
|
28
28
|
- [Columnar / Analytics-Friendly](#columnar--analytics-friendly)
|
|
29
29
|
- [Binary Serialization and Interchange](#binary-serialization-and-interchange)
|
|
30
|
+
- [Databases and Embedded Storage](#databases-and-embedded-storage)
|
|
30
31
|
- [Spreadsheets](#spreadsheets)
|
|
31
32
|
- [Data Archives](#data-archives)
|
|
33
|
+
- [Logs and Event Streams](#logs-and-event-streams)
|
|
32
34
|
- [Usage](#usage)
|
|
33
35
|
- [Command Line Interface](#command-line-interface)
|
|
34
36
|
- [Argument Order and Required Options](#argument-order-and-required-options)
|
|
@@ -196,8 +198,13 @@ File formats are grouped as in `FileFormat`. Support is marked as:
|
|
|
196
198
|
|
|
197
199
|
| Format | Supported | Description |
|
|
198
200
|
| --- | --- | --- |
|
|
201
|
+
| `cfg` | N | Config-style key-value pairs |
|
|
202
|
+
| `conf` | N | Config-style key-value pairs |
|
|
203
|
+
| `ini` | N | Config-style key-value pairs |
|
|
199
204
|
| `json` | Y | JavaScript Object Notation |
|
|
200
205
|
| `ndjson` | Y | Newline-Delimited JSON |
|
|
206
|
+
| `properties` | N | Java-style key-value pairs |
|
|
207
|
+
| `toml` | N | Tom's Obvious Minimal Language |
|
|
201
208
|
| `xml` | Y | Extensible Markup Language |
|
|
202
209
|
| `yaml` | Y | YAML Ain't Markup Language |
|
|
203
210
|
|
|
@@ -205,6 +212,7 @@ File formats are grouped as in `FileFormat`. Support is marked as:
|
|
|
205
212
|
|
|
206
213
|
| Format | Supported | Description |
|
|
207
214
|
| --- | --- | --- |
|
|
215
|
+
| `arrow` | N | Apache Arrow IPC |
|
|
208
216
|
| `feather` | Y | Apache Arrow Feather |
|
|
209
217
|
| `orc` | Y | Optimized Row Columnar; common in Hadoop |
|
|
210
218
|
| `parquet` | Y | Apache Parquet; common in Big Data |
|
|
@@ -214,6 +222,22 @@ File formats are grouped as in `FileFormat`. Support is marked as:
|
|
|
214
222
|
| Format | Supported | Description |
|
|
215
223
|
| --- | --- | --- |
|
|
216
224
|
| `avro` | Y | Apache Avro |
|
|
225
|
+
| `bson` | N | Binary JSON; common with MongoDB exports/dumps |
|
|
226
|
+
| `cbor` | N | Concise Binary Object Representation |
|
|
227
|
+
| `ion` | N | Amazon Ion |
|
|
228
|
+
| `msgpack` | N | MessagePack |
|
|
229
|
+
| `pb` | N | Protocol Buffers (Google Protobuf) |
|
|
230
|
+
| `pbf` | N | Protocolbuffer Binary Format; often for GIS data |
|
|
231
|
+
| `proto` | N | Protocol Buffers schema; often in .pb / .bin |
|
|
232
|
+
|
|
233
|
+
#### Databases and Embedded Storage
|
|
234
|
+
|
|
235
|
+
| Format | Supported | Description |
|
|
236
|
+
| --- | --- | --- |
|
|
237
|
+
| `accdb` | N | Microsoft Access database file (newer format) |
|
|
238
|
+
| `duckdb` | N | DuckDB database file |
|
|
239
|
+
| `mdb` | N | Microsoft Access database file (older format) |
|
|
240
|
+
| `sqlite` | N | SQLite database file |
|
|
217
241
|
|
|
218
242
|
#### Spreadsheets
|
|
219
243
|
|
|
@@ -229,6 +253,12 @@ File formats are grouped as in `FileFormat`. Support is marked as:
|
|
|
229
253
|
| `gz` | Y | Gzip-compressed file |
|
|
230
254
|
| `zip` | Y | ZIP archive |
|
|
231
255
|
|
|
256
|
+
#### Logs and Event Streams
|
|
257
|
+
|
|
258
|
+
| Format | Supported | Description |
|
|
259
|
+
| --- | --- | --- |
|
|
260
|
+
| `log` | N | Generic log file |
|
|
261
|
+
|
|
232
262
|
## Usage
|
|
233
263
|
|
|
234
264
|
### Command Line Interface
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""
|
|
2
|
+
:mod:`etlplus.file.accdb` module.
|
|
3
|
+
|
|
4
|
+
Helpers for reading/writing newer Microsoft Access database (ACCDB) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- An ACCDB file is a proprietary database file format used by Microsoft Access
|
|
9
|
+
2007 and later.
|
|
10
|
+
- Common cases:
|
|
11
|
+
- Storing relational data for small to medium-sized applications.
|
|
12
|
+
- Desktop database applications.
|
|
13
|
+
- Data management for non-enterprise solutions.
|
|
14
|
+
- Rule of thumb:
|
|
15
|
+
- If the file follows the ACCDB specification, use this module for reading
|
|
16
|
+
and writing.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
|
|
23
|
+
from ..types import JSONData
|
|
24
|
+
from ..types import JSONList
|
|
25
|
+
from . import stub
|
|
26
|
+
|
|
27
|
+
# SECTION: EXPORTS ========================================================== #
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
'read',
|
|
32
|
+
'write',
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# SECTION: FUNCTIONS ======================================================== #
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def read(
|
|
40
|
+
path: Path,
|
|
41
|
+
) -> JSONList:
|
|
42
|
+
"""
|
|
43
|
+
Read ACCDB content from ``path``.
|
|
44
|
+
|
|
45
|
+
Parameters
|
|
46
|
+
----------
|
|
47
|
+
path : Path
|
|
48
|
+
Path to the ACCDB file on disk.
|
|
49
|
+
|
|
50
|
+
Returns
|
|
51
|
+
-------
|
|
52
|
+
JSONList
|
|
53
|
+
The list of dictionaries read from the ACCDB file.
|
|
54
|
+
"""
|
|
55
|
+
return stub.read(path, format_name='ACCDB')
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def write(
|
|
59
|
+
path: Path,
|
|
60
|
+
data: JSONData,
|
|
61
|
+
) -> int:
|
|
62
|
+
"""
|
|
63
|
+
Write ``data`` to ACCDB at ``path`` and return record count.
|
|
64
|
+
|
|
65
|
+
Parameters
|
|
66
|
+
----------
|
|
67
|
+
path : Path
|
|
68
|
+
Path to the ACCDB file on disk.
|
|
69
|
+
data : JSONData
|
|
70
|
+
Data to write as ACCDB. Should be a list of dictionaries or a single
|
|
71
|
+
dictionary.
|
|
72
|
+
|
|
73
|
+
Returns
|
|
74
|
+
-------
|
|
75
|
+
int
|
|
76
|
+
The number of rows written to the ACCDB file.
|
|
77
|
+
"""
|
|
78
|
+
return stub.write(path, data, format_name='ACCDB')
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""
|
|
2
|
+
:mod:`etlplus.file.arrow` module.
|
|
3
|
+
|
|
4
|
+
Helpers for reading/writing Apache Arrow (ARROW) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- An ARROW file is a binary file format designed for efficient
|
|
9
|
+
columnar data storage and processing.
|
|
10
|
+
- Common cases:
|
|
11
|
+
- High-performance data analytics.
|
|
12
|
+
- Interoperability between different data processing systems.
|
|
13
|
+
- In-memory data representation for fast computations.
|
|
14
|
+
- Rule of thumb:
|
|
15
|
+
- If the file follows the Apache Arrow specification, use this module for
|
|
16
|
+
reading and writing.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
|
|
23
|
+
from ..types import JSONData
|
|
24
|
+
from ..types import JSONList
|
|
25
|
+
from . import stub
|
|
26
|
+
|
|
27
|
+
# SECTION: EXPORTS ========================================================== #
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
'read',
|
|
32
|
+
'write',
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# SECTION: FUNCTIONS ======================================================== #
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def read(
|
|
40
|
+
path: Path,
|
|
41
|
+
) -> JSONList:
|
|
42
|
+
"""
|
|
43
|
+
Read ARROW content from ``path``.
|
|
44
|
+
|
|
45
|
+
Parameters
|
|
46
|
+
----------
|
|
47
|
+
path : Path
|
|
48
|
+
Path to the Apache Arrow file on disk.
|
|
49
|
+
|
|
50
|
+
Returns
|
|
51
|
+
-------
|
|
52
|
+
JSONList
|
|
53
|
+
The list of dictionaries read from the Apache Arrow file.
|
|
54
|
+
"""
|
|
55
|
+
return stub.read(path, format_name='ARROW')
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def write(
|
|
59
|
+
path: Path,
|
|
60
|
+
data: JSONData,
|
|
61
|
+
) -> int:
|
|
62
|
+
"""
|
|
63
|
+
Write ``data`` to ARROW at ``path`` and return record count.
|
|
64
|
+
|
|
65
|
+
Parameters
|
|
66
|
+
----------
|
|
67
|
+
path : Path
|
|
68
|
+
Path to the ARROW file on disk.
|
|
69
|
+
data : JSONData
|
|
70
|
+
Data to write as ARROW. Should be a list of dictionaries or a
|
|
71
|
+
single dictionary.
|
|
72
|
+
|
|
73
|
+
Returns
|
|
74
|
+
-------
|
|
75
|
+
int
|
|
76
|
+
The number of rows written to the ARROW file.
|
|
77
|
+
"""
|
|
78
|
+
return stub.write(path, data, format_name='ARROW')
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
"""
|
|
2
2
|
:mod:`etlplus.file.avro` module.
|
|
3
3
|
|
|
4
|
-
Helpers for reading/writing Avro files.
|
|
4
|
+
Helpers for reading/writing Apache Avro (AVRO) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- An AVRO file is a binary file format designed for efficient
|
|
9
|
+
on-disk storage of data, with a schema definition.
|
|
10
|
+
- Common cases:
|
|
11
|
+
- Data serialization for distributed systems.
|
|
12
|
+
- Interoperability between different programming languages.
|
|
13
|
+
- Storage of large datasets with schema evolution support.
|
|
14
|
+
- Rule of thumb:
|
|
15
|
+
- If the file follows the Apache Avro specification, use this module for
|
|
16
|
+
reading and writing.
|
|
5
17
|
"""
|
|
6
18
|
|
|
7
19
|
from __future__ import annotations
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""
|
|
2
|
+
:mod:`etlplus.file.bson` module.
|
|
3
|
+
|
|
4
|
+
Helpers for reading/writing Binary JSON (BSON) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- A BSON file is a binary-encoded serialization of JSON-like documents.
|
|
9
|
+
- Common cases:
|
|
10
|
+
- Data storage in MongoDB.
|
|
11
|
+
- Efficient data interchange between systems.
|
|
12
|
+
- Handling of complex data types not supported in standard JSON.
|
|
13
|
+
- Rule of thumb:
|
|
14
|
+
- If the file follows the BSON specification, use this module for reading
|
|
15
|
+
and writing.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
|
|
22
|
+
from ..types import JSONData
|
|
23
|
+
from ..types import JSONList
|
|
24
|
+
from . import stub
|
|
25
|
+
|
|
26
|
+
# SECTION: EXPORTS ========================================================== #
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
'read',
|
|
31
|
+
'write',
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# SECTION: FUNCTIONS ======================================================== #
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def read(
|
|
39
|
+
path: Path,
|
|
40
|
+
) -> JSONList:
|
|
41
|
+
"""
|
|
42
|
+
Read BSON content from ``path``.
|
|
43
|
+
|
|
44
|
+
Parameters
|
|
45
|
+
----------
|
|
46
|
+
path : Path
|
|
47
|
+
Path to the BSON file on disk.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
JSONList
|
|
52
|
+
The list of dictionaries read from the BSON file.
|
|
53
|
+
"""
|
|
54
|
+
return stub.read(path, format_name='BSON')
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def write(
|
|
58
|
+
path: Path,
|
|
59
|
+
data: JSONData,
|
|
60
|
+
) -> int:
|
|
61
|
+
"""
|
|
62
|
+
Write ``data`` to BSON at ``path`` and return record count.
|
|
63
|
+
|
|
64
|
+
Parameters
|
|
65
|
+
----------
|
|
66
|
+
path : Path
|
|
67
|
+
Path to the BSON file on disk.
|
|
68
|
+
data : JSONData
|
|
69
|
+
Data to write as BSON. Should be a list of dictionaries or a
|
|
70
|
+
single dictionary.
|
|
71
|
+
|
|
72
|
+
Returns
|
|
73
|
+
-------
|
|
74
|
+
int
|
|
75
|
+
The number of rows written to the BSON file.
|
|
76
|
+
"""
|
|
77
|
+
return stub.write(path, data, format_name='BSON')
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""
|
|
2
|
+
:mod:`etlplus.file.cbor` module.
|
|
3
|
+
|
|
4
|
+
Helpers for reading/writing Concise Binary Object Representation (CBOR) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- A CBOR file is a binary data format designed for small code size and message
|
|
9
|
+
size, suitable for constrained environments.
|
|
10
|
+
- Common cases:
|
|
11
|
+
- IoT data interchange.
|
|
12
|
+
- Efficient data serialization.
|
|
13
|
+
- Storage of structured data in a compact binary form.
|
|
14
|
+
- Rule of thumb:
|
|
15
|
+
- If the file follows the CBOR specification, use this module for reading
|
|
16
|
+
and writing.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
|
|
23
|
+
from ..types import JSONData
|
|
24
|
+
from ..types import JSONList
|
|
25
|
+
from . import stub
|
|
26
|
+
|
|
27
|
+
# SECTION: EXPORTS ========================================================== #
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
'read',
|
|
32
|
+
'write',
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# SECTION: FUNCTIONS ======================================================== #
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def read(
|
|
40
|
+
path: Path,
|
|
41
|
+
) -> JSONList:
|
|
42
|
+
"""
|
|
43
|
+
Read CBOR content from ``path``.
|
|
44
|
+
|
|
45
|
+
Parameters
|
|
46
|
+
----------
|
|
47
|
+
path : Path
|
|
48
|
+
Path to the CBOR file on disk.
|
|
49
|
+
|
|
50
|
+
Returns
|
|
51
|
+
-------
|
|
52
|
+
JSONList
|
|
53
|
+
The list of dictionaries read from the CBOR file.
|
|
54
|
+
"""
|
|
55
|
+
return stub.read(path, format_name='CBOR')
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def write(
|
|
59
|
+
path: Path,
|
|
60
|
+
data: JSONData,
|
|
61
|
+
) -> int:
|
|
62
|
+
"""
|
|
63
|
+
Write ``data`` to CBOR at ``path`` and return record count.
|
|
64
|
+
|
|
65
|
+
Parameters
|
|
66
|
+
----------
|
|
67
|
+
path : Path
|
|
68
|
+
Path to the CBOR file on disk.
|
|
69
|
+
data : JSONData
|
|
70
|
+
Data to write as CBOR. Should be a list of dictionaries or a
|
|
71
|
+
single dictionary.
|
|
72
|
+
|
|
73
|
+
Returns
|
|
74
|
+
-------
|
|
75
|
+
int
|
|
76
|
+
The number of rows written to the CBOR file.
|
|
77
|
+
"""
|
|
78
|
+
return stub.write(path, data, format_name='CBOR')
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""
|
|
2
|
+
:mod:`etlplus.file.cfg` module.
|
|
3
|
+
|
|
4
|
+
Helpers for reading/writing config (CFG) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- A “CFG-formatted” file is a configuration file that may use various
|
|
9
|
+
syntaxes, such as INI, YAML, or custom formats.
|
|
10
|
+
- Common cases:
|
|
11
|
+
- INI-style key-value pairs with sections (such as in Python ecosystems,
|
|
12
|
+
using ``configparser``).
|
|
13
|
+
- YAML-like structures with indentation.
|
|
14
|
+
- Custom formats specific to certain applications.
|
|
15
|
+
- Rule of thumb:
|
|
16
|
+
- If the file follows a standard format like INI or YAML, consider using
|
|
17
|
+
dedicated parsers.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
from ..types import JSONData
|
|
25
|
+
from ..types import JSONList
|
|
26
|
+
from . import stub
|
|
27
|
+
|
|
28
|
+
# SECTION: EXPORTS ========================================================== #
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
'read',
|
|
33
|
+
'write',
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# SECTION: FUNCTIONS ======================================================== #
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def read(
|
|
41
|
+
path: Path,
|
|
42
|
+
) -> JSONList:
|
|
43
|
+
"""
|
|
44
|
+
Read CFG content from ``path``.
|
|
45
|
+
|
|
46
|
+
Parameters
|
|
47
|
+
----------
|
|
48
|
+
path : Path
|
|
49
|
+
Path to the CFG file on disk.
|
|
50
|
+
|
|
51
|
+
Returns
|
|
52
|
+
-------
|
|
53
|
+
JSONList
|
|
54
|
+
The list of dictionaries read from the CFG file.
|
|
55
|
+
"""
|
|
56
|
+
return stub.read(path, format_name='CFG')
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def write(
|
|
60
|
+
path: Path,
|
|
61
|
+
data: JSONData,
|
|
62
|
+
) -> int:
|
|
63
|
+
"""
|
|
64
|
+
Write ``data`` to CFG file at ``path`` and return record count.
|
|
65
|
+
|
|
66
|
+
Parameters
|
|
67
|
+
----------
|
|
68
|
+
path : Path
|
|
69
|
+
Path to the CFG file on disk.
|
|
70
|
+
data : JSONData
|
|
71
|
+
Data to write as CFG file. Should be a list of dictionaries or a
|
|
72
|
+
single dictionary.
|
|
73
|
+
|
|
74
|
+
Returns
|
|
75
|
+
-------
|
|
76
|
+
int
|
|
77
|
+
The number of rows written to the CFG file.
|
|
78
|
+
"""
|
|
79
|
+
return stub.write(path, data, format_name='CFG')
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""
|
|
2
|
+
:mod:`etlplus.file.conf` module.
|
|
3
|
+
|
|
4
|
+
Helpers for reading/writing config (CONF) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- A “CONF-formatted” file is a configuration file that may use various
|
|
9
|
+
syntaxes, such as INI, YAML, or custom formats.
|
|
10
|
+
- Common cases:
|
|
11
|
+
- INI-style key-value pairs with sections.
|
|
12
|
+
- YAML-like structures with indentation.
|
|
13
|
+
- Custom formats specific to certain applications (such as Unix-like
|
|
14
|
+
systems, where ``.conf`` is a strong convention for "This is a
|
|
15
|
+
configuration file").
|
|
16
|
+
- Rule of thumb:
|
|
17
|
+
- If the file follows a standard format like INI or YAML, consider using
|
|
18
|
+
dedicated parsers.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
from ..types import JSONData
|
|
26
|
+
from ..types import JSONList
|
|
27
|
+
from . import stub
|
|
28
|
+
|
|
29
|
+
# SECTION: EXPORTS ========================================================== #
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
__all__ = [
|
|
33
|
+
'read',
|
|
34
|
+
'write',
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# SECTION: FUNCTIONS ======================================================== #
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def read(
|
|
42
|
+
path: Path,
|
|
43
|
+
) -> JSONList:
|
|
44
|
+
"""
|
|
45
|
+
Read CONF content from ``path``.
|
|
46
|
+
|
|
47
|
+
Parameters
|
|
48
|
+
----------
|
|
49
|
+
path : Path
|
|
50
|
+
Path to the CONF file on disk.
|
|
51
|
+
|
|
52
|
+
Returns
|
|
53
|
+
-------
|
|
54
|
+
JSONList
|
|
55
|
+
The list of dictionaries read from the CONF file.
|
|
56
|
+
"""
|
|
57
|
+
return stub.read(path, format_name='CONF')
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def write(
|
|
61
|
+
path: Path,
|
|
62
|
+
data: JSONData,
|
|
63
|
+
) -> int:
|
|
64
|
+
"""
|
|
65
|
+
Write ``data`` to CONF at ``path`` and return record count.
|
|
66
|
+
|
|
67
|
+
Parameters
|
|
68
|
+
----------
|
|
69
|
+
path : Path
|
|
70
|
+
Path to the CONF file on disk.
|
|
71
|
+
data : JSONData
|
|
72
|
+
Data to write as CONF. Should be a list of dictionaries or a
|
|
73
|
+
single dictionary.
|
|
74
|
+
|
|
75
|
+
Returns
|
|
76
|
+
-------
|
|
77
|
+
int
|
|
78
|
+
The number of rows written to the CONF file.
|
|
79
|
+
"""
|
|
80
|
+
return stub.write(path, data, format_name='CONF')
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
"""
|
|
2
2
|
:mod:`etlplus.file.csv` module.
|
|
3
3
|
|
|
4
|
-
Helpers for reading/writing CSV files.
|
|
4
|
+
Helpers for reading/writing Comma-Separated Values (CSV) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- A CSV file is a plain text file that uses commas to separate values.
|
|
9
|
+
- Common cases:
|
|
10
|
+
- Each line in the file represents a single record.
|
|
11
|
+
- The first line often contains headers that define the column names.
|
|
12
|
+
- Values may be enclosed in quotes, especially if they contain commas
|
|
13
|
+
or special characters.
|
|
14
|
+
- Rule of thumb:
|
|
15
|
+
- If the file follows the CSV specification, use this module for
|
|
16
|
+
reading and writing.
|
|
5
17
|
"""
|
|
6
18
|
|
|
7
19
|
from __future__ import annotations
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
"""
|
|
2
2
|
:mod:`etlplus.file.dat` module.
|
|
3
3
|
|
|
4
|
-
Helpers for reading/writing
|
|
4
|
+
Helpers for reading/writing data (DAT) files.
|
|
5
|
+
|
|
6
|
+
Notes
|
|
7
|
+
-----
|
|
8
|
+
- A “DAT-formatted” file is a generic data file that may use various
|
|
9
|
+
delimiters or fixed-width formats.
|
|
10
|
+
- Common cases:
|
|
11
|
+
- Delimited text files (e.g., CSV, TSV).
|
|
12
|
+
- Fixed-width formatted files.
|
|
13
|
+
- Custom formats specific to certain applications.
|
|
14
|
+
- Rule of thumb:
|
|
15
|
+
- If the file does not follow a specific standard format, use this module
|
|
16
|
+
for reading and writing.
|
|
5
17
|
"""
|
|
6
18
|
|
|
7
19
|
from __future__ import annotations
|