Edit

Share via


Metafunctions in mapping data flows

APPLIES TO: Azure Data Factory Azure Synapse Analytics

Tip

Try out Data Factory in Microsoft Fabric, an all-in-one analytics solution for enterprises. Microsoft Fabric covers everything from data movement to data science, real-time analytics, business intelligence, and reporting. Learn how to start a new trial for free!

Data flows are available in both Azure Data Factory pipelines and Azure Synapse Analytics pipelines. This article applies to mapping data flows. If you're new to transformations, refer to the introductory article Transform data using mapping data flows.

This article provides details about metafunctions supported by Azure Data Factory and Azure Synapse Analytics in mapping data flows.

Metafunction list

Metafunctions primarily function on metadata in your data flow.

Metafunction Task
byItem Finds a subitem within a structure or an array of a structure. If there are multiple matches, the first match is returned. If there are no matches, a NULL value is returned. The returned value must be type converted by one of the type conversion actions (such as ? date and ? string). Address column names known at design time only by their names. Computed inputs aren't supported, but you can use parameter substitutions
byOrigin Selects a column value by name in the origin stream. The second argument is the origin stream name. If there are multiple matches, the first match is returned. If there are no matches, a NULL value is returned. The returned value must be type converted by one of the type conversion functions (such as TO_DATE and TO_STRING). Address column names known at design time only by their names. Computed inputs aren't supported, but you can use parameter substitutions.
byOrigins Selects an array of columns by name in the stream. The second argument is the stream where it originated from. If there are multiple matches, the first match is returned. If there are no matches, a NULL value is returned. The returned value must be type converted by one of the type conversion functions (such as TO_DATE and TO_STRING). Address column names known at design time only by their names. Computed inputs aren't supported, but you can use parameter substitutions.
byName Selects a column value by name in the stream. You can pass an optional stream name as the second argument. If there are multiple matches, the first match is returned. If there are no matches, a NULL value is returned. The returned value must be type converted by one of the type conversion functions (such as TO_DATE and TO_STRING). Address column names known at design time only by their names. Computed inputs aren't supported, but you can use parameter substitutions.
byNames Selects an array of columns by name in the stream. You can pass an optional stream name as the second argument. If there are multiple matches, the first match is returned. If there are no matches for a column, the entire output is a NULL value. The returned value requires a type conversion function (such as toDate and toString). Address column names known at design time only by their names. Computed inputs aren't supported, but you can use parameter substitutions.
byPath Finds a hierarchical path by name in the stream. You can pass an optional stream name as the second argument. If no such path is found, it returns a NULL value. Address column names/paths known at design time only by their names or dot notation paths. Computed inputs aren't supported, but you can use parameter substitutions.
byPosition Selects a column value by its relative position (1 based) in the stream. If the position is out of bounds, it returns a NULL value. The returned value must be type converted by one of the type conversion functions (such as TO_DATE and TO_STRING). Computed inputs aren't supported, but you can use parameter substitutions.
hasPath Checks if a certain hierarchical path exists by name in the stream. You can pass an optional stream name as the second argument. Address column names/paths known at design time only by their names or dot notation paths. Computed inputs aren't supported, but you can use parameter substitutions.
originColumns Gets all output columns for an origin stream where columns were created. Must be enclosed in another function.
hex Returns a hex string representation of a binary value.
unhex Unhexes a binary value from its string representation. You can use it with sha2 and md5 to convert from string to binary representation.