question

Anandazure-0965 avatar image
0 Votes"
Anandazure-0965 asked KranthiPakala-MSFT commented

azure data factory

insert into the ERPUID_PPL column in destination table

logic is:
CASE
WHEN[ERP]='SAP ITT' THEN[AU-CC] ELSE[ERP_UID]

HOW TO ACHIEVE THIS USING DERIVED COLUMN IN DATA FLOW AND HOW TO WRITE LOGIC FOR CASE STATEMENT IN EXPRESSIN BUILDER

azure-data-factoryazure-synapse-analytics
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KranthiPakala-MSFT avatar image
1 Vote"
KranthiPakala-MSFT answered KranthiPakala-MSFT commented

Hi @anandazure-0965,

Thanks for using Microsoft Q&A forum and posting your query.

Assuming [ERP], [AU-CC] and [ERP_UID] as column names, then your case statement in expression builder should be:

 case (          
 ERP =='SAP ITT', AU-CC,
   ERP_UID 
 )

If [AU-CC] and [ERP_UID] are static values (not columns), then you case statement should be as below.

 case (          
     ERP =='SAP ITT', 'AU-CC',
       'ERP_UID' 
     )


Here are couple more examples for better understanding
True case:

  • case(10 + 20 == 30, 'dumbo', 'gumbo') ->This will return 'dumbo' as the condition 10+20==30 is true

  • case(10 + 10 == 30, 'dumbo', 'gumbo') -> This will return 'gumbo' as the condition 10+10==30 is false

Here is a demonstration video on how to write case statement in Mapping data flow expression builder. Splitting Arrays and Case Statements in ADF Data Flows

Hope this helps. Do let us know if you have further query.



  • Please don't forget to click on 130616-image.png and upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification

  • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @anandazure-0965,

Just checking in to see if the above answer helped. If this answers your query, do consider to click 130616-image.png and upvote 130671-image.png for the same as it might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

0 Votes 0 ·