How do I delete rows with certain characters in the data flow?

NishimuraChinatsu-9854 756 Reputation points
2023-03-22T09:52:28.1966667+00:00

I want to delete this '〇' row in the image in the data flow.

Is there a better way to do this?

User's image

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,364 questions
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 30,676 Reputation points Microsoft Employee
    2023-03-23T07:18:23.2633333+00:00

    @NishimuraChinatsu-9854 ,

    In addition to Subashri Vasudevan 's suggested approach, you could leverage Alter row transformation to delete the rows which are not needed.

    Alter Row transformation allows us to set insert, delete, update, and upsert policies on rows.

    Alter row settings

    You can add only one condition that is Delete if : col1!='〇' || col2='〇' || col3='〇' and so on.

    Helpful resources:

    Azure Data Factory - Use Alter Row transformation to delete NULL records in XL file

    Alter Row Transformation in Mapping Data Flow in Azure Data Factory

    How to update sql table after performing data validation checks using mapping dataflow


    Hope it helps. Kindly accept the answer if it helps. Thanks.


2 additional answers

Sort by: Most helpful
  1. Suba Balaji 11,186 Reputation points
    2023-03-23T04:53:10.3266667+00:00

    Hi @NishimuraChinastu-9854,

    You can use filter transformation. For instance, if your column names are col1,col2,col3, using the below expression you can filter out those rows which have the special characer in the screenshot.

    col1!='〇' && col2!='〇'

    like this you can filter rows which dont have the special character mentioned. please try this and let us know!

    Regards

    Suba


  2. Technanosoft Technologies 101 Reputation points
    2023-03-27T07:21:32.7366667+00:00

    You can use the "Conditional Split" transformation in your data flow to separate rows with certain characters into a separate output stream and then use the "Sink" transformation to write the remaining rows to your desired destination. Alternatively, you can use the "Filter Rows" transformation to exclude rows with certain characters based on a defined condition.

    0 comments No comments