Skip to content

Commit 54c8de6

Browse files
committed
Fix code-breaking bugs in WASM dataflow docs
- Fix temperature conversion direction (C→F → F→C) to match function name and all other docs - Fix Rust SDK reference: configuration.parameters.get() → configuration.properties with tuple iteration - Fix Python SDK reference: remove fictional configuration.get_parameter() API, use properties tuples - Fix debug snippet: fn filter(message:) → fn filter(input:) to match variable usage - Fix RegistryEndpoint API version: v1beta1 → v1 (only version served by CRD) - Fix 'ONNX interference' → 'ONNX inference' typo in section header - Fix Bicep customLocations API versions: 2021-08-31-15 and 2021-08-15 → 2021-08-31-preview
1 parent bc0cebb commit 54c8de6

5 files changed

Lines changed: 29 additions & 23 deletions

File tree

articles/iot-operations/connect-to-cloud/howto-dataflow-graph-wasm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: sethm
66
ms.service: azure-iot-operations
77
ms.subservice: azure-data-flows
88
ms.topic: how-to
9-
ms.date: 01/15/2026
9+
ms.date: 02/25/2026
1010
ai-usage: ai-assisted
1111

1212
---
@@ -134,7 +134,7 @@ resource aioInstance 'Microsoft.IoTOperations/instances@2025-10-01' existing = {
134134
name: aioInstanceName
135135
}
136136
137-
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-15' existing = {
137+
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = {
138138
name: customLocationName
139139
}
140140
@@ -406,7 +406,7 @@ resource aioInstance 'Microsoft.IoTOperations/instances@2025-10-01' existing = {
406406
name: aioInstanceName
407407
}
408408
409-
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-15' existing = {
409+
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = {
410410
name: customLocationName
411411
}
412412

articles/iot-operations/develop-edge-apps/howto-build-wasm-modules-vscode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to build WebAssembly (WASM) modules for data flows using
44
author: dominicbetts
55
ms.author: dobett
66
ms.topic: how-to
7-
ms.date: 12/08/2025
7+
ms.date: 02/25/2026
88
ms.service: azure-iot-operations
99

1010
# CustomerIntent: As a developer, I want to understand how to use the VS Code extension to build and deploy WASM modules to use in data flow graphs or the HTTP/REST connector.
@@ -480,7 +480,7 @@ Complete the [Schema registry support for WASM modules](#schema-registry-support
480480
1. Locate the `filter` function and set a breakpoint by clicking in the margin next to the line number or by pressing `F9`.
481481

482482
```rust
483-
fn filter(message: DataModel) -> Result<bool, Error> {
483+
fn filter(input: DataModel) -> Result<bool, Error> {
484484
let DataModel::Message(message) = input else {
485485
return Err(Error {message: "Unexpected input type.".to_string()});
486486
};

articles/iot-operations/develop-edge-apps/howto-deploy-wasm-graph-definitions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: dominicbetts
55
ms.author: dobett
66
ms.service: azure-iot-operations
77
ms.topic: how-to
8-
ms.date: 12/16/2025
8+
ms.date: 02/25/2026
99
ai-usage: ai-assisted
1010

1111
---
@@ -68,7 +68,7 @@ resource publicRegistryEndpoint 'Microsoft.IoTOperations/instances/registryEndpo
6868
# [Kubernetes](#tab/kubernetes)
6969

7070
```yaml
71-
apiVersion: connectivity.iotoperations.azure.com/v1beta1
71+
apiVersion: connectivity.iotoperations.azure.com/v1
7272
kind: RegistryEndpoint
7373
metadata:
7474
name: public-ghcr

articles/iot-operations/develop-edge-apps/howto-develop-wasm-modules.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: dobett
66
ms.service: azure-iot-operations
77
ms.subservice: azure-data-flows
88
ms.topic: how-to
9-
ms.date: 12/08/2025
9+
ms.date: 02/25/2026
1010
ai-usage: ai-assisted
1111
---
1212

@@ -247,7 +247,7 @@ Python WASM modules don't require other project configuration files. The Python
247247

248248
## Create a simple module
249249

250-
Create a simple module that converts temperature from Celsius to Fahrenheit. This example demonstrates the basic structure and processing logic for both Rust and Python implementations.
250+
Create a simple module that converts temperature from Fahrenheit to Celsius. This example demonstrates the basic structure and processing logic for both Rust and Python implementations.
251251

252252
# [Rust](#tab/rust)
253253

@@ -274,10 +274,10 @@ fn fahrenheit_to_celsius(input: DataModel) -> Result<DataModel, Error> {
274274
if let Ok(data_str) = std::str::from_utf8(payload) {
275275
if let Ok(mut data) = serde_json::from_str::<Value>(data_str) {
276276
if let Some(temp) = data["temperature"]["value"].as_f64() {
277-
let fahrenheit = (temp * 9.0 / 5.0) + 32.0; // Celsius -> Fahrenheit
277+
let celsius = (temp - 32.0) * 5.0 / 9.0; // Fahrenheit -> Celsius
278278
data["temperature"] = json!({
279-
"value_fahrenheit": fahrenheit,
280-
"original_celsius": temp
279+
"value_celsius": celsius,
280+
"original_fahrenheit": temp
281281
});
282282

283283
if let Ok(output_str) = serde_json::to_string(&data) {
@@ -482,16 +482,17 @@ use wasm_graph_sdk::logger::{self, Level};
482482
use wasm_graph_sdk::ModuleConfiguration;
483483

484484
fn my_operator_init(configuration: ModuleConfiguration) -> bool {
485-
// Access required parameters
486-
if let Some(threshold_param) = configuration.parameters.get("temperature_threshold") {
487-
let threshold: f64 = threshold_param.parse().unwrap_or(25.0);
485+
// Access parameters via configuration.properties (a list of key-value tuples)
486+
if let Some((_, threshold_value)) = configuration.properties.iter().find(|(k, _)| k == "temperature_threshold") {
487+
let threshold: f64 = threshold_value.parse().unwrap_or(25.0);
488488
logger::log(Level::Info, "my-operator", &format!("Using threshold: {}", threshold));
489489
}
490490

491491
// Access optional parameters with defaults
492-
let unit = configuration.parameters
493-
.get("output_unit")
494-
.map(|s| s.as_str())
492+
let unit = configuration.properties
493+
.iter()
494+
.find(|(k, _)| k == "output_unit")
495+
.map(|(_, v)| v.as_str())
495496
.unwrap_or("celsius");
496497

497498
logger::log(Level::Info, "my-operator", &format!("Output unit: {}", unit));
@@ -556,9 +557,14 @@ from map_impl.imports import types
556557
# Implement the operator interface
557558
class Map(exports.Map):
558559
def init(self, configuration) -> bool:
559-
# Access configuration parameters
560-
threshold = configuration.get_parameter("temperature_threshold")
561-
unit = configuration.get_parameter("output_unit", default="celsius")
560+
# Access configuration parameters via configuration.properties (list of key-value tuples)
561+
threshold = None
562+
unit = "celsius"
563+
for key, value in configuration.properties:
564+
if key == "temperature_threshold":
565+
threshold = value
566+
elif key == "output_unit":
567+
unit = value
562568

563569
imports.logger.log(imports.logger.Level.INFO, "my-operator",
564570
f"Initialized with threshold={threshold}, unit={unit}")

articles/iot-operations/develop-edge-apps/howto-wasm-onnx-inference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: dominicbetts
55
ms.author: dobett
66
ms.service: azure-iot-operations
77
ms.topic: how-to
8-
ms.date: 11/24/2025
8+
ms.date: 02/25/2026
99
ai-usage: ai-assisted
1010

1111
---
@@ -17,7 +17,7 @@ This article shows how to embed and run small Open Neural Network Exchange (ONNX
1717
> [!IMPORTANT]
1818
> Data flow graphs currently only support MQTT (Message Queuing Telemetry Transport), Kafka, and OpenTelemetry endpoints. Other endpoint types like Data Lake, Microsoft Fabric OneLake, Azure Data Explorer, and Local Storage aren't supported. For more information, see [Known issues](../troubleshoot/known-issues.md#data-flow-graphs-only-support-specific-endpoint-types).
1919
20-
## Why use in-band ONNX interference
20+
## Why use in-band ONNX inference
2121

2222
With Azure IoT Operations data flow graphs, you can embed small ONNX model inference directly in the pipeline instead of calling an external prediction service. This approach offers several practical advantages:
2323

0 commit comments

Comments
 (0)