Skip to main content

ETL (Extract, Transform and Load) for bibliographic data using an advance data workflow

Project description

Python package

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:

  1. Make sure you have Python installed on your system.
  2. Open a terminal or command prompt.
  3. 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

http://colav.udea.edu.co/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kahi-0.0.10a0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

Kahi-0.0.10a0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file kahi-0.0.10a0.tar.gz.

File metadata

  • Download URL: kahi-0.0.10a0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for kahi-0.0.10a0.tar.gz
Algorithm Hash digest
SHA256 86295e0cc879eaa43c46d9c99a3d33c1788d7bfc2c1d6cd482254fb7631f34ea
MD5 8029016074d9dd43a5b2aa0dc60eaab1
BLAKE2b-256 e5d389125769812260a1eda8bd52e502bbc8829ffbb16ef72354af874a6d28ae

See more details on using hashes here.

File details

Details for the file Kahi-0.0.10a0-py3-none-any.whl.

File metadata

  • Download URL: Kahi-0.0.10a0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for Kahi-0.0.10a0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dcce226535e5ea95647d16422f42ee5c274d43c2a1f2a896733f2c08e5d9934
MD5 685cd5270d91e759ba00f66a3a1fbb99
BLAKE2b-256 cbbeaa780e89d59090416ff87739ea15074e21227ccf7869ba83fd1e539b09b5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page