+ All Categories
Home > Documents > Expression Transformation

Expression Transformation

Date post: 02-Nov-2014
Category:
Upload: 1raju1234
View: 43 times
Download: 0 times
Share this document with a friend
25
EXPRESSION TRANSFORMATION : Passive and connected transformation. Use the Expression transformation to calculate values in a single row before we write to the target. For example, we might need to adjust employee salaries, concatenate first and last names, or convert strings to numbers. Use the Expression transformation to perform any non-aggregate calculations. Example: Addition, Subtraction, Multiplication, Division, Concat, Uppercase conversion, lowercase conversion etc. We can also use the Expression transformation to test conditional statements before we output the results to target tables or other transformations. Example: IF, Then, Decode There are 3 types of ports in Expression Transformation: Input Output Variable: Used to store any temporary calculation. Calculating Values : To use the Expression transformation to calculate values for a single row, we must include the following ports: Input or input/output ports for each value used in the calculation: For example: To calculate Total Salary, we need salary and commission. Output port for the expression: We enter one expression for each output port. The return value for the output port needs to match the return value of the expression. We can enter multiple expressions in a single Expression transformation. We can create any number of output ports in the transformation. Example: Calculating Total Salary of an Employee Import the source table EMP in Shared folder. If it is already there, then don’t import. In shared folder, create the target table Emp_Total_SAL. Keep all ports as in EMP table except Sal and Comm in target table. Add Total_SAL port to store the calculation. Create the necessary shortcuts in the folder.
Transcript
Page 1: Expression Transformation

EXPRESSION TRANSFORMATION :

Passive and connected transformation.

Use the Expression transformation to calculate values in a single row before we write to the target. For example, we might need to adjust employee salaries, concatenate first and last names, or convert strings to numbers.

Use the Expression transformation to perform any non-aggregate calculations.

Example: Addition, Subtraction, Multiplication, Division, Concat, Uppercase conversion, lowercase conversion etc.

We can also use the Expression transformation to test conditional statements before we output the results to target tables or other transformations. Example: IF, Then, Decode

There are 3 types of ports in Expression Transformation:

Input Output Variable: Used to store any temporary calculation.

Calculating Values :

To use the Expression transformation to calculate values for a single row, we must include the following ports:

Input or input/output ports for each value used in the calculation: For example: To calculate Total Salary, we need salary and commission.

 Output port for the expression: We enter one expression for each output port. The return value for the output port needs to match the return value of the expression.

We can enter multiple expressions in a single Expression transformation. We can create any number of output ports in the transformation.

Example: Calculating Total Salary of an Employee

Import the source table EMP in Shared folder. If it is already there, then don’t  import. In shared folder, create the target table Emp_Total_SAL. Keep all ports as in EMP table

except Sal and Comm in target table. Add Total_SAL port to store the calculation. Create the necessary shortcuts in the folder.

Page 2: Expression Transformation

Creating Mapping:

1. Open folder where we want to create the mapping.2. Click Tools -> Mapping Designer.3. Click Mapping -> Create -> Give mapping name. Ex: m_totalsal4. Drag EMP from source in mapping.5. Click Transformation -> Create -> Select Expression from list. Give name and click Create.

Now click done.6. Link ports from SQ_EMP to Expression Transformation.7. Edit Expression Transformation. As we do not want Sal and Comm in target, remove check

from output port for both columns.8. Now create a new port out_Total_SAL. Make it as output port only.9. Click the small button that appears in the Expression section of the dialog box and enter

the expression in the Expression Editor.10. Enter expression SAL + COMM. You can select SAL and COMM from Ports tab in expression

editor.11. Check the expression syntax by clicking Validate.12. Click OK -> Click Apply -> Click Ok.13. Now connect the ports from Expression to target table.14. Click Mapping -> Validate15. Repository -> Save

Create Session and Workflow as described earlier. Run the workflow and see the data in target table.

Page 3: Expression Transformation

As COMM is null, Total_SAL will be null in most cases. Now open your mapping and expression transformation. Select COMM port, In Default Value give 0. Now apply changes. Validate Mapping and Save.

Refresh the session and validate workflow again. Run the workflow and see the result again.

Now use ERROR in Default value of COMM to skip rows where COMM is null.

Syntax: ERROR(‘Any message here’)

Similarly, we can use ABORT function to abort the session if COMM is null.

Syntax: ABORT(‘Any message here’)

Make sure to double click the session after doing any changes in mapping. It will prompt that mapping has changed. Click OK to refresh the mapping. Run workflow after validating and saving the workflow.

Performance tuning :

Expression transformation is used to perform simple calculations and also to do Source lookups.

1. Use operators instead of functions.2. Minimize the usage of string functions.3. If we use a complex expression multiple times in the expression transformer, then Make

that expression as a variable. Then we need to use only this variable for all computations.

Page 4: Expression Transformation

INTERVIEW QUESTIIONS

Expression Transformation in InformaticaExpression transformation is a connected, passive transformation used to calculate values on a single row. Examples of calculations are concatenating the first and last name, adjusting the employee salaries, converting strings to date etc. Expression transformation can also be used to test conditional statements before passing the data to other transformations.

Creating an Expression Transformation

Just follow the below steps to create an expression transformation1. In the mapping designer, create a new mapping or open an existing mapping.

2. Go to Toolbar->click Transformation -> Create. Select the expression transformation.

3. Enter a name, click on Create and then click on Done.

4. You can add ports to expression transformation either by selecting and dragging ports from other transformations or by opening the expression transformation and create ports manually.

Adding Expressions

Once you created an expression transformation, you can add the expressions either in a variable port or output port. Create a variable or output port in the expression transformation. Open the Expression Editor in the expression section of the variable or output port. Enter an expression and then click on Validate to verify the expression syntax. Now Click OK.

Expression Transformation Components or Tabs

The expression transformation has the following tabs Transformation: You can enter the name and description of the transformation. You can also make the expression transformation reusable.

Ports: Create new ports and configuring the ports.

Properties: Configure the tracing level to set the amount of transaction detail to be logged in session log file.

Metadata Extensions: You can specify extension name, data type, precision, value and can also create reusable metadata extensions.

Configuring Ports:

You can configure the following components on the ports tab Port name: Enter a name for the port.

Datatype: Select the data type

Precision and scale: set the precision and scale for each port.

Port type: A port can be input, input/output, output or variable.

Expression: Enter the expressions in the expression editor.

Expression transformation examples

1. Create a mapping to increase the salary of an employee by 10 percent?

Solution:In the expression transformation, create a new output port (call it as adj_sal) and enter the

Page 5: Expression Transformation

expression as salary+salary*(10/100)

The expression can be simplified as salary*(110/100)

2. Create a mapping to concatenate the first and last names of the employee? Include space between the names

Solution:Just create a new port in the expression transformation and enter the expression as CONCAT(CONCAT(first_name,' '),last_name)

The above expression can be simplified as first_name||' '||last_name

Solve more scenarios on expression stransformation at Informatica Scenarios

Informatica Scenario Based Interview Questions with Answers - Part 11. How to generate sequence numbers using expression transformation?

Solution:In the expression transformation, create a variable port and increment it by 1. Then assign the variable port to an output port. In the expression transformation, the ports are:V_count=V_count+1O_count=V_count

2. Design a mapping to load the first 3 rows from a flat file into a target?

Solution:You have to assign row numbers to each record. Generate the row numbers either using the expression transformation as mentioned above or use sequence generator transformation.Then pass the output to filter transformation and specify the filter condition as O_count <=3

3. Design a mapping to load the last 3 rows from a flat file into a target?

Solution:Consider the source has the following data.colabcde

Step1: You have to assign row numbers to each record. Generate the row numbers using the expression transformation as mentioned above and call the row number generated port as O_count. Create a DUMMY output port in the same expression transformation and assign 1 to that port. So that, the DUMMY output port always return 1 for each row.

In the expression transformation, the ports areV_count=V_count+1O_count=V_countO_dummy=1

Page 6: Expression Transformation

The output of expression transformation will becol, o_count, o_dummya, 1, 1b, 2, 1c, 3, 1d, 4, 1e, 5, 1

Step2: Pass the output of expression transformation to aggregator and do not specify any group by condition. Create an output port O_total_records in the aggregator and assign O_count port to it. The aggregator will return the last row by default. The output of aggregator contains the DUMMY port which has value 1 and O_total_records port which has the value of total number of records in the source.

In the aggregator transformation, the ports areO_dummyO_countO_total_records=O_count

The output of aggregator transformation will beO_total_records, O_dummy5, 1

Step3: Pass the output of expression transformation, aggregator transformation to joiner transformation and join on the DUMMY port. In the joiner transformation check the property sorted input, then only you can connect both expression and aggregator to joiner transformation.

In the joiner transformation, the join condition will beO_dummy (port from aggregator transformation) = O_dummy (port from expression transformation)

The output of joiner transformation will becol, o_count, o_total_recordsa, 1, 5b, 2, 5c, 3, 5d, 4, 5e, 5, 5

Step4: Now pass the ouput of joiner transformation to filter transformation and specify the filter condition as O_total_records (port from aggregator)-O_count(port from expression) <=2

In the filter transformation, the filter condition will beO_total_records - O_count <=2

The output of filter transformation will becol o_count, o_total_recordsc, 3, 5d, 4, 5

Page 7: Expression Transformation

e, 5, 5

4. Design a mapping to load the first record from a flat file into one table A, the last record from a flat file into table B and the remaining records into table C? 

Solution:This is similar to the above problem; the first 3 steps are same. In the last step instead of using the filter transformation, you have to use router transformation. In the router transformation create two output groups.

In the first group, the condition should be O_count=1 and connect the corresponding output group to table A. In the second group, the condition should be O_count=O_total_records and connect the corresponding output group to table B. The output of default group should be connected to table C.

5. Consider the following products data which contain duplicate rows.ABCCBDB

Q1. Design a mapping to load all unique products in one table and the duplicate rows in another table.The first table should contain the following outputAD

The second target should contain the following outputBBBCC

Solution:Use sorter transformation and sort the products data. Pass the output to an expression transformation and create a dummy port O_dummy and assign 1 to that port. So that, the DUMMY output port always return 1 for each row.

The output of expression transformation will beProduct, O_dummyA, 1B, 1B, 1B, 1C, 1C, 1

Page 8: Expression Transformation

D, 1

Pass the output of expression transformation to an aggregator transformation. Check the group by on product port. In the aggreagtor, create an output port O_count_of_each_product and write an expression count(product).

The output of aggregator will beProduct, O_count_of_each_productA, 1B, 3C, 2D, 1

Now pass the output of expression transformation, aggregator transformation to joiner transformation and join on the products port. In the joiner transformation check the property sorted input, then only you can connect both expression and aggregator to joiner transformation.

The output of joiner will beproduct, O_dummy, O_count_of_each_productA, 1, 1B, 1, 3B, 1, 3B, 1, 3C, 1, 2C, 1, 2D, 1, 1

Now pass the output of joiner to a router transformation, create one group and specify the group condition as O_dummy=O_count_of_each_product. Then connect this group to one table. Connect the output of default group to another table.

Q2. Design a mapping to load each product once into one table and the remaining products which are duplicated into another table.The first table should contain the following outputABCD

The second table should contain the following outputBBC

Solution:Use sorter transformation and sort the products data. Pass the output to an expression transformation and create a variable port,V_curr_product, and assign product port to it. Then create a V_count port and in the expression editor write IIF(V_curr_product=V_prev_product, V_count+1,1). Create one more variable port V_prev_port and assign product port to it. Now create an output port O_count port and assign V_count port to it.

Page 9: Expression Transformation

In the expression transformation, the ports areProductV_curr_product=productV_count=IIF(V_curr_product=V_prev_product,V_count+1,1)V_prev_product=productO_count=V_count

The output of expression transformation will beProduct, O_countA, 1B, 1B, 2B, 3C, 1C, 2D, 1

Now Pass the output of expression transformation to a router transformation, create one group and specify the condition as O_count=1. Then connect this group to one table. Connect the output of default group to another table.

For more scenario based questions visitPart1  Part2Part3Part4Part5

Part2

Informatica Scenario Based Questions - Part 21. Consider the following employees data as source

employee_id, salary10, 100020, 200030, 300040, 5000

Q1. Design a mapping to load the cumulative sum of salaries of employees into target table?The target table data should look like as

employee_id, salary, cumulative_sum10, 1000, 1000

Page 10: Expression Transformation

20, 2000, 300030, 3000, 600040, 5000, 11000

Solution:

Connect the source Qualifier to expression transformation. In the expression transformation, create a variable port V_cum_sal and in the expression editor write V_cum_sal+salary. Create an output port O_cum_sal and assign V_cum_sal to it.

Q2. Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.The output should look like as

employee_id, salary, pre_row_salary10, 1000, Null20, 2000, 100030, 3000, 200040, 5000, 3000

Solution:

Connect the source Qualifier to expression transformation. In the expression transformation, create a variable port V_count and increment it by one for each row entering the expression transformation. Also create V_salary variable port and assign the expression IIF(V_count=1,NULL,V_prev_salary) to it . Then create one more variable port V_prev_salary and assign Salary to it. Now create output port O_prev_salary and assign V_salary to it. Connect the expression transformation to the target ports.

In the expression transformation, the ports will be

employee_idsalaryV_count=V_count+1V_salary=IIF(V_count=1,NULL,V_prev_salary)V_prev_salary=salaryO_prev_salary=V_salary

Q3. Design a mapping to get the next row salary for the current row. If there is no next row for the current row, then the next row salary should be displayed as null.The output should look like as

employee_id, salary, next_row_salary10, 1000, 200020, 2000, 300030, 3000, 500040, 5000, Null

Page 11: Expression Transformation

Solution: 

Step1: Connect the source qualifier to two expression transformation. In each expression transformation, create a variable port V_count and in the expression editor write V_count+1. Now create an output port O_count in each expression transformation. In the first expression transformation, assign V_count to O_count. In the second expression transformation assign V_count-1 to O_count.

In the first expression transformation, the ports will be

employee_id salaryV_count=V_count+1O_count=V_count

In the second expression transformation, the ports will be

employee_id salaryV_count=V_count+1O_count=V_count-1

Step2: Connect both the expression transformations to joiner transformation and join them on the port O_count. Consider the first expression transformation as Master and second one as detail. In the joiner specify the join type as Detail Outer Join. In the joiner transformation check the property sorted input, then only you can connect both expression transformations to joiner transformation.

Step3: Pass the output of joiner transformation to a target table. From the joiner, connect the employee_id, salary which are obtained from the first expression transformation to the employee_id, salary ports in target table. Then from the joiner, connect the salary which is obtained from the second expression transformaiton to the next_row_salary port in the target table.

Q4. Design a mapping to find the sum of salaries of all employees and this sum should repeat for all the rows.The output should look like as

employee_id, salary, salary_sum10, 1000, 1100020, 2000, 1100030, 3000, 1100040, 5000, 11000

Solution:

Step1: Connect the source qualifier to the expression transformation. In the expression transformation, create a dummy port and assign value 1 to it.

Page 12: Expression Transformation

In the expression transformation, the ports will be

employee_idsalaryO_dummy=1

Step2: Pass the output of expression transformation to aggregator. Create a new port O_sum_salary and in the expression editor write SUM(salary). Do not specify group by on any port.

In the aggregator transformation, the ports will be

salaryO_dummyO_sum_salary=SUM(salary)

Step3: Pass the output of expression transformation, aggregator transformation to joiner transformation and join on the DUMMY port. In the joiner transformation check the property sorted input, then only you can connect both expression and aggregator to joiner transformation.

Step4: Pass the output of joiner to the target table.

2. Consider the following employees table as source

department_no, employee_name20, R10, A10, D20, P10, B10, C20, Q20, S

Q1. Design a mapping to load a target table with the following values from the above source?

department_no, employee_list10, A10, A,B10, A,B,C10, A,B,C,D20, A,B,C,D,P20, A,B,C,D,P,Q20, A,B,C,D,P,Q,R20, A,B,C,D,P,Q,R,S

Solution:

Page 13: Expression Transformation

Step1: Use a sorter transformation and sort the data using the sort key as department_no and then pass the output to the expression transformation. In the expression transformation, the ports will be

department_noemployee_nameV_employee_list = IIF(ISNULL(V_employee_list),employee_name,V_employee_list||','||employee_name)O_employee_list = V_employee_list

Step2: Now connect the expression transformation to a target table.

Q2. Design a mapping to load a target table with the following values from the above source?

department_no, employee_list10, A10, A,B10, A,B,C10, A,B,C,D20, P20, P,Q20, P,Q,R20, P,Q,R,S

Solution:

Step1: Use a sorter transformation and sort the data using the sort key as department_no and then pass the output to the expression transformation. In the expression transformation, the ports will be

department_noemployee_nameV_curr_deptno=department_noV_employee_list = IIF(V_curr_deptno! = V_prev_deptno,employee_name,V_employee_list||','||employee_name)V_prev_deptno=department_noO_employee_list = V_employee_list

Step2: Now connect the expression transformation to a target table.

Q3. Design a mapping to load a target table with the following values from the above source?

department_no, employee_names10, A,B,C,D20, P,Q,R,S

Solution: 

Page 14: Expression Transformation

The first step is same as the above problem. Pass the output of expression to an aggregator transformation and specify the group by as department_no. Now connect the aggregator transformation to a target table.

For more scenario based questions visitPart1  Part2Part3Part4Part5

Informatica Scenario Based Questions - Part 31. Consider the following product types data as the source.

Product_id, product_type10, video10, Audio20, Audio30, Audio40, Audio50, Audio10, Movie20, Movie30, Movie40, Movie50, Movie60, Movie

Assume that there are only 3 product types are available in the source. The source contains 12 records and you dont know how many products are available in each product type.

Q1. Design a mapping to select 9 products in such a way that 3 products should be selected from video, 3 products should be selected from Audio and the remaining 3 products should be selected from Movie.

Solution:

Step1: Use sorter transformation and sort the data using the key as product_type.

Step2: Connect the sorter transformation to an expression transformation. In the expression transformation, the ports will be

product_idproduct_typeV_curr_prod_type=product_typeV_count = IIF(V_curr_prod_type = V_prev_prod_type,V_count+1,1)

Page 15: Expression Transformation

V_prev_prod_type=product_typeO_count=V_count

Step3: Now connect the expression transformaion to a filter transformation and specify the filter condition as O_count<=3. Pass the output of filter to a target table.

Q2. In the above problem Q1, if the number of products in a particular product type are less than 3, then you wont get the total 9 records in the target table. For example, see the videos type in the source data. Now design a mapping in such way that even if the number of products in a particular product type are less than 3, then you have to get those less number of records from another porduc types. For example: If the number of products in videos are 1, then the reamaining 2 records should come from audios or movies. So, the total number of records in the target table should always be 9.

Solution:

The first two steps are same as above.

Step3: Connect the expression transformation to a sorter transformation and sort the data using the key as O_count. The ports in soter transformation will be

product_idproduct_typeO_count (sort key)

Step3: Discard O_count port and connect the sorter transformation to an expression transformation. The ports in expression transformation will be

product_idproduct_typeV_count=V_count+1O_prod_count=V_count

Step4: Connect the expression to a filter transformation and specify the filter condition as O_prod_count<=9. Connect the filter transformation to a target table.

2. Design a mapping to convert column data into row data without using the normalizer transformation.The source data looks like

col1, col2, col3a, b, cd, e, f

The target table data should look like

Cola

Page 16: Expression Transformation

bcdef

Solution:

Create three expression transformations with one port each. Connect col1 from Source Qualifier to port in first expression transformation. Connect col2 from Source Qualifier to port in second expression transformation. Connect col3 from source qualifier to port in third expression transformation. Create a union transformation with three input groups and each input group should have one port. Now connect the expression transformations to the input groups and connect the union transformation to the target table.

3. Design a mapping to convert row data into column data.The source data looks like

id, value10, a10, b10, c20, d20, e20, f

The target table data should look like

id, col1, col2, col310, a, b, c20, d, e, f

Solution:

Step1: Use sorter transformation and sort the data using id port as the key. Then connect the sorter transformation to the expression transformation.

Step2: In the expression transformation, create the ports and assign the expressions as mentioned below.

idvalueV_curr_id=idV_count= IIF(v_curr_id=V_prev_id,V_count+1,1)V_prev_id=idO_col1= IIF(V_count=1,value,NULL)O_col2= IIF(V_count=2,value,NULL)O_col3= IIF(V_count=3,value,NULL)

Page 17: Expression Transformation

Step3: Connect the expression transformation to aggregator transformation. In the aggregator transforamtion, create the ports and assign the expressions as mentioned below.

id (specify group by on this port)O_col1O_col2O_col3col1=MAX(O_col1)col2=MAX(O_col2)col3=MAX(O_col3)

Stpe4: Now connect the ports id, col1, col2, col3 from aggregator transformation to the target table.

For more scenario based questions visitPart1  Part2Part3Part4Part5

Informatica Scenario Based Questions - Part 4Take a look at the following tree structure diagram. From the tree structure, you can easily derive the parent-child relationship between the elements. For example, B is parent of D and E.

The above tree structure data is represented in a table as shown below.

c1, c2, c3, c4A, B, D, HA, B, D, IA, B, E, NULLA, C, F, NULLA, C, G, NULL

Here in this table, column C1 is parent of column C2, column C2 is parent of column C3, column

Page 18: Expression Transformation

C3 is parent of column C4.

Q1. Design a mapping to load the target table with the below data. Here you need to generate sequence numbers for each element and then you have to get the parent id. As the element "A" is at root, it does not have any parent and its parent_id is NULL.

id, element, parent_id1, A, NULL2, B, 13, C, 14, D, 25, E, 26, F, 37, G, 38, H, 49, I, 4

I have provided the solution for this problem in Oracle Sql query. If you are interested you can Click Here to see the solution.

Q2. This is an extension to the problem Q1. Let say column C2 has null for all the rows, then C1 becomes the parent of C3 and c3 is parent of C4. Let say both columns c2 and c3 has null for all the rows. Then c1 becomes the parent of c4. Design a mapping to accommodate these type of null conditions.

For more scenario based questions visitPart1  Part2Part3Part4Part5

Informatica Scenario Based Questions - Part 5Q1. The source data contains only column 'id'. It will have sequence numbers from 1 to 1000. The source data looks like as

Id12345678....1000

Page 19: Expression Transformation

Create a workflow to load only the Fibonacci numbers in the target table. The target table data should look like as

 Id1235813.....

In Fibonacci series each subsequent number is the sum of previous two numbers. Here assume that the first two numbers of the fibonacci series are 1 and 2. 

Solution:

STEP1: Drag the source to the mapping designer and then in the Source Qualifier Transformation properties, set the number of sorted ports to one. This will sort the source data in ascending order. So that we will get the numbers in sequence as 1, 2, 3, ....1000

STEP2: Connect the Source Qualifier Transformation to the Expression Transformation. In the Expression Transformation, create three variable ports and one output port. Assign the expressions to the ports as shown below.

Ports in Expression Transformation:idv_sum = v_prev_val1 + v_prev_val2v_prev_val1 = IIF(id=1 or id=2,1, IIF(v_sum = id, v_prev_val2, v_prev_val1) )v_prev_val2 = IIF(id=1 or id =2, 2, IIF(v_sum=id, v_sum, v_prev_val2) )o_flag = IIF(id=1 or id=2,1, IIF( v_sum=id,1,0) )

STEP3: Now connect the Expression Transformation to the Filter Transformation and specify the Filter Condition as o_flag=1 

STEP4: Connect the Filter Transformation to the Target Table.

Q2. The source table contains two columns "id" and "val". The source data looks like as below

id     val1      a,b,c2      pq,m,n3      asz,ro,liqt

Here the "val" column contains comma delimited data and has three fields in that column.Create a workflow to split the fields in “val” column to separate rows. The output should look like as below.

Page 20: Expression Transformation

id     val1      a1      b1      c2      pq2      m2      n3      asz3      ro3      liqt

Solution:

STEP1: Connect three Source Qualifier transformations to the Source Definition

STEP2: Now connect all the three Source Qualifier transformations to the Union Transformation. Then connect the Union Transformation to the Sorter Transformation. In the sorter transformation sort the data based on Id port in ascending order.

STEP3: Pass the output of Sorter Transformation to the Expression Transformation. The ports in Expression Transformation are:

id (input/output port)val (input port)v_currend_id (variable port) = idv_count (variable port) = IIF(v_current_id!=v_previous_id,1,v_count+1)v_previous_id (variable port) = ido_val (output port) = DECODE(v_count, 1,        SUBSTR(val, 1, INSTR(val,',',1,1)-1 ),        2,        SUBSTR(val, INSTR(val,',',1,1)+1, INSTR(val,',',1,2)-INSTR(val,',',1,1)-1),        3,        SUBSTR(val, INSTR(val,',',1,2)+1),        NULL        )

STEP4: Now pass the output of Expression Transformation to the Target definition. Connect id, o_val ports of Expression Transformation to the id, val ports of Target Definition.

For those who are interested to solve this problem in oracle sql, Click Here. The oracle sql query provides a dynamic solution where the "val" column can have varying number of fields in each row.

For more scenario based questions visitPart1  Part2Part3


Recommended