Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
I am very new to Azure Data Factory, and to be honest I have no clue what I am doing.
Owh well here we go, I got a pipeline with extracting a XML to my database and it works fine.
But the thing is I need to filter on multiple CustomerID (Sap_ID). These customers don't use our apps so it has no use for us to use the pipeline. What I am working with:
I am creating a pipeline variable with: @split(pipeline().parameters.Folderpath,'/')[2]
this works fine but when I want to use it for the filter is gives so errors.
I use the pipeline variable of the CustomerID and use @not(equals(item().Customer_SapID, 123456)) to filter it.
but it returns an error saying it expects an array.
How can I solve this? And how can I use multiple Customer_SapID in my filter?
Solved! Go to Solution.
Hi @AlexTheGreat ,
Thank you for reaching out to Microsoft Fabric Community Forum.
You're using Azure Data Factory (ADF) to pull XML data into your database. The problem is: you want to exclude certain customers based on their CustomerID (Sap_ID) — because they don’t use your apps, so they aren’t needed in the report.
You tried filtering one CustomerID using:
@not(equals(item().Customer_SapID, 123456))
This works for just one ID, but you need to filter multiple IDs, like excluding 123456, 789012, and 345678. Also, ADF gave you an error saying “expects an array” because the filtering logic wasn’t using a proper list.
You can do a few workarounds:
This will filter out all items in your data that match the CustomerIDs in the list.
If you want to keep only certain customers, use:
@contains(pipeline().parameters.AllowedCustomers, item().Customer_SapID)
If you're passing your list as a text string like "123456,789012", just convert it to a list using:
@split(pipeline().parameters.CustomerIDs, ',')
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! |
Regards,
B Manikanteswara Reddy
Hi @AlexTheGreat ,
Thank you for reaching out to Microsoft Fabric Community Forum.
You're using Azure Data Factory (ADF) to pull XML data into your database. The problem is: you want to exclude certain customers based on their CustomerID (Sap_ID) — because they don’t use your apps, so they aren’t needed in the report.
You tried filtering one CustomerID using:
@not(equals(item().Customer_SapID, 123456))
This works for just one ID, but you need to filter multiple IDs, like excluding 123456, 789012, and 345678. Also, ADF gave you an error saying “expects an array” because the filtering logic wasn’t using a proper list.
You can do a few workarounds:
This will filter out all items in your data that match the CustomerIDs in the list.
If you want to keep only certain customers, use:
@contains(pipeline().parameters.AllowedCustomers, item().Customer_SapID)
If you're passing your list as a text string like "123456,789012", just convert it to a list using:
@split(pipeline().parameters.CustomerIDs, ',')
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! |
Regards,
B Manikanteswara Reddy
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.