Demo of a Custom Data Entry App you can build for your Azure SQL Database and Microsoft Fabric Warehouse and Lakehouse using python framework called Streamlit.
This demo uses a python framework called streamlit to accelerate the development of browser based solutions. In this demo you will find pages that enables you:
Azure SQL DB:
Microsoft Fabric:
Open a Terminal in VS Code
Download the code to your machine:
git clone https://github.com/7effrey89/streamlit_azuresqldb_fabric.git
Configure your Azure SQL Database connection Modify .streamlit/secrets.toml with your details:
database = "<database-name>"
username = "<sql-username>"
password = "<sql-password>"
Modify each of the .py files to target the table you want to interact with:
Example: DataEditorAzureSQTable.py:
DATABASE = '<name-of-database>'
TABLE_SCHEMA = '<name-of-schema>'
TABLE_NAME = '<name-of-table>'
Run the streamlit app:
python -m streamlit run main.py
I've included a troubleshooting.txt with all the packages and their listed versions that was installed on my machine - just in case that becomes relevant for you one day...
I've also made the solution ready for you to run it on a container. You can modify the solutions to your liking - if you add more packages to the solution, remember to include them in the requirement.txt file so they will be included in the docker image when you build it.
cd c:\streamlit_azuresqldb_fabric
start docker desktop on your local machine
Building Docker Image using the details from the file Dockerfile, and call it streamlit_azuresqldb_fabric
docker build -f Dockerfile -t streamlit_azuresqldb_fabric .
docker run -p 80:8501 streamlit_azuresqldb_fabric