Search code examples
azureazure-synapse

Removing columns in synapse


I am currently using dataflows in my current project, but unfortunately when I output the data to the sink node I get an error relating to one of the columns as it contains special characters.

Is there anyway of using the dataflow to remove the special characters in the column header? I noticed there is ways of cleaning the row data within the table, but it seems like I cannot get it to apply to the header itself. Any help greatly appreciated


Solution

  • Add your source in the data flow, and add a Select activity to the source for the location column. Add Rule-based mapping, and select column as name=='location#'. Then, add the regexReplace($$,'[^a-zA]','') expression for name as as shown below:

    enter image description here

    Afterward, you will obtain the location column without special characters, as shown below:

    enter image description here