Data Comparator: A Python package for comparing data from two files. The service reads a configuration file that specifies the details of the comparison operation, such as the logger configurations, old file and new file for the comparison along with the file type, Primary key information. Easy to use and highly flexible, Data Comparator simplifies the process of merging data.
Project description
Data Comparator Service
Data Comparator is a Python package for comparing data from two files. The service reads a configuration file that specifies the details of the comparison operation, such as the logger configurations, old file and new file for the comparison along with the file type, Primary key information. Easy to use and highly flexible, Data Comparator simplifies the process of merging data.
Installation
You can install DataComparator from PyPI:
pip install wai-datacomparator
Usage
To use Data Comparator Service, you need to create a configuration file in JSON format. Here’s an example:
{
"logger": {
"test_mode": true,
"req_id": "001",
"application_name": "Wilson AI Test",
"application_version": "0.0.1",
"environment": "Development",
"environment_modifier": ""
},
"data": {
"old_file_path": "./scores_properties.csv",
"new_file_path": "./scores_properties_1.csv",
"csv_format": true
},
"comparison": {
"primary_key": "property_id"
}
}
Once you have your configuration file, you can perform the merge operation with a single function call:
from data_comparator import DataComparator
config_path = "./config.json"
data = DataComparator(config_path=config_path)
data.run_comparison()
Replace "config.json" with the path to your actual configuration file.
Contributing
If you want to contribute to this project, please submit a pull request.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wai-datacomparator-0.1.0b1.tar.gz.
File metadata
- Download URL: wai-datacomparator-0.1.0b1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9dba4cc6f7cb0c0ffdfa22afaaa1693936d46969fda0b832d179588c1dae115
|
|
| MD5 |
7a93b492c5adc198126a334063198000
|
|
| BLAKE2b-256 |
c0da44fcca7e0a8b9a9827a3b7850fa9b65975fe09e089bef0a66e711fc9c631
|
File details
Details for the file wai_datacomparator-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: wai_datacomparator-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a73ac4e0c49537cfce313d84f1483d346e8fded7cd8a1ad189d115e42f7df53
|
|
| MD5 |
fc0641e189df12d245f9421e56c285d9
|
|
| BLAKE2b-256 |
93850dcb82b62c2200d576a866b936f12e8be9cd5dcf4c077326e88e6163ba2b
|