Remove emojis from fields in ADF using data flow

Viewed 28

I am doing MongoDB to SQL conversion using Azure Data factory. My source has some fields which include emojis like in the value and also some characters like Ø. So, I want to only remove emojis and not the other special characters.

I am using dataflow in ADF, for conversion.

1 Answers

You can use REPLACE function

   {
    "name": "pipeline7",
    "properties": {
        "activities": [
            {
                "name": "Set variable1",
                "type": "SetVariable",
                "dependsOn": [],
                "userProperties": [],
                "typeProperties": {
                    "variableName": "Test",
                    "value": {
                        "value": "@pipeline().parameters.Test",
                        "type": "Expression"
                    }
                }
            },
            {
                "name": "Set variable2",
                "type": "SetVariable",
                "dependsOn": [
                    {
                        "activity": "Set variable1",
                        "dependencyConditions": [
                            "Succeeded"
                        ]
                    }
                ],
                "userProperties": [],
                "typeProperties": {
                    "variableName": "Rep",
                    "value": {
                        "value": "@replace(pipeline().parameters.Test,'','')",
                        "type": "Expression"
                    }
                }
            }
        ],
        "parameters": {
            "Test": {
                "type": "string",
                "defaultValue": ""
            }
        },
        "variables": {
            "Test": {
                "type": "String"
            },
            "Rep": {
                "type": "String"
            }
        },
        "annotations": []
    }
}

Note: The above JSON is for simple expression and not dataflow but the replace functionality remains the same.

you can leverage the same in dataflows

Related