From 7b38c87375bb91d00e18ae32ef60b6f15169a198 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Tue, 5 Jan 2021 14:23:32 +0100 Subject: [PATCH] Updated deviceId format to avoid special characters --- README.md | 2 +- _bootstrap/README.md | 2 +- akskafka-databricks-cosmosdb/README.md | 2 +- .../flink/ComplexEventJobProcessingLogicTest.java | 4 ++-- .../com/microsoft/samples/flink/data/SampleData.java | 2 +- .../microsoft/samples/flink/data/SampleRecordTest.java | 4 ++-- .../microsoft/samples/flink/data/SampleStateTest.java | 10 +++++----- eventhubs-databricks-azuresql/README.md | 2 +- eventhubs-databricks-cosmosdb/README.md | 2 +- eventhubs-databricks-delta/README.md | 2 +- eventhubs-dataexplorer/README.md | 2 +- eventhubs-functions-azuresql/README.md | 2 +- eventhubs-functions-cosmosdb/README.md | 2 +- eventhubs-streamanalytics-azuresql/README.md | 2 +- .../time-series-query-sample.sql | 2 +- eventhubs-streamanalytics-cosmosdb/README.md | 2 +- eventhubs-streamanalytics-eventhubs/README.md | 2 +- eventhubs-timeseriesinsights/README.md | 2 +- eventhubskafka-databricks-cosmosdb/README.md | 2 +- eventhubskafka-flink-eventhubskafka/README.md | 2 +- eventhubskafka-functions-cosmosdb/README.md | 2 +- hdinsightkafka-databricks-sqldw/README.md | 2 +- hdinsightkafka-flink-hdinsightkafka/README.md | 2 +- 23 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 804244aa..51ff1bf5 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/_bootstrap/README.md b/_bootstrap/README.md index f39f5895..008e6cc5 100644 --- a/_bootstrap/README.md +++ b/_bootstrap/README.md @@ -101,7 +101,7 @@ Each client generates up to 2000 msgs/sec. Each generated message is close to 1K "moreData22": 12.12345678901234 }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-1554", + "deviceId": "contoso-device-id-000554", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/akskafka-databricks-cosmosdb/README.md b/akskafka-databricks-cosmosdb/README.md index 57b87776..9fb236c5 100644 --- a/akskafka-databricks-cosmosdb/README.md +++ b/akskafka-databricks-cosmosdb/README.md @@ -105,7 +105,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/ComplexEventJobProcessingLogicTest.java b/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/ComplexEventJobProcessingLogicTest.java index 2c0d992c..f5ed479c 100644 --- a/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/ComplexEventJobProcessingLogicTest.java +++ b/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/ComplexEventJobProcessingLogicTest.java @@ -84,7 +84,7 @@ public void testProcessingLogicState() throws Exception { sampleRecord1.eventId = "4fa25e6c-50d3-4189-9613-d486b71412df"; sampleRecord1.value = 80.80967678165356d; sampleRecord1.type = "CO2"; - sampleRecord1.deviceId = "contoso://device-id-428"; + sampleRecord1.deviceId = "contoso-device-id-428"; sampleRecord1.deviceSequenceNumber = 3L; sampleRecord1.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord1.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); @@ -97,7 +97,7 @@ public void testProcessingLogicState() throws Exception { sampleRecord2.eventId = "4fa25e6c-50d3-4189-9613-d486b71412df"; sampleRecord2.value = 70.80967678165356d; sampleRecord2.type = "TEMP"; - sampleRecord2.deviceId = "contoso://device-id-428"; + sampleRecord2.deviceId = "contoso-device-id-428"; sampleRecord2.deviceSequenceNumber = 3L; sampleRecord2.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord2.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); diff --git a/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleData.java b/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleData.java index b82b7223..2bdd367c 100644 --- a/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleData.java +++ b/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleData.java @@ -10,7 +10,7 @@ public static SampleRecord record() { sampleRecord.eventId = "4fa25e6c-50d3-4189-9613-d486b71412df"; sampleRecord.value = 45.80967678165356d; sampleRecord.type = "CO2"; - sampleRecord.deviceId = "contoso://device-id-428"; + sampleRecord.deviceId = "contoso-device-id-428"; sampleRecord.deviceSequenceNumber = 3L; sampleRecord.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); diff --git a/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleRecordTest.java b/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleRecordTest.java index 097b9386..2d1bd1d7 100755 --- a/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleRecordTest.java +++ b/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleRecordTest.java @@ -18,7 +18,7 @@ public class SampleRecordTest { private SampleRecord sampleRecord; - private String serialized = "{\"eventId\":\"4fa25e6c-50d3-4189-9613-d486b71412df\",\"complexData\":null,\"value\":45.80967678165356,\"type\":\"CO2\",\"deviceId\":\"contoso://device-id-428\",\"deviceSequenceNumber\":3,\"createdAt\":\"2019-10-15T12:43:27.748Z\",\"enqueuedAt\":\"2019-10-16T12:43:27.748Z\",\"processedAt\":\"2019-10-17T12:43:27.748Z\"}"; + private String serialized = "{\"eventId\":\"4fa25e6c-50d3-4189-9613-d486b71412df\",\"complexData\":null,\"value\":45.80967678165356,\"type\":\"CO2\",\"deviceId\":\"contoso-device-id-428\",\"deviceSequenceNumber\":3,\"createdAt\":\"2019-10-15T12:43:27.748Z\",\"enqueuedAt\":\"2019-10-16T12:43:27.748Z\",\"processedAt\":\"2019-10-17T12:43:27.748Z\"}"; private JsonMapperSchema mapper = new JsonMapperSchema<>(SampleRecord.class); @@ -32,7 +32,7 @@ public void setUp() { sampleRecord.eventId = "4fa25e6c-50d3-4189-9613-d486b71412df"; sampleRecord.value = 45.80967678165356d; sampleRecord.type = "CO2"; - sampleRecord.deviceId = "contoso://device-id-428"; + sampleRecord.deviceId = "contoso-device-id-428"; sampleRecord.deviceSequenceNumber = 3L; sampleRecord.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); diff --git a/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleStateTest.java b/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleStateTest.java index 1031ee73..e2989b36 100755 --- a/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleStateTest.java +++ b/components/apache-flink/flink-kafka-consumer/src/test/java/com/microsoft/samples/flink/data/SampleStateTest.java @@ -71,7 +71,7 @@ public void getLastRecord01() { sampleRecord1.eventId = "4fa25e6c-50d3-4189-9613-d486b71412df"; sampleRecord1.value = 45.80967678165356d; sampleRecord1.type = "CO2"; - sampleRecord1.deviceId = "contoso://device-id-428"; + sampleRecord1.deviceId = "contoso-device-id-428"; sampleRecord1.deviceSequenceNumber = 3L; sampleRecord1.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord1.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); @@ -81,7 +81,7 @@ public void getLastRecord01() { sampleRecord2.eventId = "4fa25e6c-50d3-4189-9613-d486b71412df"; sampleRecord2.value = 45.80967678165356d; sampleRecord2.type = "CO2"; - sampleRecord2.deviceId = "contoso://device-id-428"; + sampleRecord2.deviceId = "contoso-device-id-428"; sampleRecord2.deviceSequenceNumber = 3L; sampleRecord2.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord2.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); @@ -100,7 +100,7 @@ public void recordsSize01() { sampleRecord1.eventId = "4fa25e6c-50d3-4189-9613-d486b71412df"; sampleRecord1.value = 45.80967678165356d; sampleRecord1.type = "CO2"; - sampleRecord1.deviceId = "contoso://device-id-428"; + sampleRecord1.deviceId = "contoso-device-id-428"; sampleRecord1.deviceSequenceNumber = 3L; sampleRecord1.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord1.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); @@ -110,7 +110,7 @@ public void recordsSize01() { sampleRecord2.eventId = "4fa25e6c-50d3-4189-9613-d486b71412df"; sampleRecord2.value = 45.80967678165356d; sampleRecord2.type = "CO2"; - sampleRecord2.deviceId = "contoso://device-id-428"; + sampleRecord2.deviceId = "contoso-device-id-428"; sampleRecord2.deviceSequenceNumber = 3L; sampleRecord2.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord2.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); @@ -133,7 +133,7 @@ public void addRecord01() { sampleRecord.eventId = Integer.toString(i); sampleRecord.value = 45.80967678165356d; sampleRecord.type = "CO2"; - sampleRecord.deviceId = "contoso://device-id-428"; + sampleRecord.deviceId = "contoso-device-id-428"; sampleRecord.deviceSequenceNumber = 3L; sampleRecord.createdAt = Instant.parse("2019-10-15T12:43:27.748Z"); sampleRecord.enqueuedAt = Instant.parse("2019-10-16T12:43:27.748Z"); diff --git a/eventhubs-databricks-azuresql/README.md b/eventhubs-databricks-azuresql/README.md index 35f6f843..79fde6bb 100644 --- a/eventhubs-databricks-azuresql/README.md +++ b/eventhubs-databricks-azuresql/README.md @@ -101,7 +101,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-databricks-cosmosdb/README.md b/eventhubs-databricks-cosmosdb/README.md index 61005768..33d2f0fd 100644 --- a/eventhubs-databricks-cosmosdb/README.md +++ b/eventhubs-databricks-cosmosdb/README.md @@ -101,7 +101,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-databricks-delta/README.md b/eventhubs-databricks-delta/README.md index 28f952bd..d20b6b6b 100644 --- a/eventhubs-databricks-delta/README.md +++ b/eventhubs-databricks-delta/README.md @@ -100,7 +100,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-dataexplorer/README.md b/eventhubs-dataexplorer/README.md index 00782a3c..b3fbc9c5 100644 --- a/eventhubs-dataexplorer/README.md +++ b/eventhubs-dataexplorer/README.md @@ -95,7 +95,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-functions-azuresql/README.md b/eventhubs-functions-azuresql/README.md index 19cbee28..064ad11f 100644 --- a/eventhubs-functions-azuresql/README.md +++ b/eventhubs-functions-azuresql/README.md @@ -106,7 +106,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-functions-cosmosdb/README.md b/eventhubs-functions-cosmosdb/README.md index 6eb5a98e..9e7e23db 100644 --- a/eventhubs-functions-cosmosdb/README.md +++ b/eventhubs-functions-cosmosdb/README.md @@ -108,7 +108,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-streamanalytics-azuresql/README.md b/eventhubs-streamanalytics-azuresql/README.md index a7cd42df..5a7f6881 100644 --- a/eventhubs-streamanalytics-azuresql/README.md +++ b/eventhubs-streamanalytics-azuresql/README.md @@ -114,7 +114,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-streamanalytics-azuresql/time-series-query-sample.sql b/eventhubs-streamanalytics-azuresql/time-series-query-sample.sql index 03442d45..040036d9 100644 --- a/eventhubs-streamanalytics-azuresql/time-series-query-sample.sql +++ b/eventhubs-streamanalytics-azuresql/time-series-query-sample.sql @@ -28,7 +28,7 @@ select top (100) from dbo.[rawdata2] r where - [r].[DeviceId] = 'contoso://device-id-154' + [r].[DeviceId] = 'contoso-device-id-000154' and r.[PartitionId] = 5 order by diff --git a/eventhubs-streamanalytics-cosmosdb/README.md b/eventhubs-streamanalytics-cosmosdb/README.md index 63e2ea90..b8c5b506 100644 --- a/eventhubs-streamanalytics-cosmosdb/README.md +++ b/eventhubs-streamanalytics-cosmosdb/README.md @@ -96,7 +96,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-streamanalytics-eventhubs/README.md b/eventhubs-streamanalytics-eventhubs/README.md index 70ab5e80..ba03cf0a 100644 --- a/eventhubs-streamanalytics-eventhubs/README.md +++ b/eventhubs-streamanalytics-eventhubs/README.md @@ -96,7 +96,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubs-timeseriesinsights/README.md b/eventhubs-timeseriesinsights/README.md index cf93d7cc..76b426cd 100644 --- a/eventhubs-timeseriesinsights/README.md +++ b/eventhubs-timeseriesinsights/README.md @@ -98,7 +98,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubskafka-databricks-cosmosdb/README.md b/eventhubskafka-databricks-cosmosdb/README.md index be5f3e5d..c8f9baa8 100644 --- a/eventhubskafka-databricks-cosmosdb/README.md +++ b/eventhubskafka-databricks-cosmosdb/README.md @@ -101,7 +101,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubskafka-flink-eventhubskafka/README.md b/eventhubskafka-flink-eventhubskafka/README.md index 2409958c..2d706add 100644 --- a/eventhubskafka-flink-eventhubskafka/README.md +++ b/eventhubskafka-flink-eventhubskafka/README.md @@ -104,7 +104,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/eventhubskafka-functions-cosmosdb/README.md b/eventhubskafka-functions-cosmosdb/README.md index 92208440..2d55e7e3 100644 --- a/eventhubskafka-functions-cosmosdb/README.md +++ b/eventhubskafka-functions-cosmosdb/README.md @@ -108,7 +108,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/hdinsightkafka-databricks-sqldw/README.md b/hdinsightkafka-databricks-sqldw/README.md index 923a6264..bad540d3 100644 --- a/hdinsightkafka-databricks-sqldw/README.md +++ b/hdinsightkafka-databricks-sqldw/README.md @@ -102,7 +102,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z" diff --git a/hdinsightkafka-flink-hdinsightkafka/README.md b/hdinsightkafka-flink-hdinsightkafka/README.md index 03235a72..99e8e717 100644 --- a/hdinsightkafka-flink-hdinsightkafka/README.md +++ b/hdinsightkafka-flink-hdinsightkafka/README.md @@ -101,7 +101,7 @@ Streamed data simulates an IoT device sending the following JSON data: [...] }, "value": 49.02278128887753, - "deviceId": "contoso://device-id-154", + "deviceId": "contoso-device-id-000154", "deviceSequenceNumber": 0, "type": "CO2", "createdAt": "2019-05-16T17:16:40.000003Z"