Skip to main content

A python rule engine operating with data frames aimed at the financial services.

Project description

etlrules

Release Status CI Status Documentation Status

A python rule engine for applying transformations to dataframes.

ETL stands for Extract, Trasform, Load, which is a three step process to source the data from some data source (Extract), transform the data (Transform) and publish it to a final destination (Load).

Data transformation of tabular sets can be done in pure python with many dedicated python packages, the most widely recognized being pandas. The result of such transformations can be quite opaque with the logic difficult to read and understand, especially by non-coders. Even coders can struggle to understand certain transformations unless in-code documentation is added and even when documentation is available, the code change in ways which renders the documentation stale.

The etlrules package solves this by offering a set of simple rules which users can use to form a plan. The plan is a blueprint on how to transform the data. The plan can be saved to a yaml file, stored in a repo for version control or in a database for manipulation via UIs and then executed in a repeatable and predictable fashion. The rules in the plan can have names and extensive description acting as an embedded documentation as to what the rule is trying to achieve.

This data-driven way of operating on tabular data allows non-technical users to come up with data transformations which can automate various problems without the need to code. Workflows for managing change and version control can be put in place around the plans, allowing technical and non-technical users to collaborate on data transformations that can be scheduled to run periodically for solving real business problems.

High level concepts

Plan

A plan is a blueprint of how to perform extractions of tabular data, transformations of the data and how to load (ie write) the transformed data to its final destination.

A plan is a collection of rules, each of which operate on a dataframe (tabular data).

Rule

A rule is an operation performed on a dataframe. There are three types of rules: * Extract rules (aka read rules) - They will read an external data source (ie files, DBs, APIs endpoints) and bring the data into memory for processing * Transform rules - They will perform a transformation of the data (ie add a new column, modify an existing column, join columns, aggregate) * Load rules (aka write rules) - They will write the output into an external storage (ie files, DBs, APIs endpoints)

Rule engine

The component that takes a plan and executes it (rule by rule) based on an input.

Rule data

The structure that holds together any input dataframes, temporary results and the final output of a rule engine execution of a plan. The rule data can have some input dataframes or they can start as empty canvases, with the plan performing extractions/reading of data that it needs.

Backend

The underlying dataframe library to use for executing the plan. For example: pandas, vaex, polars, etc. At the moment, only pandas is supported.

Documentation

https://ciprianmiclaus.github.io/etlrules/

License

Free software: MIT

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

etlrules-0.1.1.tar.gz (54.1 kB view details)

Uploaded Source

Built Distribution

etlrules-0.1.1-py3-none-any.whl (48.8 kB view details)

Uploaded Python 3

File details

Details for the file etlrules-0.1.1.tar.gz.

File metadata

  • Download URL: etlrules-0.1.1.tar.gz
  • Upload date:
  • Size: 54.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for etlrules-0.1.1.tar.gz
Algorithm Hash digest
SHA256 377bb299eedb25a5f3130b29ab27c782a4174bae4e7f0a5c74956499d6bfa52c
MD5 b60825312e8494fa2cd566c60a7316ce
BLAKE2b-256 387c4b3192a8f38614bc47ad23cfb248f34f80d01bbc4d6a0aeead152de347d0

See more details on using hashes here.

File details

Details for the file etlrules-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: etlrules-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 48.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for etlrules-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1102e0eb7df7e41157c65419ec29ab7bc469308ac447723e29c021bb497df481
MD5 7a8eed7224c7a00c94893c57473022fb
BLAKE2b-256 25058c6cd66bc5d46ffd89d710b76be6550a8b5d1d615a9d4eb71ddb81988b82

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