Case Transformation in SAP BODS
Case transform simplifies branching logic that helps you transform one input dataset into multiple output datasets, based on conditions stored in the expression table, using just one transform.
- Default path – The row lands into this dataset when it does not match any expression in the expression table.
- True for One Case only – This means that if the row evaluates to true for multiple expressions, the first expression/dataset that it evaluates to true will receive the row else every expression that evaluates to true receives the row.
- Preserve Expression Order – You can use it only when “True for one case only” is checked. This option is an explicit command to the DS runtime to follow the order in which the expressions are specified – otherwise, the runtime executes simple expression first and then the complex expressions.
- In this scenario, Material source table consists of Header data and Item data as shown below figure 1 but we want to separate header data and item data based on our requirement as shown in figure 2,3.
- So we can separate using query transformation but we have to use two query transformations one for header and another for item. we can use case transformation instead of these two transformations.
- CASE transformation is used to give multiple conditions in single transformation no need of queries to give conditions.
- Figures 4, 5 and 6 shows the object hierarchy for Case transformation job, ETL job flow and the way we define the conditions respectively
In Case Transformation:-
Label (Name of the connection) is indicating where the data will go if the corresponding CASE condition is true.
Expression:- Expression is nothing but Condition is given to the column for the corresponding label