az dt data-history connection create
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.30.0 or higher). The extension will automatically install the first time you run an az dt data-history connection create command. Learn more about extensions.
Creates a data history connection between a Digital Twins instance and supported resources.
Commands
| az dt data-history connection create adx |
Creates a data history connection between a Digital Twins instance and an Azure Data Explorer database. Requires pre-created Azure Data Explorer and Event Hub resources. |
az dt data-history connection create adx
Creates a data history connection between a Digital Twins instance and an Azure Data Explorer database. Requires pre-created Azure Data Explorer and Event Hub resources.
Will prompt the user to add the following roles and permissions on the Digital Twins instance needed to successfully create the connection:
- 'Contributor' role for the Azure Data Explorer Database scope
- 'Database Admin' permission for the Azure Data Explorer Database scope
- 'Azure Event Hubs Data Owner' role for the Event Hub scope.
az dt data-history connection create adx --adx-cluster-name
--adx-database-name
--cn
--dt-name
--eh
--ehn
[--adx-resource-group]
[--adx-subscription]
[--adx-table-name]
[--ehc]
[--ehg]
[--ehs]
[--no-wait]
[--resource-group]
[--yes]
Examples
Adds a data history connection to a target Digital Twins instance with the $Default Event Hub consumer group.
az dt data-history connection create adx -n {instance_name} --cn {time_series_database_connection_name} --adx-cluster-name {adx_cluster_name} --adx-database-name {adx_database_name} --eventhub {event_hub} --eventhub-namespace {event_hub_namespace}
Adds a data history connection to a target Digital Twins instance with a custom Azure Data Explorer table name and Event Hub consumer group.
az dt data-history connection create adx -n {instance_name} --cn {time_series_database_connection_name} --adx-cluster-name {adx_cluster_name} --adx-database-name {adx_database_name} --adx-table-name {adx_table_name} --eventhub {event_hub} --eventhub-namespace {event_hub_namespace} --eventhub-consumer-group {event_hub_consumer_group}
Adds a data history connection to a target Digital Twins instance integrating with an Event Hub and Azure Data Explorer instances in different resource groups and subscriptions from the target instance.
az dt data-history connection create adx -n {instance_name} --cn {time_series_database_connection_name} --adx-cluster-name {adx_cluster_name} --adx-database-name {adx_database_name} --adx-resource-group {adx_resource_group} --adx-subscription {adx_subscription} --eventhub {event_hub} --eventhub-namespace {event_hub_namespace} --eventhub-resource-group {event_hub_resource_group} --eventhub-subscription {event_subscription}
Adds a data history connection to a target Digital Twins instance with the $Default Event Hub consumer group and skip the role assignment prompts.
az dt data-history connection create adx -n {instance_name} -y --cn {time_series_database_connection_name} --adx-cluster-name {adx_cluster_name} --adx-database-name {adx_database_name} --eventhub {event_hub} --eventhub-namespace {event_hub_namespace}
Required Parameters
Name of Azure Data Explorer cluster to integrate with.
Name of Azure Data Explorer database to integrate with.
Name of data history connection.
Digital Twins instance name.
Name of EventHub to integrate with.
EventHub Namespace identifier.
Optional Parameters
Name of Azure Data Explorer resource group. If not provided, will use the Digital Twin's resource group.
Name or ID of subscription where the Azure Data Explorer exists. If not provided, will use the subscription that contains the Digital Twin Instance.
Name of Azure Data Explorer table to be created. If not provided, will use the format adt_dh_{dt_name}_{dt_location}.
The EventHub consumer group to use when ADX reads from EventHub.
Name of EventHub resource group. If not provided, will use the Digital Twin's resource group.
Name or ID of subscription where the EventHub exists. If not provided, will use the subscription that contains the Digital Twin Instance.
Do not wait for the long-running operation to finish.
Digital Twins instance resource group. You can configure the default group using az configure --defaults group=<name>.
Do not prompt for confirmation when assigning required roles.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
Submit and view feedback for