ADX CSV ingestion mapping swapped Ordinals

Kovács, Ferenc 61 Reputation points
2023-02-07T19:49:28.26+00:00

User's image

We have automated creating IoT Hub ingestion via the C# libraries:

 var dataConnection = kustoClient.DataConnections.CreateOrUpdate(
          this.config.ResourceGroupName,
          this.config.ClusterName,
          this.userData.DatabaseName,
          dataConnectionName.ToLowerInvariant().Substring(0, Math.Min(dataConnectionName.Length, 40)),
          new IotHubDataConnection(
            iotHubClient.IotHubResource.Get(this.userData.IotHubResourceGroupName, this.userData.IotHubName).Id,
            sharedAccessPolicyName: this.config.IotHubSharedAccessPolicy,
            consumerGroup: this.config.IotHubConsumerGroupName,
            location: this.config.ClusterLocation,
            tableName: this.config.LandingZoneTableName,
            eventSystemProperties: new[]
            {
              "iothub-connection-device-id",
              "iothub-enqueuedtime
            },
            mappingRuleName: this.config.MappingRuleName,
            dataFormat: IotHubDataFormat.SOHSV
          ));

For 3 or 4 years, Ordinal 0 was the enqueued time and Ordinal 1 was device ID.

Now, when I rerun the exact same procedure to set up ingestion from a new Iot Hub, Ordinal 0 is device ID and Ordinal 1 is enqueue time.

How can this be so unstable? Is there any rule for how the columns are mapped to Ordinals? Is there an easy way to debug these mapping mismatch issues? The first time I set this up, it was with trial and error I figured out the columns. When was this change introduced?

Thank you!

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
554 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.