DP-700 · Question #101
You have a Fabric workspace that contains an eventhouse named Eventhouse1. In Eventhouse1, you plan to create a table named DeviceStreamData in a KQL database. The table will contain data based on…
This question tests your ability to design and create a KQL table schema in a Microsoft Fabric Eventhouse that correctly maps column data types - particularly for semi-structured (JSON) data using the 'dynamic' type.
Question
| Timestamp | DeviceId | StreamData |
|---|---|---|
| 2024-05-18 | 81410f30-60a2-4e75- | {"Index": 0, "eventId": "70f0f4e0-be30-4559-bb5e-59feade642f6", "isActive": true, "latitude": 5.390013, "longitude": -60.120235, "Tags": ["tempor"]} |
| 12:45:17.30526 | 8619-2abde4869755 | |
| 2024-05-18 | bb6d6e1e-02aa-4e17- | {"Index": 0, "eventId": "703222b2-fbcb-43c0-82d6-ecd49a990bf5", "isActive": true, "latitude": -56.153786, "longitude": 130.870907, "Tags": ["adipisicing"]} |
| 12:45:21.76423 | 8cba-116cd4458d52 | |
| 2024-05-18 | 717bf67d-0e5d-498f- | {"Index": 0, "eventId": "05730280-0d4a-41f8-8e59-f75e200930a9", "isActive": true, "latitude": -21.39209, "longitude": 123.959442, "Tags": ["cull"]} |
| 12:45:23.98642 | 9f21-e60aaf258056 | |
| 2024-05-18 | 1a390b71-af4f-4df5- | {"Index": 0, "eventId": "00929141-8092-4d16-89eb-002f9f57e2bb", "isActive": true, "latitude": -84.926214, "longitude": -11.498907, "Tags": ["ex"]} |
| 12:45:31.39523 | 4f7d-2316d6d001f7 | |
| 2024-05-18 | 2f0ba7d0-6dff-4081- | {"Index": 0, "eventId": "08842b87-c0b4-48b2-99f0-4fb5c75ff6f3", "isActive": true, "latitude": -49.909339, "longitude": -177.505775, "Tags": ["laboris"]} |
| 12:45:37.43343 | 8f7f-dd039564c3260 |
Explanation
This question tests your ability to design and create a KQL table schema in a Microsoft Fabric Eventhouse that correctly maps column data types - particularly for semi-structured (JSON) data using the 'dynamic' type.
Approach. The correct approach is to issue a .create table command in the KQL database that maps each column to the appropriate Kusto data type: Timestamp should be datetime, DeviceId should be string (since it holds GUIDs as text), and StreamData should be dynamic - the Kusto type designed to store JSON objects and arrays without a fixed schema. The command would look like: .create table DeviceStreamData (Timestamp: datetime, DeviceId: string, StreamData: dynamic). Using dynamic is critical because the StreamData field contains nested JSON with mixed types (strings, booleans, floats, arrays), which cannot be flattened into fixed columns at ingestion time. Once stored as dynamic, individual JSON fields can be queried later using dot notation or parse_json().
Concept tested. KQL table creation in Microsoft Fabric Eventhouse - specifically, choosing the correct column data types (datetime, string, dynamic) for structured and semi-structured (JSON) streaming data using the .create table DDL command.
Reference. Microsoft Learn: 'Create a table in a KQL database' and 'Scalar data types in Azure Data Explorer / Kusto' - dynamic type documentation
Topics
Community Discussion
No community discussion yet for this question.