Skip to main content

data_connections

Creates, updates, deletes, gets or lists a data_connections resource.

Overview

Namedata_connections
TypeResource
Idazure.data_explorer.data_connections

Fields

NameDatatypeDescription
kindstringKind of the endpoint for the data connection
locationstringResource location.

Methods

NameAccessible byRequired ParamsDescription
getSELECTclusterName, dataConnectionName, databaseName, resourceGroupName, subscriptionIdReturns a data connection.
list_by_databaseSELECTclusterName, databaseName, resourceGroupName, subscriptionIdReturns the list of data connections of the given Kusto database.
create_or_updateINSERTclusterName, dataConnectionName, databaseName, resourceGroupName, subscriptionId, data__kindCreates or updates a data connection.
deleteDELETEclusterName, dataConnectionName, databaseName, resourceGroupName, subscriptionIdDeletes the data connection with the given name.
updateUPDATEclusterName, dataConnectionName, databaseName, resourceGroupName, subscriptionId, data__kindUpdates a data connection.
check_name_availabilityEXECclusterName, databaseName, resourceGroupName, subscriptionId, data__name, data__typeChecks that the data connection name is valid and is not already in use.
data_connection_validationEXECclusterName, databaseName, resourceGroupName, subscriptionIdChecks that the data connection parameters are valid.

SELECT examples

Returns the list of data connections of the given Kusto database.

SELECT
kind,
location
FROM azure.data_explorer.data_connections
WHERE clusterName = '{{ clusterName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new data_connections resource.

/*+ create */
INSERT INTO azure.data_explorer.data_connections (
clusterName,
dataConnectionName,
databaseName,
resourceGroupName,
subscriptionId,
data__kind,
location,
kind
)
SELECT
'{{ clusterName }}',
'{{ dataConnectionName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__kind }}',
'{{ location }}',
'{{ kind }}'
;

UPDATE example

Updates a data_connections resource.

/*+ update */
UPDATE azure.data_explorer.data_connections
SET
location = '{{ location }}',
kind = '{{ kind }}'
WHERE
clusterName = '{{ clusterName }}'
AND dataConnectionName = '{{ dataConnectionName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND data__kind = '{{ data__kind }}';

DELETE example

Deletes the specified data_connections resource.

/*+ delete */
DELETE FROM azure.data_explorer.data_connections
WHERE clusterName = '{{ clusterName }}'
AND dataConnectionName = '{{ dataConnectionName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';