Forum Discussion
iifnull() failing on non-null input
The documentation for iifNull() says this:
Returns the first not null item when given two or more inputs.
We have a dataflow which handles the contents of a number of files, using a specified CSV format. One of the columns is named 'Dealer'. Due to an error in an upstream system, a significant number of files came in with the header misspelled 'Delaer'. There are so many of these files that we cannot simply edit them manually to fix. I have the following expression in a Derived Column transform:
iifNull('Dealer',byName('Delaer'))
I understand this expression to mean "Use the value of the column 'Dealer' if it is not null, else use the value of the drifted column 'Delaer'." (That name is not in the list set by the dataset, so it is drifted, and leaving out byName() causes validation to fail.)
When the file does not contain the spelling error, my expected result is that it simply retains the correct value in 'Dealer' because this is not null. However, when actually run, this expression actually returns null, and causes the column in the Derived Column transform to not be created, resulting in a "Resolved attribute(s) [name] missing from [names]" error.
understood! in this case I'd recommend posting this question in the Azure Data Factory community forum from the link below:
Azure Data Factory | Microsoft Community Hub
If you are using a Fabric, you can also migrate your Mapping Dataflows into a Dataflow Gen2 following the guide below:
Mapping Data Flow Transforms in Dataflow Gen2 (Preview) - Microsoft Fabric | Microsoft Learn
Feel free to post any new questions if you require any help within the scope of Fabric Data Factory and Fabric Dataflows.
3 Replies
- miguelCommunity Admin
Hi!
would you mind clarifying what type of Dataflow you’re using?
- cmjcfFrequent Visitor
This is a "Data flow" in non-Fabric ADF. The JSON representation has the following:
"type": "MappingDataFlow"- miguelCommunity Admin
understood! in this case I'd recommend posting this question in the Azure Data Factory community forum from the link below:
Azure Data Factory | Microsoft Community Hub
If you are using a Fabric, you can also migrate your Mapping Dataflows into a Dataflow Gen2 following the guide below:
Mapping Data Flow Transforms in Dataflow Gen2 (Preview) - Microsoft Fabric | Microsoft Learn
Feel free to post any new questions if you require any help within the scope of Fabric Data Factory and Fabric Dataflows.