Skip to content

Commit 2326331

Browse files
authored
Merge pull request #114227 from kromerm/adfdocsmark
Update data-flow-script.md
2 parents 893b26a + b1c76ec commit 2326331

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

articles/data-factory/data-flow-script.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: nimoolen
66
ms.service: data-factory
77
ms.topic: conceptual
88
ms.custom: seo-lt-2019
9-
ms.date: 04/13/2020
9+
ms.date: 05/06/2020
1010
---
1111

1212
# Data flow script (DFS)
@@ -174,6 +174,21 @@ Use this code in your data flow script to create a new derived column called ```
174174
derive(DWhash = sha1(Name,ProductNumber,Color))
175175
```
176176

177+
You can also use this script below to generate a row hash using all columns that are present in your stream, without needing to name each column:
178+
179+
```
180+
derive(DWhash = sha1(columns()))
181+
```
182+
183+
### String_agg equivalent
184+
This code will act like the T-SQL ```string_agg()``` function and will aggregate string values into an array. You can then cast that array into a string to use with SQL destinations.
185+
186+
```
187+
source1 aggregate(groupBy(year),
188+
string_agg = collect(title)) ~> Aggregate1
189+
Aggregate1 derive(string_agg = toString(string_agg)) ~> DerivedColumn2
190+
```
191+
177192
## Next steps
178193

179194
Explore Data Flows by starting with the [data flows overview article](concepts-data-flow-overview.md)

0 commit comments

Comments
 (0)