Skip to content

Commit 757b251

Browse files
authored
Merge pull request #153677 from minhe-msft/master
Add 2 examples in ADF expression language
2 parents aa9f837 + 0357f8d commit 757b251

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

articles/data-factory/control-flow-expression-language-functions.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,30 @@ In the following example, the pipeline takes **inputPath** and **outputPath** pa
156156
}
157157
}
158158
```
159+
160+
### Replacing special characters
161+
162+
Dynamic content editor automatically escapes characters like double quote, backslash in your content when you finish editing. This causes trouble if you want to replace line feed or tab by using **\n**, **\t** in replace() function. You can of edit your dynamic content in code view to remove the extra \ in the expression, or you can follow below steps to replace special characters using expression language:
163+
164+
1. URL encoding against the original string value
165+
1. Replace URL encoded string, for example, line feed (%0A), carriage return(%0D), horizontal tab(%09).
166+
1. URL decoding
167+
168+
For example, variable *companyName* with a newline character in its value, expression `@uriComponentToString(replace(uriComponent(variables('companyName')), '%0A', ''))` can remove the newline character.
169+
170+
```json
171+
Contoso-
172+
Corporation
173+
```
174+
175+
### Escaping single quote character
176+
177+
Expression functions use single quote for string value parameters. Use two single quotes to escape a ' character in string functions. For example, expression `@concat('Baba', ''' ', 'book store')` will return below result.
178+
179+
```
180+
Baba's book store
181+
```
182+
159183
### Tutorial
160184
This [tutorial](https://azure.microsoft.com/mediahandler/files/resourcefiles/azure-data-factory-passing-parameters/Azure%20data%20Factory-Whitepaper-PassingParameters.pdf) walks you through how to pass parameters between a pipeline and activity as well as between the activities.
161185

0 commit comments

Comments
 (0)