Skip to main content
Skip table of contents

Azure Data Explorer (ADX)

JVM AGENT

Item Type Support

SIGNALS ASSETS

Overview

The ADX connector enables Seeq to access data from Azure Data Explorer clusters. Configuring the connector with more complex data requires some knowledge of Microsoft’s Kusto query language. The Seeq connector for ADX is capable of replicating Asset Trees, accessing sample data, and synching signal properties (metadata).

Prerequisites

There are a couple of pieces of information that should be gathered prior to configuring a connection to ADX.

Cluster Information

The Seeq connector will need the URI of the Azure Data Explorer cluster. This can be found within the Azure Portal in the Overview section for the Azure Data Explorer cluster you wish to connect to. You will want to take note of the value in the URI property.

Authentication

ADX must be appropriately configured with Azure Active Directory in order to connect it with Seeq.

In order to connect Seeq to your Azure Data Explorer cluster you will need to enable application authentication for Azure Active Directory as described here. Once the application registration is completed and the client secrets are generated you will need to take note of three properties:

Either authentication option requires the Azure AD TenantId.

ADX Database Access

The service principal created for access to ADX must have Viewer rights to the database and associated data.

Configuration

This is an example configuration template that is displayed in the Additional Configuration box that appears when you click Configure for an existing datasource (or if a new datasource is being created, in the Create new datasource connection modal that appears after clicking Add Datasource) on the Datasources administration page.

CODE
{
    "RootAssetName": null,
    "GenerateTableAsset": true,
    "Tables": [
        {
            "Id": "ADX Table Definition 1",
            "Name": null,
            "NameQuery": null,
            "GroupBy": null,
            "GroupByLimit": 0,
            "DataColumns": null,
            "DataColumnQuery": null,
            "TimeColumn": null,
            "LastGroupAsSignalName": false,
            "TransformQuery": null,
            "TimeUnit": null,
            "ComputedGroupByResult": null,
            "GroupByRequestProperties": null,
            "DataRequestProperties": null,
            "MetadataQuery": {
                "TableName": null,
                "Filters": null,
                "Columns": null,
                "UniqueKeyColumnName": null
            },
            "SignalPropertiesMap": null
        }
    ],
    "ApplicationId": null,
    "AccessKey": null,
    "TenantId": null,
    "UserName": null,
    "UserPassword": null,
    "Cluster": null,
    "Database": null
}
ADX Additional Configuration

Property Name

Default Value

Data Type

Description

RootAssetName

null

String

If null, the connector will use the Database Name as the root asset within an Asset Tree in Seeq. If a value is filled in, then the value entered will be used as the root asset in Seeq.

GenerateTableAsset

true

Boolean

If true, the ADX table name will be used as the first level child to the Root Asset in the Seeq Asset Tree. If false, the table name will not be used in the Asset Tree.

Tables

Empty TableDefinition

TableDefinition

An array of table definitions, each table definition can target one ADX table or stored function. You can have multiple table definitions per connection. See: TableDefinition below

ApplicationId

null

String

The Application ID that was generated as the result of creating an Azure Active Directory application registration in Azure Data Explorer

AccessKey

null

String/SecretFile

This is the Secret that is generated as the result of creating a new client secret for the service principal. It is recommended to leverage a Secrets File to store this information.

TenantId

null

String

The ID of the Active Directory Tenant in which the Service Principal was created.

Cluster

null

String

The URI of the Azure Data Explorer cluster.

Database

null

String

The ADX Database that will be accessed with this connector.

TableDefinition Configuration

Property Name

Default Value

Data Type

Description

Id

ADX Table Definition 1

String

Each table definition in the Tables array must have a unique Id. It does not need to be a UUID, but can be any unique name within the connection that is used to refer to a specific table definition. A brief yet descriptive name is recommended for logging purposes.

Name

null

String

The name of the ADX Table or Stored function where the data resides. Must be NULL if using a NameQuery

NameQuery

null

KQL String

Specifies a Kusto query, allowing you to use the table definition as a template for multiple tables with the same schema. This query must return a tabular result with a single column containing the names of the tables you wish to index.

GroupBy

null

Array[String]

Specifies the columns (in order) whose values should form the asset tree. In other words, the values in the data columns will be filtered into separate signals based on each unique path formed by the values in the GroupBy columns.

GroupByLimit

0

integer

Limits the number of group by matches. 0 is unlimited. Should only be used if there is a performance problem during indexing. This is only a troubleshooting step to identify the bottleneck. If this addresses the issue, an alternate data model should be considered to ensure Seeq has access to all the intended data.

DataColumns

null

Array[String]

An array of columns that specify in which columns the data is stored.

DataColumnQuery

null

String

A Kusto query that identifies columns that contain data values.

TimeColumn

null

String

The column name in the table that contains the time index. This column can either be a DateTime or a numeric value in seconds, milliseconds, or nanoseconds from the epoch. The numeric representation must be used in conjunction with TimeUnit. NOTE: When using plain numbers (representing a time unit from the epoch) the column type must be long (for whole time units) or real (for fractional time units). The decimal type is not supported for a time unit index. String-typed columns will be parsed from formats as follows:

  • ISO 8601 string with time zone, e.g. 2011-12-03T10:15:30Z

  • ISO 8601 string with offset, e.g. 2011-12-03T10:15:30+01:00

LastGroupAsSignalName

false

Boolean

If false, the last element in the asset tree will not be used as the signal name, and the column name will be used as the signal name. If true, the last element in the asset tree will be used as the signal name. For usage see: Example: Accessing Data from an Entity-Timestamp-Value Data Model

TransformQuery

null

String

Takes an optional Kusto query which is applied to the original table to produce a result table. See: Using Transform Queries in the Seeq ADX Connector

TimeUnit

null

Time String (“s”, “ms”, “ns”)

When using a numeric value as time from the epoch as the timestamp, specify if the numeric value is seconds, milliseconds, or nanosecond from the epoch. Must be null if the timestamp data type is DateTime.

ComputedGroupByResult

null

String

A Kusto query that defines a pre-computed distinct asset group. This is generally used in conjunction with a materialized view to identify the asset hierarchies. MetadataQuery should be used instead if your cluster is using the Kusto Engine V3.

Note that the ComputedGroupByResult view/query must contain all the columns listed in the GroupBy

GroupByRequestProperties

null

Map{“property”:”value”}

Allows for Seeq to pass Client Request Properties during the indexing queries. The property is the name of the client request property to set, the value is the value for that property. (i.e. { 2 "servertimeout" : "90s"} )

DataRequestProperties

null

Map{“property”:”value”}

Allows for Seeq to pass Client Request Properties during the data queries. The property is the name of the client request property to set, the value is the value for that property. (i.e. { 2 "servertimeout" : "90s"} )

MetadataQuery

Empty MetadataQuery

MetadataQuery

Allows for a metadata table (dimension table) to be specified to identify asset hierarchies and signal properties. For type definition see: MetadataQuery. For usage see: Example: Accessing Metadata and Value Data

SignalPropertiesMap

null

Map{“property”:”columnName”}

A dictionary that maps metadata columns to signal properties. The property is the Seeq Signal property, the column name is the MetadataQuery column name that the value should be provided by. For usage see: Example: Accessing Metadata and Value Data

MetadataQuery Configuration

Property Name

Default Value

Data Type

Description

TableName

null

String

The ADX table name to use for the metadata (dimension) information.

Filters

null

String

A Kusto predicate that can be used to filter the metadata results.

Columns

null

Array[String]

An array of columns that includes any group by information or signal property information.

UniqueKeyColumnName

null

String

The column name used as a key between the dimension (metadata) and fact (data) tables

Examples

Getting Started With Accessing Tabular Data

This guide introduces the concepts of the Seeq connector for ADX and shows how to connect to a tabular data model in ADX from Seeq.

Accessing Data from an Entity-Timestamp-Value Data Model

This guide will explain how to leverage ADX to access data that has been stored in an Entity-Timestamp-Value model. This model is most useful when there are a large number of signals that need to be accessed from a single table.

Accessing Asset Tree Data from an Entity-Timestamp-Value Model

This guide expands on accessing the Entity-Timestamp-Value model and adds the ability to retrieve asset tree (hierarchy) information from ADX metadata.

Accessing Metadata and Value Data from ADX from within Seeq

This guide shows you how to access data that is stored in a dimension and fact table in ADX. This is a popular model choice as it allows for flexibility in the metadata (the dimension table) while allowing the value table (fact table) to grow.

Using Transform Queries in the Seeq ADX Connector

The TransformQuery parameter takes an optional Kusto query which is applied to the original table to produce a result table. This parameter can be useful when initially designing your query to perform any sort of preprocessing.

Using Materialized Views to Increase Indexing Performance

If you a leveraging a single large denormalized table that contains both metadata and data, especially if there is a large number of group by columns, the indexing performance of the connector might be slow or unable to complete without a timeout. To overcome this, a materialized view can be used within ADX to precompute the Asset Tree information. Note: this is not generally an ideal model, see here: Example: Accessing Data from an Entity-Timestamp-Value Data Model.

Querying ADLS using the ADX Connector and External Tables

An effective mechanism to query data in an Azure Data Lake Gen 2 storage account is to leverage external tables through ADX and then use the ADX connector to read the data. Do note that performance is highly dependent on the source data format and the partitioning scheme within ADLS. You can find more information about external tables here https://docs.microsoft.com/en-us/azure/data-explorer/kusto/management/external-tables-azurestorage-azuredatalake .

Known Issues

No BigDecimal Support

There is currently an issue with the Big Decimal type received via the Kusto Client that the Seeq connector uses to connect to ADX. If the column in the ADX table is typed as System.Data.SqlTypes.SqlDecimal, then the client will cast that value to a string. A user would see this problem as a red triangle on the signal with the following error message.

A simple (yet potentially limiting) workaround is to leverage a transform function such as | extend Temp = toreal(Temperature) to cast the value to a real instead of a decimal. This issue will be addressed in a future version of Seeq.

Using a String-typed UniqueKeyColumnName That has Special Characters

If a value for the column in UniqueKeyColumnName has special characters, it is suggested to use a stored function to escape the result.

Leveraging GroupBy or Signal names containing the | operator

When trying to trend values for signals with a name that has a | operator or signals that are contained in assets with | in the name, the query will fail. This is a known issue, and is being worked on. At the moment the only resolution is to avoid using that operator in asset or signal names in ADX.

Please report any other issues you find to our support portal.

Troubleshooting

If you are running into issues with connecting to or access data from ADX, view our Troubleshooting guide to ADX or our general guidance on troubleshooting datasource issues.

Performance considerations

The ADX connector has some specific Performance Considerations to consider. Additionally, view our guide on optimizing datasource performance for general guidance.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.