Training
Module
Code-free transformation at scale with Azure Data Factory - Training
Perform code-free transformation at scale with Azure Data Factory or Azure Synapse Pipeline
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Table.TransformColumns(table as table, transformOperations as list, optional defaultTransformation as nullable function, optional missingField as nullable number) as table
Transforms table
by applying each column operation listed in transformOperations
(where the format is { column name, transformation } or { column name, transformation, new column type }). If a defaultTransformation
is specified, it will be applied to all columns not listed in transformOperations
. If a column listed in transformOperations
doesn't exist, an exception is thrown unless the optional parameter missingField
specifies an alternative (for example, MissingField.UseNull or MissingField.Ignore).
Convert the text values in column [A] to number values, and the number values in column [B] to text values.
Usage
Table.TransformColumns(
Table.FromRecords({
[A = "1", B = 2],
[A = "5", B = 10]
}),
{
{"A", Number.FromText},
{"B", Text.From}
}
)
Output
Table.FromRecords({
[A = 1, B = "2"],
[A = 5, B = "10"]
})
Convert the number values in missing column [X] to text values, ignoring columns which don't exist.
Usage
Table.TransformColumns(
Table.FromRecords({
[A = "1", B = 2],
[A = "5", B = 10]
}),
{"X", Number.FromText},
null,
MissingField.Ignore
)
Output
Table.FromRecords({
[A = "1", B = 2],
[A = "5", B = 10]
})
Convert the number values in missing column [X] to text values, defaulting to null on columns which don't exist.
Usage
Table.TransformColumns(
Table.FromRecords({
[A = "1", B = 2],
[A = "5", B = 10]
}),
{"X", Number.FromText},
null,
MissingField.UseNull
)
Output
Table.FromRecords({
[A = "1", B = 2, X = null],
[A = "5", B = 10, X = null]
})
Increment the number values in column [B] and convert them to text values, and convert all other columns to numbers.
Usage
Table.TransformColumns(
Table.FromRecords({
[A = "1", B = 2],
[A = "5", B = 10]
}),
{"B", each Text.From(_ + 1), type text},
Number.FromText
)
Output
Table.FromRecords({
[A = 1, B = "3"],
[A = 5, B = "11"]
})
Training
Module
Code-free transformation at scale with Azure Data Factory - Training
Perform code-free transformation at scale with Azure Data Factory or Azure Synapse Pipeline