How do I stream event hub data into a spark dataframe with below details:
- Service Principal
- Event hub namespace
- Event hub name
- Consumer group
I need to get data into spark dataframe. I do not have event hub connection string.
How do I stream event hub data into a spark dataframe with below details:
I need to get data into spark dataframe. I do not have event hub connection string.
One of the workaround is as follows
Step 1 : Generate the connection string using either of the below commands.
Getting the connection string with Azure CLI
az eventhubs namespace authorization-rule keys list --resource-group MYRESOURCEGROUP --namespace-name MY
Getting the connection string with Azure PowerShell
Get-AzEventHubKey -ResourceGroupName MYRESOURCEGROUP -NamespaceName MYEHUBNAMESPACE -Aut
Step 2 : Then, For reading the data you can follow either of the examples Example1 ,Example2.
REFERENCES: