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
Copy file name to clipboardExpand all lines: articles/iot-operations/connect-to-cloud/concept-schema-registry.md
+168Lines changed: 168 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,3 +106,171 @@ Output schemas are associated with dataflow destinations are only used for dataf
106
106
Note: The Delta schema format is used for both Parquet and Delta output.
107
107
108
108
For these dataflows, the operations experience applies any transformations to the input schema then creates a new schema in Delta format. When the dataflow custom resource (CR) is created, it includes a `schemaRef` value that points to the generated schema stored in the schema registry.
109
+
110
+
To upload an output schema, see [Upload schema](#upload-schema).
111
+
112
+
## Upload schema
113
+
114
+
Input schema can be uploaded in the operations experience portal as [mentioned previously](#input-schema). You can also upload a schema using a Bicep template.
115
+
116
+
### Example with Bicep template
117
+
118
+
Create a Bicep `.bicep` file, and add the schema content to it at the top as a variable. This example is a Delta schema that corresponds to the OPC UA data from [quickstart](../get-started-end-to-end-sample/quickstart-add-assets.md).
119
+
120
+
```bicep
121
+
// Delta schema content matching OPC UA data from quickstart
122
+
// For ADLS Gen2, ADX, and Fabric destinations
123
+
var opcuaSchemaContent = '''
124
+
{
125
+
"$schema": "Delta/1.0",
126
+
"type": "object",
127
+
"properties": {
128
+
"type": "struct",
129
+
"fields": [
130
+
{
131
+
"name": "temperature",
132
+
"type": {
133
+
"type": "struct",
134
+
"fields": [
135
+
{
136
+
"name": "SourceTimestamp",
137
+
"type": "string",
138
+
"nullable": true,
139
+
"metadata": {}
140
+
},
141
+
{
142
+
"name": "Value",
143
+
"type": "integer",
144
+
"nullable": true,
145
+
"metadata": {}
146
+
},
147
+
{
148
+
"name": "StatusCode",
149
+
"type": {
150
+
"type": "struct",
151
+
"fields": [
152
+
{
153
+
"name": "Code",
154
+
"type": "integer",
155
+
"nullable": true,
156
+
"metadata": {}
157
+
},
158
+
{
159
+
"name": "Symbol",
160
+
"type": "string",
161
+
"nullable": true,
162
+
"metadata": {}
163
+
}
164
+
]
165
+
},
166
+
"nullable": true,
167
+
"metadata": {}
168
+
}
169
+
]
170
+
},
171
+
"nullable": true,
172
+
"metadata": {}
173
+
},
174
+
{
175
+
"name": "Tag 10",
176
+
"type": {
177
+
"type": "struct",
178
+
"fields": [
179
+
{
180
+
"name": "SourceTimestamp",
181
+
"type": "string",
182
+
"nullable": true,
183
+
"metadata": {}
184
+
},
185
+
{
186
+
"name": "Value",
187
+
"type": "integer",
188
+
"nullable": true,
189
+
"metadata": {}
190
+
},
191
+
{
192
+
"name": "StatusCode",
193
+
"type": {
194
+
"type": "struct",
195
+
"fields": [
196
+
{
197
+
"name": "Code",
198
+
"type": "integer",
199
+
"nullable": true,
200
+
"metadata": {}
201
+
},
202
+
{
203
+
"name": "Symbol",
204
+
"type": "string",
205
+
"nullable": true,
206
+
"metadata": {}
207
+
}
208
+
]
209
+
},
210
+
"nullable": true,
211
+
"metadata": {}
212
+
}
213
+
]
214
+
},
215
+
"nullable": true,
216
+
"metadata": {}
217
+
}
218
+
]
219
+
}
220
+
}
221
+
'''
222
+
```
223
+
224
+
Then, define schema resource along with pointers to the existing Azure IoT Operation instance, custom location, and schema registry resources that you have from deploying Azure IoT Operations.
225
+
226
+
```bicep
227
+
// Replace placeholder values with your actual resource names
0 commit comments