ADF\Synapse Analytics - Replace Columns names using Rule based mapping in Mapping data flows
In real time, the column names from source might not be uniform, some columns will have a space in it, some other columns will not.
For example,
- Sales Channel
- Item Type,
- Region
- Country
- Unit Price
It is a good practice to replace all the spaces in a column name before doing any transformation for easy handling. This also helps with auto mapping, when the sink column names do not come with spaces!
Select transformation in data flow makes it simpler to automatically detect spaces in column names and then remove them for the rest of the dataflow.
Consider the below source, with the given column names.
Here as we can see, few columns have spaces, few columns like Region and Country do not have spaces in it.
Using the below configuration in select transformation, we can get rid of the spaces in the column names with a simple expression.
In the Input columns, Click on Add mapping button, and choose Rule-based Mapping.
Then give the below expression:
on Source1's column: true()
on Name as column: replace($$,' ','')
What it does?
It will return true() for all the columns which have ' ' (space) in it and replace it with '' (no space).
Upon data preview, we get to see the below result,
As we are seeing here, all the columns with spaces are coming without spaces in between.
If not for the Rule based mapping, one would have to manually remove space from all the columns. It would be a nightmare if the number of columns are more! Thanks to rule-based mapping!
Published on:
Learn moreRelated posts
Types of Power Automate Flows
Welcome to Power Automate! This article focuses on differentiating the three types of Power Automate cloud flows: scheduled, instant and autom...
Copy and Paste in Power Automate Classic vs New UI
Copy and Paste has existed for a while in the classic Power Automate UI. With the new UI however there are a few additional features in this a...
Power Automate: Retiring the Impala connector
The Impala connector will be retired and removed from Copilot Studio, Logic Apps, Power Apps, and Power Automate between April 1-14, 2026. Exi...
Power Automate: Get support for normalized schema import for data ingestion
Customers with existing data pipelines or data products in data mesh mostly want to stick to normalized, efficient forms such as star schema. ...
Power Automate: Export object-centric process mining data to Microsoft Fabric semantic model
Publishing to Microsoft Fabric breaks down data silos and amplifies the impact of your process insights across your organization. Instead of k...
Power Automate: Create and visualize custom KPIs in Process Intelligence Studio
Custom KPIs put your unique business priorities at the center of process analysis. While standard metrics provide valuable baseline insights, ...
Power Automate: Analyze your processes in Process Intelligence Studio
Process Intelligence Studio eliminates the friction between your questions and your answers. Instead of navigating rigid dashboards or using a...
Power Automate: Configure Entra hybrid join for hosted machine groups
Microsoft Entra hybrid join with custom virtual networks (VNETs) and hosted machine groups lets your hosted machine group bots enroll in both ...
Power Automate: Enable version control for desktop flows
With version control in Power Automate for desktop, you can see what changes were made and who made them. This feature makes it easier to debu...
Power Automate: Use Power Platform environment variables in desktop flows
Retrieve Power Platform environment variables directly through their desktop flows without the need to pass them as inputs to the flow. A new ...