AZ-220 : Microsoft Azure IoT Developer : Part 03

  1. You have an Azure IoT solution that includes an Azure IoT Hub named Hub1 and an Azure IoT Edge device named Edge1. Edge1 connects to Hub1.

    You need to deploy a temperature module to Edge1.

    What should you do?

    • From the Azure portal, navigate to Hub1 and select IoT Edge. Select Edge1, and then select Manage Child Devices. From a Bash prompt, run the following command:
      az iot edge set-modules -device-id Edge1 -hub-name Hub1 -content C:\deploymentMan1.json
    • Create an IoT Edge deployment manifest that specifies the temperature module and the route to $upstream. From a Bash prompt, run the following command:
      az iot hub monitor-events-device-id Edge1 -hub-name Hub1
    • From the Azure portal, navigate to Hub1 and select IoT Edge. Select Edge1, select Device Twin, and then set the deployment manifest as a desired property. From a Bash prompt, run the following command:
      az iot hub monitor-events-device-id Edge1 -hub-name Hub1
    • Create an IoT Edge deployment manifest that specifies the temperature module and the route to $upstream. From a Bash prompt, run the following command:
      az iot edge set-modules -device-id Edge1 -hub-name Hub1 -content C:\deploymentMan1.json

    Explanation:You deploy modules to your device by applying the deployment manifest that you configured with the module information.

    Change directories into the folder where your deployment manifest is saved. If you used one of the VS Code IoT Edge templates, use the deployment.json file in the config folder of your solution directory and not the deployment.template.json file.

    Use the following command to apply the configuration to an IoT Edge device:

    az iot edge set-modules –device-id [device id] –hub-name [hub name] –content [file path]

  2. DRAG DROP

    Your company is creating a new camera security system that will use Azure IoT Hub.

    You plan to use an Azure IoT Edge device that will run Ubuntu Server 18.04.

    You need to configure the IoT Edge device.

    Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q02 017 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q02 017 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q02 017 Answer
    AZ-220 Microsoft Azure IoT Developer Part 03 Q02 017 Answer
    Explanation:

    Step1: Install the IoT edge repository for Ubuntu Server 18.04 on the physical device. From IoT hub, create a new IoT Edge device.

    Prepare your device to access the Microsoft installation packages.
    Install the repository configuration that matches your device operating system.

    Ubuntu Server 18.04: curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ./microsoft-prod.list

    In your IoT Hub in the Azure portal, IoT Edge devices are created and managed separately from IOT devices that are not edge enabled.
    Sign in to the Azure portal and navigate to your IoT hub.
    In the left pane, select IoT Edge from the menu.
    Select Add an IoT Edge device.
    Provide a descriptive device ID. Use the default settings to auto-generate authentication keys and connect the new device to your hub.
    Select Save.

    Step 2: Run the following commands…
    Install the container runtime.
    Azure IoT Edge relies on an OCI-compatible container runtime. For production scenarios, we recommended that you use the Moby-based engine provided below. The Moby engine is the only container engine officially supported with Azure IoT Edge. Docker CE/EE container images are compatible with the Moby runtime.

    Install the Moby engine.
    sudo apt-get install moby-engine

    Install the Moby command-line interface (CLI). The CLI is useful for development but optional for production deployments.
    sudo apt-get install moby-cli

    Install the security daemon. The package is installed at /etc/iotedge/.
    sudo apt-get install iotedge

    Step 3: Add the connection string to the /etc/iotedge/config.yaml file,..
    To manually provision a device, you need to provide it with a device connection string that you can create by registering a new device in your IoT hub.

    Open the configuration file.
    sudo nano /etc/iotedge/config.yaml

    Find the provisioning configurations of the file and uncomment the Manual provisioning configuration section. Update the value of device_connection_string with the connection string from your IoT Edge device.
    Save and close the file.

    After entering the provisioning information in the configuration file, restart the daemon:
    sudo systemctl restart iotedge

  3. You have the devices shown in the following table.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q03 018

    You are implementing a proof of concept (POC) for an Azure IoT solution.

    You need to deploy an Azure IoT Edge device as part of the POC.

    On which two devices can you deploy IOT Edge? Each correct answer presents a complete solution.

    NOTE: Each correct selection is worth one point.

    • Device1
    • Device2
    • Device3
    • Device4
    Explanation:

    Azure IoT Edge runs great on devices as small as a Raspberry Pi3 to server grade hardware.

    Tier 1.
    The systems listed in the following table are supported by Microsoft, either generally available or in public preview, and are tested with each new release.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q03 019
    AZ-220 Microsoft Azure IoT Developer Part 03 Q03 019
  4. HOTSPOT

    You have the following device twin for the IoT device.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q04 020
    AZ-220 Microsoft Azure IoT Developer Part 03 Q04 020

    For each of the following statements, select Yes if the statement is true. Otherwise, select No.

    NOTE: Each correct selection is worth one point.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q04 021 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q04 021 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q04 021 Answer
    AZ-220 Microsoft Azure IoT Developer Part 03 Q04 021 Answer
    Explanation:

    Box1: Yes

    Box 2: Yes
    Fanspeed 73 is a reported property.

    Box 3: No
    The deviceID property is read only.

  5. You are deploying an Azure IoT Edge solution that includes multiple IoT Edge devices.

    You need to configure module-to-module routing.

    To which section of the deployment manifest should you add the routes?

    • storeAndForwardConfiguration
    • $edgeHub
    • modules
    • systemModules
    Explanation:
    Routes are declared in the $edgeHub desired properties.
  6. You have an IoT device that has the following configurations:

    – Hardware: Raspberry Pi
    – Operating system: Raspbian

    You need to deploy Azure IoT Edge to the device.

    Which two actions should you perform? Each correct answer presents part of the solution.

    NOTE: Each correct selection is worth one point.

    • Update the IoT Edge runtime.
    • Install the IoT Edge security daemon.
    • Run the Deploy-IoTEdge PowerShell cmdlet on the IoT Edge device.
    • Install the container runtime.
    Explanation:

    The Azure IoT Edge runtime is what turns a device into an IoT Edge device. The runtime can be deployed on devices as small as a Raspberry Pi or as large as an industrial server.

    The IoT Edge security daemon provides and maintains security standards on the IoT Edge device. The daemon starts on every boot and bootstraps the device by starting the rest of the IoT Edge runtime.

  7. You develop a custom Azure IoT Edge module named temperature-module.

    You publish temperature-module to a private container registry named mycr.azurecr.io

    You need to build a deployment manifest for the IoT Edge device that will run temperature-module.

    Which three container images should you define in the manifest? Each correct answer presents part of the solution.

    NOTE: Each correct selection is worth one point.

    • mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0
    • mcr.microsoft.com/azureiotedge-agent:1.0
    • mcr.microsoft.com/iotedgedev:2.0
    • mycr.azurecr.io/temperature-module:latest
    • mcr.microsoft.com/azureiotedge-hub:1.0
    Explanation:
    Each IoT Edge device runs at least two modules: $edgeAgent and $edgeHub, which are part of the IoT Edge runtime. IoT Edge device can run multiple additional modules for any number of processes. Use a deployment manifest to tell your device which modules to install and how to configure them to work together.
  8. Case Study

    This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

    To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.

    At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.

    To start the case study
    To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question.

    Overview

    A company named Contoso, Ltd. is creating a building monitoring system that will monitor the temperature, humidity, and light level at various points in a building’s internal structure.

    Contoso will test the system at a single building located in the United Kingdom. The building has 25 floors. Each floor has 15 rooms.

    Existing Environment. Current State of Development

    Contoso produces a set of Bluetooth sensors that read the temperature and humidity. The sensors connect to IoT gateway devices that relay the data.

    All the IoT gateway devices connect to an Azure IoT hub named iothub1.

    Existing Environment. Device Twin

    You plan to implement device twins by using the following JSON sample.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q08 022
    AZ-220 Microsoft Azure IoT Developer Part 03 Q08 022

    Existing Environment. Azure Stream Analytics

    Each room will have between three to five sensors that will generate readings that are sent to a single IoT gateway device. The IoT gateway device will forward all the readings to iothub1 at intervals of between 10 and 60 seconds.

    You plan to use a gateway pattern so that each IoT gateway device will have its own IoT Hub device identity.

    You draft the following query, which is missing the GROUP BY clause.

    SELECT
         AVG(temperature),
            System.TimeStamp() AS AsaTime
    FROM
         Iothub

    You plan to use a 30-second period to calculate the average temperature reading of the sensors.

    You plan to minimize latency between the condition reported by the sensors and the corresponding alert issued by the Stream Analytics job.

    Existing Environment. Device Messages

    The IoT gateway devices will send messages that contain the following JSON data whenever the temperature exceeds a specified threshold.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q08 023
    AZ-220 Microsoft Azure IoT Developer Part 03 Q08 023

    The level property will be used to route the messages to an Azure Service Bus queue endpoint named criticalep.

    Existing Environment. Issues

    You discover connectivity issues between the IoT gateway devices and iothub1, which cause IoT devices to lose connectivity and messages.

    Requirements. Planned Changes

    Contoso plans to make the following changes:

    – Use Stream Analytics to process and view data.
    – Use Azure Time Series Insights to visualize data.
    – Implement a system to sync device statuses and required settings.
    – Add extra information to messages by using message enrichment.
    – Create a notification system to send an alert if a condition exceeds a specified threshold.
    – Implement a system to identify what causes the intermittent connection issues and lost messages.

    Requirements. Technical Requirements

    Contoso must meet the following technical requirements:

    – Use the built-in functions of IoT Hub whenever possible.
    – Minimize hardware and software costs whenever possible.
    – Minimize administrative effort to provision devices at scale.
    – Implement a system to trace message flow to and from iothub1.
    – Minimize the amount of custom coding required to implement the planned changes.
    – Prevent read operations from being negatively affected when you implement additional services.

    1. You plan to deploy Azure Time Series Insights.

      What should you create on iothub1 before you deploy Time Series Insights?

      • a new message route
      • a new consumer group
      • a new shared access policy
      • an IP filter rule
      Explanation:
      Create a dedicated consumer group in the IoT hub for the Time Series Insights environment to consume from. Each Time Series Insights event source must have its own dedicated consumer group that isn’t shared with any other consumer. If multiple readers consume events from the same consumer group, all readers are likely to exhibit failures.
    2. How should you complete the GROUP BY clause to meet the Streaming Analytics requirements?

      • GROUP BY HoppingWindow(Second, 60, 30)
      • GROUP BY TumblingWindow(Second, 30)
      • GROUP BY SlidingWindow(Second, 30)
      • GROUP BY SessionWindow(Second, 30, 60)
      Explanation:

      Scenario: You plan to use a 30-second period to calculate the average temperature reading of the sensors.

      Tumbling window functions are used to segment a data stream into distinct time segments and perform a function against them, such as the example below. The key differentiators of a Tumbling window are that they repeat, do not overlap, and an event cannot belong to more than one tumbling window.

      Incorrect Answers:
      A: Hopping window functions hop forward in time by a fixed period. It may be easy to think of them as Tumbling windows that can overlap, so events can belong to more than one Hopping window result set.

    3. HOTSPOT

      You need to use message enrichment to add additional device information to messages sent from the IoT gateway devices when the reported temperature exceeds a critical threshold.

      How should you configure the enrich message values? To answer, select the appropriate options in the answer area.

      NOTE: Each correct selection is worth one point.

      AZ-220 Microsoft Azure IoT Developer Part 03 Q08 024 Question
      AZ-220 Microsoft Azure IoT Developer Part 03 Q08 024 Question

      AZ-220 Microsoft Azure IoT Developer Part 03 Q08 024 Answer
      AZ-220 Microsoft Azure IoT Developer Part 03 Q08 024 Answer
  9. Case Study

    This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

    To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.

    At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.

    To start the case study
    To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question.

    Overview
    ADatum Corporation is an international manufacturing company that has 3,000 employees.

    ADatum has a main office in New York and more than 100 branch offices worldwide.

    Requirements. Planned Changes

    ADatum is developing an Azure IoT solution to monitor environmental conditions. The IoT solution consists of hardware devices and cloud services. All the devices will communicate directly to Azure IoT Hub.

    The hardware devices will be deployed to the branch offices and will collect data about various environmental conditions such as temperature, humidity, air quality, and noise level. The devices will be wired by using Power over Ethernet (PoE) connections.

    ADatum is developing the solution in the following three phases: proof of value (POV), pilot, and production.

    Requirements. POV Requirements

    The POV phase will demonstrate that a technical solution is viable. During this phase, 100 devices will be deployed to the main office and Azure Stream Analytics will be connected to an IoT hub to generate real-time alerts. Stream Analytics will perform the following processing:

    Calculate the median rate of the telemetry across the entire device fleet and issue alerts for devices that exceed the median rate by a factor of 4.
    Compare the current telemetry to the specified thresholds and issue alerts when telemetry values are out of range.
    Ensure that all message content during this phase is human readable to simplify debugging.

    Requirements. Pilot Requirements

    During the pilot phase, devices will be deployed to 10 offices. Each office will have up to 1,000 devices.

    During this phase, you will add Azure Time Series Insights in parallel to Stream Analytics to support real-time graphs and queries in a dashboard web app.

    The pilot deployment must minimize operating costs.

    Requirements. Production Requirements

    The production phase will include all the offices.

    The production deployment will have one IoT hub in each Azure region. Devices must connect to the IoT hub in their region.

    The production phase must meet the following requirements:

    – Ensure that the IoT solution can support performance and scale targets.
    – Ensure that the IoT solution supports up to 1,000 devices per office.
    – Minimize operating costs of the IoT solution.

    Requirements. Technical Requirements

    Datum identifies the following requirements for the planned IoT solution:

    – The solution must generate real-time alerts when a fire condition is detected in an office. All the devices in that office must trigger an audible alarm siren within 10 seconds of the alert.
    – A dashboard UI must display alerts and the system status in real time and must allow device operators to make adjustments to the system.
    – Each device will send hourly updates to IoT Hub. Condition alerts will be sent immediately.
    – Multiple types of devices will collect telemetry that has different schemas.
    – IoT Hub must perform message routing based on the message body.
    – Direct methods must be used for cloud-to-device communication.
    – Reports must be provided monthly, quarterly, and annually.
    – Stored data queries must be as efficient as possible.
    – The device message size will be under 4 KB.
    – Development effort must be minimized.

    Requirements. Throttle and Quotas

    The relevant throttles and quotas for various IoT Hub tiers are shown in the following table.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q09 025
    AZ-220 Microsoft Azure IoT Developer Part 03 Q09 025

    Requirements. IoT Hub Routing

    You plan to implement IoT Hub routing during the POV phase as shown in the following exhibit.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q09 026
    AZ-220 Microsoft Azure IoT Developer Part 03 Q09 026
    1. You need to configure Stream Analytics to meet the POV requirements.

      What are two ways to achieve the goal? Each correct answer presents a complete solution.

      NOTE: Each correct selection is worth one point.

      • From IoT Hub, create a custom event hub endpoint, and then configure the endpoint as an input to Stream Analytics.
      • Create a Stream Analytics module, and then deploy the module to all IoT Edge devices in the fleet.
      • Create an input in Stream Analytics that uses the built-in events endpoint of IoT Hub as the source.
      • Route telemetry to an Azure Blob storage custom endpoint, and then configure the Blob storage as a reference input for Stream Analytics.
    2. DRAG DROP

      You need to add Time Series Insights to the solution to meet the pilot requirements.

      Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

      AZ-220 Microsoft Azure IoT Developer Part 03 Q09 027 Question
      AZ-220 Microsoft Azure IoT Developer Part 03 Q09 027 Question
      AZ-220 Microsoft Azure IoT Developer Part 03 Q09 027 Answer
      AZ-220 Microsoft Azure IoT Developer Part 03 Q09 027 Answer
      Explanation:

      Step 1: Provision Time Series Insights
      Select Provision new IoT Hub to create a new IoT hub.

      Step 2: Route telemetry from IoT Hub to a custom event.

      Step 3: Add a data access policy to Time Series Insights for the dashboard web app

      Scenario: Requirements. Pilot Requirements
      During the pilot phase, devices will be deployed to 10 offices. Each office will have up to 1,000 devices.

      During this phase, you will add Azure Time Series Insights in parallel to Stream Analytics to support real-time graphs and queries in a dashboard web app.

      The pilot deployment must minimize operating costs.

      Incorrect Answers:
      No need to use an endpoint.

    3. You need to store the real-time alerts generated by Stream Analytics to meet the technical requirements.

      Which type of Stream Analytics output should you configure?

      • Azure Blob storage
      • Microsoft Power BI
      • Azure Cosmos DB
      • Azure SQL Database
      Explanation:
      When you create a Time Series Insights Preview pay-as-you-go (PAYG) SKU environment, you create two Azure resources:
      – An Azure Storage general-purpose V1 blob account for cold data storage.
      – An Azure Time Series Insights Preview environment that can be configured for warm data storage.
    4. You need to recommend the format of telemetry messages to meet the POV requirements.

      What should you recommend?

      • XML
      • Avro
      • JSON
      Explanation:

      Scenario: POV Requirements
      – Ensure that all message content during this phase is human readable to simplify debugging.

      Avro uses a binary format, so it is not human readable.

      The more lightweight JSON (Javascript object notation) has become a popular alternative to XML for various reasons. A couple obvious ones are:
      – Less verbose- XML uses more words than necessary
      – JSON is faster- Parsing XML software is slow and cumbersome.

    5. During the POV phase, telemetry from IoT Hub stops flowing to the hot path. The cold path continues to work.

      What should you do to restore the hot path?

      • Disable the fallback route.
      • Run the Test all routes action.
      • Create an explicit route for the hot path.
      • Modify cold-route to send only some telemetry data to the cold path.
  10. DRAG DROP

    You have an instance of Azure Time Series Insights and an Azure IoT hub that receives streaming telemetry from IoT devices.

    You need to configure Time Series Insights to receive telemetry from the devices.

    Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q10 028 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q10 028 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q10 028 Answer
    AZ-220 Microsoft Azure IoT Developer Part 03 Q10 028 Answer
    Explanation:

    Step 1: Create a dedicated consumer group..
    Add a consumer group to your IoT hub.
    Applications use consumer groups to pull data from Azure IoT Hub. To reliably read data from your IoT hub, provide a dedicated consumer group that’s used only by this Time Series Insights environment.

    Step 2: Add a new Time Series Insights event source.
    Add a new event source
    Sign in to the Azure portal.
    In the left menu, select All resources. Select your Time Series Insights environment.
    Under Settings, select Event Sources, and then select Add.
    In the New event source pane, for Event source name, enter a name that’s unique to this Time Series Insights environment. For example, enter event-stream.

    Step 3: Configure the Time Series event source to connect to an existing IOT hub

    Step 4: For Source, select IoT Hub.

    Step 5: Select a value for Import option:
    If you already have an IoT hub in one of your subscriptions, select Use IoT Hub from available subscriptions. This option is the easiest approach.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q10 029
    AZ-220 Microsoft Azure IoT Developer Part 03 Q10 029
  11. You have 1,000 devices that connect to a standard tier Azure IoT hub.

    All the devices are commissioned and send telemetry events to the built-in IoT Hub endpoint.

    You configure message enrichment on the events endpoint and set the enrichment value to $twin.tags.ipV4.

    When you inspect messages on the events endpoint, you discover that all the messages are stamped with a string of “$twin.tags.ipV4”.

    What are two possible causes of the issue? Each correct answer presents a complete solution.

    NOTE: Each correct selection is worth one point.

    • The ipV4 tag is a restricted twin property that is unavailable for message enrichment.
    • A standard tier IoT hub does not support device twin properties in message enrichments.
    • The device sending the message has no device twin.
    • Message enrichment cannot be added to messages going to a built-in endpoint.
    • The device twin path used for the value of the enrichment does not exist.
    • The device twin property value used for message enrichment is set to “$twin.tags.ipV4”.
    Explanation:
    In some cases, if you are applying an enrichment with a value set to a tag or property in the device twin, the value will be stamped as a string value. For example, if an enrichment value is set to $twin.tags.field, the messages will be stamped with the string “$twin.tags.field” rather than the value of that field from the twin. This happens in the following cases:
    – (C) Your IoT Hub is in the standard tier, but the device sending the message has no device twin.
    – (E) Your IoT Hub is in the standard tier, but the device twin path used for the value of the enrichment does not exist. For example, if the enrichment value is set to $twin.tags.location, and the device twin does not have a location property under tags, the message is stamped with the string “$twin.tags.location”.
    – Your IoT Hub is in the basic tier. Basic tier IoT hubs do not support device twins.
  12. You have an Azure IoT hub.

    You plan to implement IoT Hub events by using Azure Event Grid.

    You need to send an email when the following events occur:

    – Device Created
    – Device Deleted
    – Device Connected
    – Device Disconnected

    Which two actions should you perform? Each correct answer presents part of the solution.

    NOTE: Each correct selection is worth one point.

    • From the IoT hub, configure an event subscription that has API management as the Endpoint Type.
    • From the IoT hub, configure an event subscription that has Web Hook as the Endpoint Type.
    • Create an Azure logic app that has a Request trigger.
    • From the IoT hub, configure an event subscription that has Service Bus Queue as the Endpoint Type.
    • Create an Azure logic app that has a scheduled trigger.
    Explanation:

    For non-telemetry events like DeviceConnected, DeviceDisconnected, DeviceCreated and DeviceDeleted, the Event Grid filtering can be used when creating the subscription.

    C: Azure Event Grid enables you to react to events in IoT Hub by triggering actions in your downstream business applications.
    A trigger, such as a Request trigger, is a specific event that starts your logic app.

  13. HOTSPOT

    You create an Azure Stream Analytics job that has the following query.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q13 030
    AZ-220 Microsoft Azure IoT Developer Part 03 Q13 030

    The job is configured to have an Azure IoT Hub input and an output to an Azure function.

    For each of the following statements, select Yes if the statement is true. Otherwise, select No.

    NOTE: Each correct selection is worth one point.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q13 031 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q13 031 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q13 031 Answer
    AZ-220 Microsoft Azure IoT Developer Part 03 Q13 031 Answer
    Explanation:

    Box 1: Yes
    All time handling operations in Azure Stream Analytics are in UTC.

    Box 2: No
    Tumbling windows are a series of fixed-sized, non-overlapping and contiguous time intervals.

    Box 3: Yes

  14. DRAG DROP

    You need to install the Azure IoT Edge runtime on a new device that runs Windows 10 IoT Enterprise.

    In which order should you perform the actions? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q14 032 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q14 032 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q14 032 Answer
    AZ-220 Microsoft Azure IoT Developer Part 03 Q14 032 Answer
    Explanation:

    Step 1: From Azure IoT hub, create an IoT Edge device
    In the Azure Cloud Shell, enter the following command to create a device named myEdgeDevice in your hub.
    az iot hub device-identity create –device-id myEdgeDevice –edge-enabled –hub-name {hub_name}

    View the connection string for your device, which links your physical device with its identity in IoT Hub. Copy the value of the connectionString key from the JSON output and save it. This value is the device connection string. You’ll use this connection string to configure the IoT Edge runtime in the step 3.

    Step 2: From an elevated PowerShell prompt, run the Deploy-IoTEdge cmdlet.
    Install the Azure IoT Edge runtime on your IoT Edge device.
    1. Run PowerShell as an administrator.
    2. Run the Deploy-IoTEdge command, which performs the following tasks:
    – Checks that your Windows machine is on a supported version.
    – Turns on the containers feature.
    – Downloads the moby engine and the IoT Edge runtime.

    Step 3: From an elevated PowerShell prompt, run the Initialize-IoTEdge cmdlet

    Step 4: Enter the IoT Edge device connection string.
    Configure the IoT Edge device with a device connection string.

  15. Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

    After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

    You have an Azure Stream Analytics job that receives input from an Azure IoT hub and sends the outputs to Azure Blob storage. The job has compatibility level 1.1 and six streaming units.

    You have the following query for the job.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q15 033
    AZ-220 Microsoft Azure IoT Developer Part 03 Q15 033

    You plan to increase the streaming unit count to 12.

    You need to optimize the job to take advantage of the additional streaming units and increase the throughput.

    Solution: You change the query to the following.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q15 034
    AZ-220 Microsoft Azure IoT Developer Part 03 Q15 034

    Does this meet the goal?

    • Yes
    • No
    Explanation:
    Max number of Streaming Units with one step and with no partitions is 6.
  16. Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

    After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

    You have an Azure Stream Analytics job that receives input from an Azure IoT hub and sends the outputs to Azure Blob storage. The job has compatibility level 1.1 and six streaming units.

    You have the following query for the job.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q16 035
    AZ-220 Microsoft Azure IoT Developer Part 03 Q16 035

    You plan to increase the streaming unit count to 12.

    You need to optimize the job to take advantage of the additional streaming units and increase the throughput.

    Solution: You change the query to the following.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q16 036

    Does this meet the goal?

    • Yes
    • No
    Explanation:
    Max number of Streaming Units with one step and with no partitions is 6.
  17. Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

    After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

    You have an Azure Stream Analytics job that receives input from an Azure IoT hub and sends the outputs to Azure Blob storage. The job has compatibility level 1.1 and six streaming units.

    You have the following query for the job.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q17 037
    AZ-220 Microsoft Azure IoT Developer Part 03 Q17 037

    You plan to increase the streaming unit count to 12.

    You need to optimize the job to take advantage of the additional streaming units and increase the throughput.

    Solution: You change the compatibility level of the job to 1.2.

    Does this meet the goal?

    • Yes
    • No
    Explanation:
    Max number of Streaming Units with one step and with no partitions is 6.
  18. You have 100 devices that connect to an Azure IoT hub.

    You plan to use Azure functions to process all the telemetry messages from the devices before storing the messages.

    You need to configure the functions binding for the IoT hub.

    Which two configuration details should you use to configure the binding? Each correct answer presents part of the solution.

    NOTE: Each correct selection is worth one point.

    • the name of the resource group that contains the IoT hub
    • the IoT hub’s connection string shared access key that has Service connect permissions
    • the connection string of the Azure Event Hub-compatible endpoint from the IoT Hub built-in endpoints
    • the Azure Event-Hub compatible name
    Explanation:

    EventHubName: Functions 2.x and higher. The name of the event hub. When the event hub name is also present in the connection string, that value overrides this property at runtime.

    Connection: The name of an app setting that contains the connection string to the event hub’s namespace. Copy this connection string by clicking the Connection Information button for the namespace, not the event hub itself. This connection string must have send permissions to send the message to the event stream.

  19. HOTSPOT

    You have an Azure IoT hub named Hub1 and an Azure Time Series Insights environment named tsi1. Tsi1 connects to Hub1. The solution has been operational for 6 months.

    Tsi1 is configured as shown in the following exhibit.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q19 038
    AZ-220 Microsoft Azure IoT Developer Part 03 Q19 038

    Hub1 receives 1 million messages per day. Each message is up to 1 KB and is formatted as JSON.

    Hub1 has seven days of retained telemetry.

    For each of the following statements, select Yes if the statement is true. Otherwise, select No.

    NOTE: Each correct selection is worth one point.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q19 039 Question
    AZ-220 Microsoft Azure IoT Developer Part 03 Q19 039 Question

    AZ-220 Microsoft Azure IoT Developer Part 03 Q19 039 Answer
    AZ-220 Microsoft Azure IoT Developer Part 03 Q19 039 Answer
  20. Case Study

    This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

    To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.

    At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.

    To start the case study
    To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question.

    Overview

    A company named Contoso, Ltd. is creating a building monitoring system that will monitor the temperature, humidity, and light level at various points in a building’s internal structure.

    Contoso will test the system at a single building located in the United Kingdom. The building has 25 floors. Each floor has 15 rooms.

    Existing Environment. Current State of Development

    Contoso produces a set of Bluetooth sensors that read the temperature and humidity. The sensors connect to IoT gateway devices that relay the data.

    All the IoT gateway devices connect to an Azure IoT hub named iothub1.

    Existing Environment. Device Twin

    You plan to implement device twins by using the following JSON sample.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q20 040
    AZ-220 Microsoft Azure IoT Developer Part 03 Q20 040

    Existing Environment. Azure Stream Analytics

    Each room will have between three to five sensors that will generate readings that are sent to a single IoT gateway device. The IoT gateway device will forward all the readings to iothub1 at intervals of between 10 and 60 seconds.

    You plan to use a gateway pattern so that each IoT gateway device will have its own IoT Hub device identity.

    You draft the following query, which is missing the GROUP BY clause.

    SELECT
       AVG(temperature),
          System.TimeStamp() AS AsaTime
    FROM
       Iothub

    You plan to use a 30-second period to calculate the average temperature reading of the sensors.

    You plan to minimize latency between the condition reported by the sensors and the corresponding alert issued by the Stream Analytics job.

    Existing Environment. Device Messages

    The IoT gateway devices will send messages that contain the following JSON data whenever the temperature exceeds a specified threshold.

    AZ-220 Microsoft Azure IoT Developer Part 03 Q20 041

    The level property will be used to route the messages to an Azure Service Bus queue endpoint named criticalep.

    Existing Environment. Issues

    You discover connectivity issues between the IoT gateway devices and iothub1, which cause IoT devices to lose connectivity and messages.

    Requirements. Planned Changes

    Contoso plans to make the following changes:

    – Use Stream Analytics to process and view data.
    – Use Azure Time Series Insights to visualize data.
    – Implement a system to sync device statuses and required settings.
    – Add extra information to messages by using message enrichment.
    – Create a notification system to send an alert if a condition exceeds a specified threshold.
    – Implement a system to identify what causes the intermittent connection issues and lost messages.

    Requirements. Technical Requirements

    Contoso must meet the following technical requirements:

    – Use the built-in functions of IoT Hub whenever possible.
    – Minimize hardware and software costs whenever possible.
    – Minimize administrative effort to provision devices at scale.
    – Implement a system to trace message flow to and from iothub1.
    – Minimize the amount of custom coding required to implement the planned changes.
    – Prevent read operations from being negatively affected when you implement additional services.

    1. You need to enable telemetry message tracing through the entire IoT solution.

      What should you do?

      • Monitor device lifecycle events.
      • Upload IoT device logs by using the File upload feature.
      • Enable the DeviceTelemetry diagnostic log and stream the log data to an Azure event hub.
      • Implement distributed tracing.
      Explanation:

      IoT Hub is one of the first Azure services to support distributed tracing. As more Azure services support distributed tracing, you’ll be able trace IoT messages throughout the Azure services involved in your solution.

      Note:
      Enabling distributed tracing for IoT Hub gives you the ability to:
      – Precisely monitor the flow of each message through IoT Hub using trace context. This trace context includes correlation IDs that allow you to correlate events from one component with events from another component. It can be applied for a subset or all IoT device messages using device twin.
      – Automatically log the trace context to Azure Monitor diagnostic logs.
      – Measure and understand message flow and latency from devices to IoT Hub and routing endpoints.
      – Start considering how you want to implement distributed tracing for the non-Azure services in your IoT solution.

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments