Skip navigation

Azure Digital Twins with Time Data History Connection

Last updated: 2022-07-10

This template creates an Azure Digital Twins instance configured with a time series data history connection. In order to create a connection, other resources must be created such as an Event Hubs namespace, an event hub, Azure Data Explorer cluster, and a database. Data is sent to an event hub which eventually forwards the data to the Azure Data Explorer cluster. Data is stored in a database table in the cluster

This Azure Resource Manager template was created by a member of the community and not by Microsoft. Each Resource Manager template is licensed to you under a licence agreement by its owner, not Microsoft. Microsoft is not responsible for Resource Manager templates provided and licensed by community members and does not screen for security, compatibility, or performance. Community Resource Manager templates are not supported under any Microsoft support programme or service, and are made available AS IS without warranty of any kind.

Parameters

Parameter Name Description
digitalTwinsName Name given to Digital Twins resource
eventHubsNamespaceName Name given to Event Hubs namespace resource
eventHubName Name given to event hub resource
adxClusterName Name given to Azure Data Explorer cluster resource
databaseName Name given to database
databaseTableName Name given to table in database
eventHubsNamespacePlan Event Hubs namespace SKU option
eventHubsNamespaceTier Event Hubs namespace SKU billing tier
eventHubsNamespaceCapacity Event Hubs throughput units
clusterPlan Azure Data Explorer cluster SKU option
clusterCapacity Azure Data Explorer cluster capacity
clusterTier Azure Data Explorer cluster tier
retentionInDays Number of days to retain data in event hub
partitionCount Number of partitions to create in event hub
hotCachePeriod The time to keep database data in cache
softDeletePeriod The time data is kept in database
principalId The id that will be given data owner permission for the Digital Twins resource
principalType The type of the given principal id
location Location of to be created resources

Use the template

PowerShell

New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.digitaltwins/digitaltwins-with-function-time-series-database-connection/azuredeploy.json
Install and configure Azure PowerShell

Command line

az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.digitaltwins/digitaltwins-with-function-time-series-database-connection/azuredeploy.json
Install and Configure the Azure Cross-Platform Command-Line Interface