Contenido del Curso
Introduction to Data Engineering with Azure
Introduction to Data Engineering with Azure
Derived Column Transformation
Derived columns allow you to enhance your data by creating new fields or modifying existing ones based on business logic. This functionality is vital for enriching your dataset to better serve downstream processes such as analytics, reporting, or machine learning.
For instance, you might create a FullName
field by concatenating first and last names or derive a DiscountedPrice
based on an existing Price
field and a discount rate.
How to Create Derived Columns in ADF
- Add a new Data Flow in the Author section of Azure Data Factory Studio;
- Drag a Derived Column Transformation from the toolbox onto the Data Flow canvas and connect it to your data source;
- In the Derived Column Transformation settings, define the column name for the new or modified field, such as
DeathRate
; - Write an expression using ADF's expression language. For example, to calculate a death rate:
iif(TotalDeaths > 0, (Covid19Deaths * 100.0) / TotalDeaths, 0.0)
; - Validate the configuration by previewing the data to ensure the derived column is calculated correctly;
- Connect the transformed data to a Sink Transformation to send it to a destination, such as a SQL table or Blob Storage, for further processing.
¡Gracias por tus comentarios!