umed / xl2pgtable

It's a python library to upload directory of Excel files into PostgreSQL database.
MIT License
3 stars 2 forks source link

Implement column mapping generator #16

Open umed opened 5 years ago

umed commented 5 years ago

Implement mapping generator. Mappings describe how tables will be presented in the database.

As input should take Excel file with following columns:

Link File name Format Table name Department name Uploading type

As output should produce Excel file with following columns:

Table name Code Name_rus Data type Length PK FK Check Null Comment

It must be module on uploader level with mapping_generator name.

Create folder named mapping_generator in the root of project. Reuse uploader/excel_helper.py. It has function named read_excel that tuple of two items:

mapping_generator must be usable either as library or executable module.

As library there should be function that we can import and call it with arguments:

As executable use argparse and add to two params as described above.