Skip to content

Commit 4233578

Browse files
Clare Zheng (Shanghai Wicresoft Co Ltd)Clare Zheng (Shanghai Wicresoft Co Ltd)
authored andcommitted
Add parameter expression
1 parent 8494553 commit 4233578

File tree

1 file changed

+59
-1
lines changed

1 file changed

+59
-1
lines changed

articles/data-factory/connector-servicenow.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ To copy data from ServiceNow, set the source type in the copy activity to **Serv
147147
| Property | Description | Required |
148148
|:--- |:--- |:--- |
149149
| type | The type property of the copy activity source must be set to: **ServiceNowV2Source** | Yes |
150-
| expression| Use the expression to read data. You can configure the expression in **Query builder**. It has the same usage as the condition builder in ServiceNow. For instructions on how to use it, see this [article](https://docs.servicenow.com/bundle/vancouver-platform-user-interface/page/use/common-ui-elements/concept/c_ConditionBuilder.html). You can use dynamic content to configure the expression, and the example format is the object under `expression` shown in the example JSON below.| No |
150+
| expression| Use the expression to read data. You can configure the expression in **Query builder**. It has the same usage as the condition builder in ServiceNow. For instructions on how to use it, see this [article](https://docs.servicenow.com/bundle/vancouver-platform-user-interface/page/use/common-ui-elements/concept/c_ConditionBuilder.html). You can also [use expression parameter](#using-expression-parameter).| No |
151151
| *Under `expression`* | | |
152152
| type | The expression type. Values can be Constant (default), Unary, Binary, and Field. | No |
153153
| value | The constant value. |Yes when the expression type is Constant or Field |
@@ -201,6 +201,64 @@ To copy data from ServiceNow, set the source type in the copy activity to **Serv
201201
]
202202
```
203203

204+
### Using expression parameter
205+
206+
You can configure the expression parameter in **Query builder** by selecting **Add dynamic content**. The parameter type should be **Object**, and the value should follow the format shown in the example JSON below:
207+
208+
```json
209+
{
210+
"type": "Nary",
211+
"operators": [
212+
"="
213+
],
214+
"operands": [
215+
{
216+
"type": "Field",
217+
"value": "col"
218+
},
219+
{
220+
"type": "Constant",
221+
"value": "val"
222+
}
223+
]
224+
}
225+
```
226+
227+
Below is an example of the source JSON when utilizing the expression parameter:
228+
229+
```json
230+
"activities": [
231+
{
232+
"name": "CopyFromServiceNow",
233+
"type": "Copy",
234+
"inputs": [
235+
{
236+
"referenceName": "<ServiceNow input dataset name>",
237+
"type": "DatasetReference"
238+
}
239+
],
240+
"outputs": [
241+
{
242+
"referenceName": "<output dataset name>",
243+
"type": "DatasetReference"
244+
}
245+
],
246+
"typeProperties": {
247+
"source": {
248+
"type": "ServiceNowV2Source",
249+
"expression": {
250+
"type": "Expression",
251+
"value": "@pipeline().parameters.expressionParameter"
252+
}
253+
},
254+
"sink": {
255+
"type": "<sink type>"
256+
}
257+
}
258+
}
259+
]
260+
```
261+
204262
## Lookup activity properties
205263

206264
To learn details about the properties, check [Lookup activity](control-flow-lookup-activity.md).

0 commit comments

Comments
 (0)