Skip to content

Commit 0ca1f60

Browse files
authored
Update tutorial-pipeline-return-value.md
In ADF, the expression language does not directly support inline JSON objects with expressions . Instead, weneed to concatenate strings and expressions properly. Example: @{ concat( '{', '"datetime": "', utcnow(), '", ', '"date": "', substring(utcnow(),0,10), '", ', '"year": "', substring(utcnow(),0,4), '", ', '"month": "', substring(utcnow(),5,2), '", ', '"day": "', substring(utcnow(),8,2), '"', '}' ) }
1 parent fc06d03 commit 0ca1f60

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

articles/data-factory/tutorial-pipeline-return-value.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,33 @@ There are two noticeable callouts in referencing the pipeline return values.
8181
## Special Considerations
8282

8383
While you can include multiple Set Pipeline Return Value activities in a pipeline, it is important to ensure that only one of them is executed in the pipeline.
84+
In ADF, the expression language does not directly support inline JSON objects. Instead, we need to concatenate strings and expressions properly.
85+
Example:
86+
In JSON format :
87+
``` json
88+
{
89+
"datetime": "@{utcnow()}",
90+
"date": "@{substring(utcnow(),0,10)}",
91+
"year": "@{substring(utcnow(),0,4)}",
92+
"month": "@{substring(utcnow(),5,2)}",
93+
"day": "@{substring(utcnow(),8,2)}"
94+
}
95+
```
96+
The code must transform to:
97+
```
98+
@{
99+
concat(
100+
'{',
101+
'"datetime": "', utcnow(), '", ',
102+
'"date": "', substring(utcnow(),0,10), '", ',
103+
'"year": "', substring(utcnow(),0,4), '", ',
104+
'"month": "', substring(utcnow(),5,2), '", ',
105+
'"day": "', substring(utcnow(),8,2), '"',
106+
'}'
107+
)
108+
}
109+
```
110+
84111

85112
:::image type="content" source="media/pipeline-return-value/pipeline-return-value-04-multiple.png" alt-text="Screenshot with Pipeline Return Value and Branching.":::
86113

0 commit comments

Comments
 (0)