You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"batchVMSKU" : "<VM SKU. Default is standard_d2_v2>",
42
-
"dedicatedComputerNodes" : 1,
43
-
"nodeAgentSKUID": "<Node SKU. Default is batch.node.ubuntu 18.04>"
44
-
}
45
-
},
46
-
"partnerCredentials": {
47
-
"key1": "value1",
48
-
"key2": "value2"
49
-
},
50
-
"partnerType": "Weather",
51
-
"name": "<Name of the partner>",
52
-
"description": "<Description>",
53
-
"properties": { }
54
-
}
55
-
```
56
-
57
-
For example, to get weather data from NOAA by Azure Open Datasets, use the payload below. You can modify the name and description as per your preference.
58
-
59
-
```json
60
-
{
61
-
62
-
"dockerDetails": {
63
-
"imageName": "azurefarmbeats/farmbeats-noaa",
64
-
"imageTag": "latest",
65
-
"azureBatchVMDetails": {
66
-
"batchVMSKU": "standard_d2_v2",
67
-
"dedicatedComputerNodes": 1,
68
-
"nodeAgentSKUID": "batch.node.ubuntu 18.04"
69
-
}
70
-
},
71
-
"partnerType": "Weather",
72
-
"name": "ods-noaa",
73
-
"description": "NOAA data from Azure Open Datasets registered as a Weather Partner"
74
-
}
75
-
```
76
-
77
-
> [!NOTE]
78
-
> For more information about the Partner object, see [Appendix](get-weather-data-from-weather-partner.md#appendix)
79
-
80
-
The above step will provision the resources to enable docker to run in the customer's FarmBeats environment.
81
-
82
-
It takes about 10-15 minutes to provision the above resources.
30
+
```json
31
+
{
32
+
33
+
"dockerDetails": {
34
+
"credentials": {
35
+
"username": "<credentials to access private docker - not required for public docker>",
36
+
"password": "<credentials to access private docker – not required for public docker>"
37
+
},
38
+
"imageName" : "<docker image name. Default is azurefarmbeats/fambeats-noaa>",
"batchVMSKU" : "<VM SKU. Default is standard_d2_v2>",
42
+
"dedicatedComputerNodes" : 1,
43
+
"nodeAgentSKUID": "<Node SKU. Default is batch.node.ubuntu 18.04>"
44
+
}
45
+
},
46
+
"partnerCredentials": {
47
+
"key1": "value1",
48
+
"key2": "value2"
49
+
},
50
+
"partnerType": "Weather",
51
+
"name": "<Name of the partner>",
52
+
"description": "<Description>",
53
+
"properties": {}
54
+
}
55
+
```
56
+
57
+
For example, to get weather data from NOAA by Azure Open Datasets, use the payload below. You can modify the name and description as per your preference.
58
+
59
+
```json
60
+
{
61
+
62
+
"dockerDetails": {
63
+
"imageName": "azurefarmbeats/farmbeats-noaa",
64
+
"imageTag": "latest",
65
+
"azureBatchVMDetails": {
66
+
"batchVMSKU": "standard_d2_v2",
67
+
"dedicatedComputerNodes": 1,
68
+
"nodeAgentSKUID": "batch.node.ubuntu 18.04"
69
+
}
70
+
},
71
+
"partnerType": "Weather",
72
+
"name": "ods-noaa",
73
+
"description": "NOAA data from Azure Open Datasets registered as a Weather Partner"
74
+
}
75
+
```
76
+
77
+
> [!NOTE]
78
+
> For more information about the Partner object, see [Appendix](get-weather-data-from-weather-partner.md#appendix)
79
+
80
+
The preceding step will provision the resources to enable docker to run in the customer's FarmBeats environment.
81
+
82
+
It takes about 10-15 minutes to provision the above resources.
83
83
84
84
3. Check the status of the /Partner object that you created in step 2. To do this, make a GET request on /Partner API and check for the **status** of the partner object. Once FarmBeats provisions the partner successfully, the status is set to **Active**.
85
85
@@ -88,48 +88,48 @@ It takes about 10-15 minutes to provision the above resources.
88
88
89
89
5. Now your FarmBeats instance has an active weather data partner and you can run jobs to request weather data for a particular location (latitude/longitude) and a date range. The JobType(s) will have details on what parameters are required to run weather jobs.
90
90
91
-
For example, for NOAA data from Azure Open Datasets, following JobType(s) will be created:
91
+
For example, for NOAA data from Azure Open Datasets, following JobType(s) will be created:
6. Make a note of the **ID** and the parameters of the JobType(s).
97
97
98
98
7. Navigate to /Jobs API and make a POST request on /Jobs with the following input payload:
99
99
100
-
```json
101
-
{
102
-
"typeId": "<id of the JobType>",
103
-
"arguments": {
104
-
"additionalProp1": {},
105
-
"additionalProp2": {},
106
-
"additionalProp3": {}
107
-
},
108
-
"name": "<name of the job>",
109
-
"description": "<description>",
110
-
"properties": {}
111
-
}
112
-
```
113
-
114
-
For example, to run **get_weather_data**, use the following payload:
115
-
116
-
```json
117
-
{
118
-
119
-
"typeId": "<id of the JobType>",
120
-
"arguments": {
121
-
"latitude": 47.620422,
122
-
"longitude": -122.349358,
123
-
"start_date": "yyyy-mm-dd",
124
-
"end_date": "yyyy-mm-dd"
125
-
},
126
-
"name": "<name of the job>",
127
-
"description": "<description>",
128
-
"properties": {}
129
-
}
130
-
```
131
-
132
-
8. The above step will run the weather jobs as defined in the partner docker and ingest weather data into FarmBeats. You can check the status of the job by making a GET request on /Jobs and look for **currentState** in the response. Once complete, the currentState is set to **Succeeded**.
100
+
```json
101
+
{
102
+
"typeId": "<id of the JobType>",
103
+
"arguments": {
104
+
"additionalProp1": {},
105
+
"additionalProp2": {},
106
+
"additionalProp3": {}
107
+
},
108
+
"name": "<name of the job>",
109
+
"description": "<description>",
110
+
"properties": {}
111
+
}
112
+
```
113
+
114
+
For example, to run **get_weather_data**, use the following payload:
115
+
116
+
```json
117
+
{
118
+
119
+
"typeId": "<id of the JobType>",
120
+
"arguments": {
121
+
"latitude": 47.620422,
122
+
"longitude": -122.349358,
123
+
"start_date": "yyyy-mm-dd",
124
+
"end_date": "yyyy-mm-dd"
125
+
},
126
+
"name": "<name of the job>",
127
+
"description": "<description>",
128
+
"properties": {}
129
+
}
130
+
```
131
+
132
+
8. The preceding step will run the weather jobs as defined in the partner docker and ingest weather data into FarmBeats. You can check the status of the job by making a GET request on /Jobs and look for **currentState** in the response. Once complete, the currentState is set to **Succeeded**.
133
133
134
134
## Query ingested weather data
135
135
@@ -146,74 +146,75 @@ To query weather data using FarmBeats REST API, follow the steps below:
146
146
147
147
2. Make a GET/{id} on /WeatherDataModel API for the **weatherDataModelId** as noted in step 1. The "Weather Data Model" has all the metadata and details about the ingested weather data. For example, **Weather Measure** within the **Weather Data Model** object has details about what weather information is supported and in what types and units. For example,
148
148
149
-
```json
150
-
{
151
-
"name": "Temperature <name of the weather measure - this is what we will receive as part of the queried weather data>",
152
-
"dataType": "Double <Data Type - eg. Double, Enum>",
153
-
"type": "AmbientTemperature <Type of measure eg. AmbientTemperature, Wind speed etc.>",
154
-
"unit": "Celsius <Unit of measure eg. Celsius, Percentage etc.>",
Make a note of the response from the GET/{id} call for the Weather Data Model.
160
+
Make a note of the response from the GET/{id} call for the Weather Data Model.
161
161
162
162
3. Navigate to **Telemetry** API and make a POST request with the following input payload:
163
163
164
-
```json
165
-
{
166
-
"weatherDataLocationId": "<id from step 1 above>",
167
-
"searchSpan": {
168
-
"from": "2020-XX-XXT07:30:00Z",
169
-
"to": "2020-XX-XXT07:45:00Z"
170
-
}
171
-
}
172
-
```
164
+
```json
165
+
{
166
+
"weatherDataLocationId": "<id from step 1 above>",
167
+
"searchSpan": {
168
+
"from": "2020-XX-XXT07:30:00Z",
169
+
"to": "2020-XX-XXT07:45:00Z"
170
+
}
171
+
}
172
+
```
173
173
174
174
4. The response containing weather data that is available for the specified time range will look like this:
175
175
176
-
```json
177
-
{
178
-
"timestamps": [
179
-
"2020-XX-XXT07:30:00Z",
180
-
"2020-XX-XXT07:45:00Z"
181
-
],
182
-
"properties": [
183
-
{
184
-
"values": [
185
-
"<id of the weatherDataLocation>",
186
-
"<id of the weatherDataLocation>"
187
-
],
188
-
"name": "Id",
189
-
"type": "String"
190
-
},
191
-
{
192
-
"values": [
193
-
29.1,
194
-
30.2
195
-
],
196
-
"name": "Temperature <name of the WeatherMeasure as defined in the WeatherDataModel object>",
197
-
"type": "Double <Data Type of the value - eg. Double>"
198
-
}
199
-
]
200
-
}
201
-
```
176
+
```json
177
+
{
178
+
"timestamps": [
179
+
"2020-XX-XXT07:30:00Z",
180
+
"2020-XX-XXT07:45:00Z"
181
+
],
182
+
"properties": [
183
+
{
184
+
"values": [
185
+
"<id of the weatherDataLocation>",
186
+
"<id of the weatherDataLocation>"
187
+
],
188
+
"name": "Id",
189
+
"type": "String"
190
+
},
191
+
{
192
+
"values": [
193
+
29.1,
194
+
30.2
195
+
],
196
+
"name": "Temperature <name of the WeatherMeasure as defined in the WeatherDataModel object>",
197
+
"type": "Double <Data Type of the value - eg. Double>"
198
+
}
199
+
]
200
+
}
201
+
```
202
202
203
203
In the above example, the response has data for two timestamps along with the measure name ("Temperature") and values of the reported weather data in the two timestamps. You will need to refer to the associated Weather Data Model (as described in step 2 above) to interpret the type and unit of the reported values.
204
204
205
205
### Query using Azure Time Series Insights (TSI)
206
206
207
207
FarmBeats uses [Azure Time Series Insights (TSI)](https://azure.microsoft.com/services/time-series-insights/) to ingest, store, query, and visualize data at IoT scale--data that's highly contextualized and optimized for time series.
208
208
209
-
Weather data is received on an EventHub and then pushed to a TSI environment within FarmBeats resource group. Data can then be directly queried from the TSI. For more information, see [TSI documentation](https://docs.microsoft.com/azure/time-series-insights/time-series-insights-explorer)
209
+
Weather data is received on an EventHub and then pushed to a TSI environment within FarmBeats resource group. Data can then be directly queried from the TSI. For more information, see [TSI documentation](https://docs.microsoft.com/azure/time-series-insights/time-series-insights-explorer).
210
210
211
211
Follow the steps to visualize data on TSI:
212
212
213
213
1. Go to **Azure portal** > **FarmBeats DataHub resource group** > select **Time Series Insights** environment (tsi-xxxx) > **Data Access Policies**. Add user with Reader or Contributor access.
214
+
214
215
2. Go to the **Overview** page of **Time Series Insights** environment (tsi-xxxx) and select the **Time Series Insights Explorer URL**. You can now visualize the ingested weather data.
215
216
216
-
Apart from storing, querying and visualization of weather data, TSI also enables integration to a Power BI dashboard. For more information, see [here](https://docs.microsoft.com/azure/time-series-insights/how-to-connect-power-bi)
217
+
Apart from storing, querying and visualization of weather data, TSI also enables integration to a Power BI dashboard. For more information, see [Visualize data from Time Series Insights in Power BI](https://docs.microsoft.com/azure/time-series-insights/how-to-connect-power-bi).
0 commit comments