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
How to Automate Document Signing with DocuSign in Power Automate
Introduction In an earlier Inogic post, “Streamlining E-Signatures in Multi-Step Forms with Power Pages and DocuSign Integration”, Our previou...
Power Automate Retry and Error Handling Patterns for Reliable Power Pages Integrations
When Power Pages integrates with Power Automate, reliability becomes key. Portal users expect instant responses — whether submitting a form, u...
Handling Large Files in Power Automate
Power Automate can handle large files, but how large? SharePoint Online supports files up to 250 GB, which sounds generous until you try movin...
UTCNow and that little hidden feature in Power Automate
If you have been following my posts on SharePains.com, then you will know about the UTCNow function generating the current UTC time. But did y...
Understanding Binary and Base64 in Power Automate
If you work with Power Automate and deal with files, you’ve encountered issues saving them. If you see things like “String/bytes i...
How to Auto-Fill Third-Party Web Forms Using Power Automate Desktop and JavaScript
In today’s digital workflows, teams across HR, operations, finance, and support deal with repetitive manual tasks every day. One of the most c...
How to Design Custom Approval Buttons in Outlook Email Using Power Automate (Step-by-Step Guide)
Microsoft’s standard approval emails make it easy to send and capture user feedback directly through Outlook. However, one major limitation is...
We need to talk about... Power Automate... Licensing
Next in my blog, I am going to cover a topic that has come up several times in recent conversations with clients.....Microsoft Licensing! part...
Flows getting triggered multiple times / missing callbackregistration record – Power Automate / Dataverse
Recently, we observed that one of our flows was getting triggered multiple times in our UAT environment; however, the flow was working properl...
Power Automate – Information about ‘Retry with AI vision’ functionality in Power Automate for desktop
We are announcing the introduction of the Retry with AI vision feature in error handling for UI and browser automation within Power Automate f...