Data Merger Service
Data Merger Service is a Python package that provides a simple and flexible way to merge data from two tables in a MySQL database. The service reads a configuration file that specifies the details of the merge operation, such as the names of the tables, the keys to join on, the type of join, and the output file name.
Installation
You can install DataMerger from PyPI:
pip install atreign-datamanager
Usage
To use Data Merger Service, you need to create a configuration file in JSON format. Here’s an example:
{
"database_config": {
"server_host": "localhost",
"server_port": "3306",
"user_name": "root",
"user_password": "password",
"database_name": "database_name"
},
"data_merge_operations": [
{
"left_data_table": {
"table_name": "table1",
"merge_keys": ["key1", "key3"]
},
"right_data_table": {
"table_name": "table2",
"merge_keys": ["key2", "key4"]
},
"merge_type": "inner",
"column_suffixes": ["_from_left_table", "_from_right_table"],
"output_file_name": "merged_data_output.csv"
}
]
}
Once you have your configuration file, you can perform the merge operation with a single function call:
from data_merger import perform_merge_from_config
perform_merge_from_config('config.json')
Replace 'config.json' with the path to your actual configuration file.
Root Directory Structure
data_merger_atlas_reign/
│
├── data_merger/
│ ├── __init__.py
│ ├── config_loader.py
│ ├── database_connector.py
│ ├── data_operations.py
│ └── logger.py
│
├── tests/
│ ├── __init__.py
│ ├── test_config_loader.py
│ ├── test_database_connector.py
│ └── test_data_operations.py
│
├── server_logs/
│ └── DataMerger.log
│
├── config.json
├── test_config.json
├── requirements.txt
├── setup.py
└── main.py
Contributing
If you want to contribute to this project, please submit a pull request.
License
This project is licensed under the MIT License.
Metadata
Release files for atreign-datamanager 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| atreign-datamanager-0.0.2.tar.gz | 7.4 kB | Without provenance | Details |
Release files / atreign-datamanager-0.0.2.tar.gz
| Download URL | atreign-datamanager-0.0.2.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c86a10a5352344a751bdb15a90b711291280028995448eddb351db3c5a3a1c0a
|
|
BLAKE2b-256 checksum How to use checksums |
03552b294ca0ee216214e98c794b222080953ba2ae424185ead2036719498d7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for atreign-datamanager 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.