No project description provided
Project description
Social Finance Data Pipeline
This is a package that aims to standerdise one or more datasets against a defined schema. It is currently in it's very early stagies.
check the wiki for more details on the plan.
Current status
Current the pipeline only works with xml files and is limited to one schema and one file. It's a first generic approach, that was tested against CIN and SWWF datasets.
It covers partially the following steps described in the wiki:
- Identify - identifies the stream of data against the schema. only for XML files for now.
- Convert - Tries to converts the datatypes and throws a warning when not possible. It uses the xsdata package for it.
- Normalise - adds the primary and foreign keys for each record.
How to run
Check the demo.py file. It has 2 functions that run against the CIN and SWWF datasets present in the samples directory.
There's also smaller samples of those datasets.
This methods will print a set of dataframes for each dataset.
Improvements
There's still a lot to be done. Besides completing what's in the wiki, here are some things I believe should be done first:
-
Datastore - the values are directly pulled to a tablib databook in a very unneficcient nested for loop. This is a big no. We should use RTOF datstore for this.
-
Datatypes It should be possible to define the way we want to export the datatypes. maybe the user wants the dates to come out in a the "dd-mm-yyyy" format when exporting. Or maybe they want just mm-yyyy. This should be possible. Currently, I'm assuming this in export_value. But it should be adjusted.
-
path vs context - I was using path as a reference for where the each node sits in the hierarchy. However, having a tuple in the context is probably a better approach. I'm currently using both, this should not be the case - use just the context.
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
Built Distribution
File details
Details for the file sfdata-0.1.1.tar.gz
.
File metadata
- Download URL: sfdata-0.1.1.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 028bbc5306e58d8b32877e5ebb233b5801a66da55a0fd46f0ef74d62f269ec47 |
|
MD5 | eb9c9f5ed91912399c26cfcf99206a59 |
|
BLAKE2b-256 | 2e9298668c84206681858933098fc4fbd628938355e8b8586aab610c9c26e9ff |
Provenance
File details
Details for the file sfdata-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: sfdata-0.1.1-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3cb63cf1599151636a6f881c5d2778b0b3d73bd9040b7d7c6ae5ad5c2f86457 |
|
MD5 | cccd4767cb1c86477217d9c484ae991d |
|
BLAKE2b-256 | 67f6dbc494cc9fbccc62d1401b9b75e7d482012b6288aa184013823617da1e49 |