The original c# version project address is https://github.com/Azure/azure-event-hubs/tree/master/samples/e2e/EventHubsCaptureEventGridDemo.
- Python 3.6
- Docker
- SQL Server Driver 13/17
- Read through the README of original project
- Follow the steps in https://github.com/Azure/azure-event-hubs/tree/master/samples/e2e/EventHubsCaptureEventGridDemo to deploy the infrastructure except for the Functions App.
- Create a Function App on Azure. Choose Linux as the OS and Python as the Runtime Stack.
- Follow the steps in https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python and https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python to to publish the local EventGridTriggerMigrateData function to the Function App created on Azure.
- If you have an existing resource group named myResourceGroup with any non-Linux App Service apps, you must use a different resource group. You can't host both Windows and Linux apps in the same resource group.
- Configure the Application Settings of the Functions App. Set StorageConnectionString and PythonSqlDwConnection.
- Add Event Grid subscription to the Functions App which is described in https://github.com/Azure/azure-event-hubs/tree/master/samples/e2e/EventHubsCaptureEventGridDemo.
- Using your own EVENTHUB_CONNECTION_STRING and EVENTHUB_NAME in program.py.
- Run program.py to generate data
-
Create your first Python function in Azure (preview): https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python
-
Azure Functions Python developer guide: https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python
-
Migrate Captured Event Hubs data to a SQL Data Warehouse using Event Grid and Azure Function: https://github.com/Azure/azure-event-hubs/tree/master/samples/e2e/EventHubsCaptureEventGridDemo