ADX CSV ingestion mapping swapped Ordinals

Kovács, Ferenc
61
Reputation points
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!
Sign in to answer