Loading...

ADF\Synapse Analytics - Replace Columns names using Rule based mapping in Mapping data flows

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.

 

Screenshot 2024-01-25 at 3.11.13 PM.png

 

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.

Screenshot 2024-02-22 at 4.42.57 PM.png

Then give the below expression:

on Source1's column: true()

on Name as column: replace($$,' ','')

 

Screenshot 2024-01-25 at 3.10.04 PM.png

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,

 

Screenshot 2024-01-25 at 3.17.50 PM.png

 

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 more
Azure Synapse Analytics Blog articles
Azure Synapse Analytics Blog articles

Azure Synapse Analytics Blog articles

Share post:

Related 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...

1 day ago

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...

3 days ago

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...

3 days ago

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...

4 days ago

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...

10 days ago

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...

10 days ago

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...

12 days ago

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...

15 days ago

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...

16 days ago

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...

17 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy