Robaws DWH Azure Deployment
Basic steps:
-
Refresh Token
- get a refresh token (see dhw-robaws-installation-authentication)
-
Azure SQL database
- Create an Azure SQL Database Server if necessary or not already created
- Create an Azure SQL Database with DTU model, if necessary, and create the users. Keep the password of the
db-readerfor later. See sql-server-installation for details. - Create the initial configuration by running the update script:
code/sql/update sql dwh.sql(see: product-dwh-robaws/code/sql/update sql dwh.sql at main · pwrp/product-dwh-robaws) - add / change configurations for the client by modifying entries in
config.robaws_Tables - You should now have:
- a schema config (if not already existing from an additional DWH product installation)
- a schema robaws
- a table config.robaws_Tables
-
Key Vault
- Create a key-vault if necessary. See key-vault-installation .
- Store the refresh token as a secret with name
robaws-refresh-token
-
Azure Function in Azure, create an Azure Function af-installation, specifically with
- service plan: B1 (to avoid timeouts but depends on customer Y1 also works)
- python 3.10 (11 doesn't contain SQL Server driver)
- name:
xxx-pwrp-robaws-af - Deploy the AF:
pwrp/product-dwh-robaws/code/af(see: product-dwh-robaws/code/af at main · pwrp/product-dwh-robaws)
-
ADF in Azure, create an Azure Data Factory adf-installation
- configure the Azure Function as a service
- configure the Azure SQL DWH as a service
- load the ARM template from
pwrp/product-dwh-robaws/code/adfinto ADF - configure a trigger for the ADF pipeline
- publish
Additional important information!
Since the Robaws API can return inconsistent custom fields or additional nested structure fields for single entries within a response, every endpoint needs to be tested with the AF in VSCode to see if a column mismatch causes a failure when downloading. If this happens check the __init__.py file in github (see: product-dwh-robaws/code/af/CopyRobaws2SQL_http at main · pwrp/product-dwh-robaws) to see how to solve the issue!!