Skip to content

A template for ETL data from DBMS using python with SQLAlchemy and Pyodbc

Notifications You must be signed in to change notification settings

davimmilhome/SQLAlchemy-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLAlchemy template

This is a template for connect and extract data from DBMS using SQLAlchemy and Pyodbc.


The program are structured at this way:

│   .env 
│   .env.example 
│   .gitignore 
│    main.py 
│    requirements.txt 
│
├───cfg 
│       database.py 
│
├───output 
│       .gitkeep
│ 
└───scripts
    │   .gitkeep
    │
    ├───python
    │       script_example.py
    │
    └───queries
            querie_example.py
            

Where:

database.py - responsible for setup the connection with DB

output/ - used for put output files from your exctract

scripts - folder that cotains your procedures, functions, querrys that will be called at the main.py

main.py - Program start point

.env - contains your connection and other envriomment variables. You will need to create that based on .env.example

requirements.txt - python packages setup

Dependencies

  • SQLAlchemy
  • pyodbc
  • python-dotenv
  • pandas (optional)

Using

Clone this project and install the dependencies at requirements.txt

Setup your querrys and call them on main.py using the connection as the example on code.

Treat your data using your procedures on scripts/

Save/export your data as you like :)

Authors

Davi Milhome

About

A template for ETL data from DBMS using python with SQLAlchemy and Pyodbc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages