Page Type | Languages | Key Services | Tools |
---|---|---|---|
Sample | PowerShell Python |
Azure SQL Database | Power Apps |
This codebase is only a proof-of-concept, not a production application, and should only be used to evaluate the technologies and serve as a foundational example.
- An Azure Subscription - for hosting cloud infrastructure
- Az CLI - for deploying Azure infrastructure as code
- License for Power Platform - to log into Power Apps and Power BI
- Python - for running simulation + Python development
- A SQL development environment like Azure Data Studio - for SQL development and analysis
Whether provisioning the SQL instance via Portal or CLI, a file called pass.txt
needs to be created in the infra/
folder, and the SQL server password needs to be placed in the file.
To deploy in Azure Portal:
- Follow this quickstart guide.
To deploy with Az CLI:
- Add the desired resource names and configurations in
infra/config.json
. - Run the script
infra/sql.ps1
. - This will create a Resource Group, SQL Server, and a SQL Database.
Creating the tables:
- In the SQL development environment (e.g., Azure Data Studio), open and run the
.sql
scripts insql/tables
. This will create the following tables emulating a warehouse management system:- Inventory fact table
- Orders dimension table
- Product dimension table
- Suppliers dimension table
- The data model can be seen in this diagram.
- Import the Power App from
powerapp/package.zip
into your Power Apps environment.- Update the database credentials with the credentials of the database created above.
- The code in
simulation/main.py
is used to populate the database with simulated data and generate barcodes. In addition to creating thepass.txt
file as stated above, the server connection variables need to be updated in theinfra/config.json
to reflect the proper SQL server credentials. Both the Python & PowerShell scripts useconfig.json
andpass.txt
.
A diagram visually describing the components in Azure and Power Platform.
- The developer(s) perform the following tasks...
- Pushes code/schema updates out to the SQL instance in Azure.
- Publishes updates to the Power App.
- Run the simulation (
simulation/main.py
) to populate the database and generate codes.
- Users access the scanner app via the Power App on their mobile device.
- The Power App is used to scan QR/barcodes.
- When codes are scanned, the data read is parsed and written to the database.