This repository contains a simple python script that will allow us to build an API for fetching customer data from SNOWFLAKE'S sample Data Warehouse / Database
- Flask
pip install flask
- Snowflake Python Conncetor
pip install snowflake-connector-python==<version>
- Pandas
pip install pandas
The file "snowflake_flask_api.py" contains the API script and relies on certain libraries to function . Kindly ensure you have a Snowflake account setup and credentials ready.
Export the following SNOWFLAKE credntials as Environmental Variables to be able to run the Flask App locally :
export SNOWFLAKE_USERNAME ='your username'
export SNOWFLAKE_PASSWORD ='your password'
export SNOWFLAKE_ACCOUNT ='your snowflake account'
Kindly execute the code when all the conditions above have been satisfied :
python snowflake_flask_api.py
On postman , make a post request using :
{
"market_segment": "BUILDING"
}