Skip to content

Commit 4f251c2

Browse files
authored
Merge pull request #109654 from sunasing/patch-27
Updated steps to generate partner info, minor fix
2 parents e7eee86 + e62cca6 commit 4f251c2

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

articles/industry/agriculture/ingest-historical-telemetry-data-in-azure-farmbeats.md

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,48 @@ Follow these steps:
3232
> [!NOTE]
3333
> You must be an administrator to do the following steps.
3434
35-
1. Download the [zip file](https://aka.ms/farmbeatspartnerscriptv2), and extract it to your local drive. There will be one file inside the zip file.
35+
1. Sign in to https://portal.azure.com/.
3636

37-
2. Sign in to https://portal.azure.com/ and go to **Azure Active Directory** > **App Registrations**.
37+
2. **If you are on FarmBeats version 1.2.7 or later, skip steps a, b and c, and go to step 3.** You can check FarmBeats version by selecting the **Settings** icon on the top-right corner of the FarmBeats UI.
3838

39-
3. Select the **App Registration** that was created as part of your FarmBeats deployment. It will have the same name as your FarmBeats Datahub.
39+
a. Go to **Azure Active Directory** > **App Registrations**
4040

41-
4. Select **Expose an API** > Select **Add a client application** and enter **04b07795-8ddb-461a-bbee-02f9e1bf7b46** and check **Authorize Scope**. This will give access to the Azure CLI (Cloud Shell) to perform the following steps:
41+
b. Select the **App Registration** that was created as part of your FarmBeats deployment. It will have the same name as your FarmBeats datahub.
4242

43-
5. Open Cloud Shell. This option is available on the toolbar in the upper-right corner of the Azure portal.
43+
c. Select **Expose an API** > select **Add a client application** and enter **04b07795-8ddb-461a-bbee-02f9e1bf7b46** and check **Authorize Scope**. This will give access to the Azure CLI (Cloud Shell) to perform the below steps:
44+
45+
3. Open Cloud Shell. This option is available on the toolbar in the upper-right corner of the Azure portal.
4446

4547
![Azure portal toolbar](./media/get-drone-imagery-from-drone-partner/navigation-bar-1.png)
4648

47-
6. Ensure the environment is set to **PowerShell**. By default, it's set to Bash.
49+
4. Ensure the environment is set to **PowerShell**. By default, it's set to Bash.
4850

4951
![PowerShell toolbar setting](./media/get-sensor-data-from-sensor-partner/power-shell-new-1.png)
5052

51-
7. Upload the file from step 1 in your Cloud Shell instance.
53+
5. Go to your home directory.
54+
55+
```azurepowershell-interactive 
56+
cd
57+
```
5258
53-
![Upload toolbar button](./media/get-sensor-data-from-sensor-partner/power-shell-two-1.png)
59+
6. Run the following command. This will download a script to your home directory.
5460
55-
8. Go to the directory where the file was uploaded. By default, files get uploaded to the home directory under the username.
61+
```azurepowershell-interactive 
5662
57-
9. Run the following script. The script asks for the Tenant ID, which can be obtained from **Azure Active Directory** > **Overview page**.
63+
wget –q https://aka.ms/farmbeatspartnerscriptv3 -O ./generatePartnerCredentials.ps1
5864
59-
```azurepowershell-interactive
65+
```
66+
67+
7. Run the following script. The script asks for the Tenant ID, which can be obtained from **Azure Active Directory** > **Overview** page.
68+
69+
```azurepowershell-interactive 
6070
6171
./generatePartnerCredentials.ps1
6272
6373
```
6474
65-
10. Follow the onscreen instructions to capture the values for **API Endpoint**, **Tenant ID**, **Client ID**, **Client Secret**, and **EventHub Connection String**.
75+
8. Follow the onscreen instructions to capture the values for **API Endpoint**, **Tenant ID**, **Client ID**, **Client Secret**, and **EventHub Connection String**.
76+
6677
6778
## Create device or sensor metadata
6879
@@ -346,11 +357,11 @@ Convert the historical sensor data format to a canonical format that Azure FarmB
346357
"sensordata": [
347358
{
348359
"timestamp": "< timestamp in ISO 8601 format >",
349-
"<sensor measure name (as defined in the Sensor Model)>": "<value>"
360+
"<sensor measure name (as defined in the Sensor Model)>": <value>
350361
},
351362
{
352363
"timestamp": "<timestamp in ISO 8601 format>",
353-
"<sensor measure name (as defined in the Sensor Model)>": "<values>"
364+
"<sensor measure name (as defined in the Sensor Model)>": <value>
354365
}
355366
]
356367
}
@@ -424,11 +435,11 @@ Here's an example of a telemetry message:
424435
"sensordata": [
425436
{
426437
"timestamp": "< timestamp in ISO 8601 format >",
427-
"<sensor measure name (as defined in the Sensor Model)>": "<value>"
438+
"<sensor measure name (as defined in the Sensor Model)>": <value>
428439
},
429440
{
430441
"timestamp": "<timestamp in ISO 8601 format>",
431-
"<sensor measure name (as defined in the Sensor Model)>": "<value>"
442+
"<sensor measure name (as defined in the Sensor Model)>": <value>
432443
}
433444
]
434445
}

0 commit comments

Comments
 (0)