Skip to content

Commit 7e98d98

Browse files
Merge pull request #289044 from Clare-Zheng82/1023-update_servicenow_parameter_format
[Doc update] Add content about expression parameter for ServiceNow
2 parents 2ef9ca6 + 657b2ea commit 7e98d98

File tree

1 file changed

+61
-3
lines changed

1 file changed

+61
-3
lines changed

articles/data-factory/connector-servicenow.md

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: jianleishen
77
ms.subservice: data-movement
88
ms.topic: conceptual
99
ms.custom: synapse
10-
ms.date: 10/16/2024
10+
ms.date: 10/23/2024
1111
---
1212

1313
# Copy data from ServiceNow using Azure Data Factory or Synapse Analytics
@@ -147,9 +147,9 @@ 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). | 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 parameters](#using-expression-parameters).| No |
151151
| *Under `expression`* | | |
152-
| type | The expression type. Values can be Constant (default), Unary, Binary, and Field. | No |
152+
| type | The expression type. Values can be Constant (default), Unary, Binary, Field and Nary. | No |
153153
| value | The constant value. |Yes when the expression type is Constant or Field |
154154
| operators | The operator value. For more information about operators, see *Operators available for choice fields containing strings* section in this [article](https://docs.servicenow.com/bundle/vancouver-platform-user-interface/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html).| Yes when the expression type is Unary or Binary |
155155
| operands | List of expressions on which operator is applied.| Yes when the expression type is Unary or Binary |
@@ -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 parameters
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+
Here is an example of the source JSON using 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)