Quantcast
Channel: SCN : Document List - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 401

Case Transform

$
0
0

The Case Transform is used to route one row to different outputs depending on conditions. Specifies multiple paths in a single transform (different rows are processed in different ways).

The Case transform simplifies branch logic in data flows by consolidating case or decision making logic in one transform. Paths are defined in an expression table.

 

 

Here I have taken an example EMPLOYEE table.

 

 

Employee Location are 3 coutries - IN,SG and US.

 

 

Case1.png

 

Requirement:

 

 

To load the LOCATION data into 4 different tables.

 

 

If LOCATION=IN then load the data into IN_EMP

If LOCATION=SG then load the data into SG_EMP

If LOCATION=US then load the data into US_EMP

If LOCATION is other than IN,SG and US then load the data into OTHER_EMP

 

 

Bring the Case Transform after the Query Transform as shown below:

 

Case2.png

 

Inside the Case Transform use the code as shown in below screen.

 

Case3.png

 

Run the Job to load the data as per our Case transform logic and check.

 

Case4.png


Viewing all articles
Browse latest Browse all 401

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>