ETL (Extract, Transform and Load) for bibliographic data using an advance data workflow
Project description
Kahi
KAHI is a powerful tool by offering a framework to define a workflow of sequential tasks using a plugin system that KAHI understands.
Plugins
Take a look on plugins examples in the repository https://github.com/colav/Kahi_plugins
Installation
To install KAHI, follow these simple steps:
- Make sure you have Python installed on your system.
- Open a terminal or command prompt.
- Run the following command:
pip install kahi
Additionally, if you require specific plugins, you can install them using the following command:
pip install plugin-name
Replace plugin-name with the name of the desired plugin.
If the user wants to install all available plugins run:
pip install kahi[all]
Usage
To use KAHI, you need to define a YAML file that contains the workflow and global configuration variables. Here is an example of a YAML file:
config:
database_url: localhost:27017
database_name: kahi
log_database: kahi_log
log_collection: log
workflow:
scimago_sources:
file_path: scimago/scimagojr 2020.csv
doaj_sources:
database_url: localhost:27017
database_name: doaj
collection_name: stage
In the config section, you can specify the MongoDB URL, database name, log database, and log collection for KAHI to use.
The workflow section contains the sequential tasks of the workflow. Each task is defined with a unique name and specific configuration options based on the data source. In the example above, three tasks are defined: ror_affiliations, staff_affiliations, and scienti_affiliations. Every task should be related to a plugin
Finally, to run the workflow, use the following command:
kahi_run --workflow worflow.yaml
Replace workflow.yaml with the path to your YAML file.
Suggested workflows can be found on our worflow repository.
Logging
KAHI keeps a detailed log of each plugin's execution in a mongodb collection, including the name, execution time, elapsed time, execution status, and error messages. This information is valuable for both users and developers, and it enables the ability to resume the workflow from the last successful task.
Plugins can take advantage of a researved parameter task. When the reserved paramer task is used, the log entry becomes unique with the name of the plugin and the task as a suffix.
Creating a template package
You can create a template package structure by running:
kahi_generate --plugin myplugin
and a basic installable template called Kahi_myplugin will be created.
Contributing
If you are interested in contributing to KAHI or creating your own plugins, please refer to the kahi-plugins repository. It contains the necessary resources and documentation to implement new plugins easily. Feel free to submit pull requests or report any issues you encounter.
License
BSD-3-Clause License
Links
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
File details
Details for the file kahi-0.1.1a0.tar.gz
.
File metadata
- Download URL: kahi-0.1.1a0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 275fff9f875f0cc7dbfb23a8dd1fcb47886b5eb417307a7090194d8c564ed421 |
|
MD5 | 95f9234e85823f5a8c88e01d22333f05 |
|
BLAKE2b-256 | df4332e9eedb3fa021aae733e985c3d1c0974c410cb116070cec342a34804323 |
File details
Details for the file Kahi-0.1.1a0-py3-none-any.whl
.
File metadata
- Download URL: Kahi-0.1.1a0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d77f1e0fd480f4cdd723ee0e1570c54655f240875bbd17b723d045088aba7568 |
|
MD5 | c65717752e740f60a2d3254e429fa218 |
|
BLAKE2b-256 | f48f5eb834aababbd57ff75e2ae267fc841254e942352ca93eb01e89fc91ff33 |