Skip to content

Commit c534b44

Browse files
authored
Update data-flow-cast.md
1 parent 50879c6 commit c534b44

File tree

1 file changed

+18
-38
lines changed

1 file changed

+18
-38
lines changed
Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Rank transformation in mapping data flow
3-
description: Learn how to use a mapping data flow rank transformation to generate a ranking column in Azure Data Factory or Synapse Analytics pipelines.
2+
title: Cast transformation in mapping data flow
3+
description: Learn how to use a mapping data flow cast transformation to easily change column data types in Azure Data Factory or Synapse Analytics pipelines.
44
titleSuffix: Azure Data Factory & Azure Synapse
55
author: kromerm
66
ms.author: makromer
@@ -9,30 +9,28 @@ ms.service: data-factory
99
ms.subservice: data-flows
1010
ms.topic: conceptual
1111
ms.custom: synapse
12-
ms.date: 09/09/2021
12+
ms.date: 07/13/2022
1313
---
1414

15-
# Rank transformation in mapping data flow
15+
# Cast transformation in mapping data flow
1616

1717
[!INCLUDE[appliesto-adf-asa-md](includes/appliesto-adf-asa-md.md)]
1818

1919
[!INCLUDE[data-flow-preamble](includes/data-flow-preamble.md)]
2020

21-
Use the rank transformation to generate an ordered ranking based upon sort conditions specified by the user.
22-
23-
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/RE4GGJo]
21+
Use the cast transformation to easily modify the data types of individual columns in a data flow.
2422

2523
## Configuration
2624

27-
:::image type="content" source="media/data-flow/rank-configuration.png" alt-text="Rank settings":::
25+
:::image type="content" source="media/data-flow/cast-transformation-001.png" alt-text="Rank settings":::
2826

29-
**Case insensitive:** If a sort column is of type string, case will be factored into the ranking.
27+
**Column name:** If a sort column is of type string, case will be factored into the ranking.
3028

31-
**Dense:** If enabled, the rank column will be dense ranked. Each rank count will be a consecutive number and rank values won't be skipped after a tie.
29+
**Type:** If enabled, the rank column will be dense ranked. Each rank count will be a consecutive number and rank values won't be skipped after a tie.
3230

33-
**Rank column:** The name of the rank column generated. This column will be of type long.
31+
**Format:** The name of the rank column generated. This column will be of type long.
3432

35-
**Sort conditions:** Choose which columns you're sorting by and in which order the sort happens. The order determines sorting priority.
33+
**Assert type check:** Choose which columns you're sorting by and in which order the sort happens. The order determines sorting priority.
3634

3735
The above configuration takes incoming basketball data and creates a rank column called 'pointsRanking'. The row with the highest value of the column *PTS* will have a *pointsRanking* value of 1.
3836

@@ -42,32 +40,14 @@ The above configuration takes incoming basketball data and creates a rank column
4240

4341
```
4442
<incomingStream>
45-
rank(
46-
desc(<sortColumn1>),
47-
asc(<sortColumn2>),
48-
...,
49-
caseInsensitive: { true | false }
50-
dense: { true | false }
51-
output(<rankColumn> as long)
52-
) ~> <sortTransformationName<>
53-
```
54-
55-
### Example
56-
57-
:::image type="content" source="media/data-flow/rank-configuration.png" alt-text="Rank settings":::
58-
59-
The data flow script for the above rank configuration is in the following code snippet.
60-
43+
cast(output(
44+
AddressID as integer,
45+
AddressLine1 as string,
46+
AddressLine2 as string,
47+
City as string
48+
),
49+
errors: true) ~> <castTransformationName<>
6150
```
62-
PruneColumns
63-
rank(
64-
desc(PTS, true),
65-
caseInsensitive: false,
66-
output(pointsRanking as long),
67-
dense: false
68-
) ~> RankByPoints
69-
```
70-
7151
## Next steps
7252

73-
Filter rows based upon the rank values using the [filter transformation](data-flow-filter.md).
53+
Modify existing columns and new columns using the [derived column transformation](data-flow-derived-column.md).

0 commit comments

Comments
 (0)