0% found this document useful (0 votes)
5 views4 pages

Exp TR Notes

The document outlines the use of different types of ports in expression transformations, including input only, output only, input/output, and variable ports, along with their naming conventions. It provides examples of how to perform calculations using these ports, such as concatenating names and calculating sales based on month. Additionally, it explains the visibility and purpose of variable ports in storing temporary values for repetitive calculations.

Uploaded by

nachiket dhabale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Exp TR Notes

The document outlines the use of different types of ports in expression transformations, including input only, output only, input/output, and variable ports, along with their naming conventions. It provides examples of how to perform calculations using these ports, such as concatenating names and calculating sales based on month. Additionally, it explains the visibility and purpose of variable ports in storing temporary values for repetitive calculations.

Uploaded by

nachiket dhabale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

EXPRESSION TRASNFORAMTION: PASSIVE AND CONNECTED

WHEN YOU WANT TO DO SOME CALCULATIONS ( NUMERICAL , STRING , DATE) FOR EVERY ROW -
USE EXPRESSION TR

TO DO THE ROW LEVEL CALCULATIONS USE EXP TR

INPUT AND OUTPUT PORTS - THE COLUMNS COMING FROM SOURCE AND GOING TO TARGET

INPUT ONLY PORTS- THE COLUMNS WHICh ARE COMING FROM SOURCE BUT NOT GOING TO TARGET
- FIRST_NAME , LAST_NAME ARE CALLED INPUT ONLY PORTS.

THE NAMING CONVENTION OF INPUT ONLY PORTS IS i_

OUTPUT ONLY PORT - THE COLUMN WHICH IS NOT COMING FROM SOURCE BUT GOING TO TARGET -
FULLNAME

THE NAMING CONVENTION OF OUTPUT ONLY PORTS IS o_

VARIABLE PORT - THE COLUMNS WHICH ARE NOT COMING FROM SOURCE AND AND NOT GOING TO
TARGET
- TO CALCULATE AND STORE THE VALUES TEMPORARILY
- When we have repetative calculations , then use Variable
port.
- NAMING CONVENTION IS v_

INPUT ONLY PORT(I) : IF THE COLUMN COMING FROM SOURE TO EXP,


BUT NOT GOING TO TARGET
INPUT/OUTPUT PORT(I/O) : IF THE COLUMN COMING FROM SOURE TO EXP AND
GOING TO TARGET
OUTPUT ONLY PORT (O) : IF THE COLUMN NOT COMING FROM SOURE TO EXP,
BUT GOING TO TARGET
VARIABLE PORT : IF THE COLUMN NOT COMING FROM SOURE TO EXP,
and NOT GOING TO TARGET

VARIABLE PORT:
-----------------
1.VARIABLE PORT WILL VISIBLE ONLY IN TRANSFORMATION EDIT MODE,
WILL NOT VISIBLE IN TRANSFORMATION NORMAL MODE.
2.VARIABLE PORT WILL NOT COME FROM SOURCE , WILL NOT GO TO TARGET.
3.VARIABLE PORT WILL BE USED FOR STORE THE VALUES TEMPORARILY,
4.when you have a repetative calculation , calcuate that in variable port.
USE THAT VARIABLE IN OUTPUT PORTS.
5.VARIABLE PORTS CAN WE BE OTHER VARIBALE PORTS AND ALSO IN OUTPUT PORTS.

-----------------------------------------------------------------------------------

CONCAT(i_FIRST_NAME,i_LAST_NAME)

i_FIRST_NAME||i_LAST_NAME

CONCAT(CONCAT(i_FIRST_NAME,'.'),i_LAST_NAME)
i_FIRST_NAME||'.'||i_LAST_NAME

LAST_DAY(SYSDATE)=31-03-2023

LAST_DAY(15-12-2023)=31-12-2023

CONCAT(i_FIRST_NAME,i_LAST_NAME)

i_FIRST_NAME||i_LAST_NAME

CONCAT(CONCAT(i_FIRST_NAME,'.'),i_LAST_NAME)

i_FIRST_NAME||'.'||i_LAST_NAME

SYSDATE=01-02-2023
LAST_DAY(SYSDATE)=31-03-2023

LAST_DAY(01-02-2023)=28-02-2023

1 Year = 4 Quarters
1 Quarter = 3 MONTHS

1st Quarter = JAN , FEB, MAR


2nd Quarter = APR , MAY , JUNE
3rd Quarter = JUL , AUG , SEP
4th Quarter = OCT , NOV, DEC

variable port

ORDER_DATE = '11/17/2021 00:00:00'

v_MONTH = 11

IIF( v_MONTH=1 OR v_MONTH=2 OR v_MONTH=3 , QUANTITY*(PRICE-DISCOUNT) , 0 )

IIF( IN(v_MONTH,1,2,3), QUANTITY*(PRICE-DISCOUNT) , 0 )

IIF( v_MONTH>=1 AND v_MONTH<=3, QUANTITY*(PRICE-DISCOUNT) , 0 )

o_Q1_SALES = if (v_MONTH=1 or v_MONTH=2 or v_MONTH=3 , then ,


o_Q1_SALES=Quantity*(price-DISCOUNT) else 0)
o_Q2_SALES = if (v_MONTH=4 or v_MONTH=5 or v_MONTH=6 , then ,
o_Q2_SALES=Quantity*(price-DISCOUNT) else 0)
o_Q3_SALES = if (v_MONTH=7 or v_MONTH=8 or v_MONTH=9 , then ,
o_Q3_SALES=Quantity*(price-DISCOUNT) else 0)
o_Q4_SALES = if (v_MONTH=10 or v_MONTH=11 or v_MONTH=12 , then ,
o_Q4_SALES=Quantity*(price-DISCOUNT) else 0)

v_month=11

o_Q1_SALES= IIF (v_month=1 OR v_month=2 OR v_month=3, QUANTITY*(PRICE -


DISCOUNT) ,0)
o_Q2_SALES=IIF (v_month=4 OR v_month=5 OR v_month=6, QUANTITY*(PRICE -DISCOUNT) ,0)
o_Q3_SALES=IIF (v_month=7 OR v_month=8 OR v_month=9, QUANTITY*(PRICE -DISCOUNT) ,0)
o_Q4_SALES=IIF (v_month=10 OR v_month=11 OR v_month=12, QUANTITY*(PRICE -
DISCOUNT) ,0)

Quantity = 512
price =5698
DISCOUNT=4

ORDER_DATE = '11/17/2021 00:00:00'


v_month=GET_DATE_PART(ORDER_DATE,'MM') =11
v_sales=QUANTITY*(PRICE -DISCOUNT)

o_Q1_SALES= IIF (v_month=1 OR v_month=2 OR v_month=3,v_sales) ,0)


o_Q2_SALES=IIF (v_month=4 OR v_month=5 OR v_month=6,v_sales ,0)
o_Q3_SALES=IIF (v_month=7 OR v_month=8 OR v_month=9,v_sales ,0)
o_Q4_SALES=IIF (v_month=10 OR v_month=11 OR v_month=12,v_sales ,0)

v_month=GET_DATE_PART(ORDER_DATE,'MM') =11
v_sales =QUANTITY*(PRICE -DISCOUNT) =258525

o_Q1_SALES= IIF (v_month=1 OR v_month=2 OR v_month=3, v_sales ,0)


o_Q2_SALES=IIF (v_month=4 OR v_month=5 OR v_month=6 , v_sales ,0)
o_Q3_SALES=IIF (v_month=7 OR v_month=8 OR v_month=9 , v_sales ,0)
o_Q4_SALES=IIF (v_month=10 OR v_month=11 OR v_month=12, v_sales ,0)

Q1_SALES=

IIF (v_month=1 OR v_month=2 OR v_month=3, QUANTITY*(PRICE -DISCOUNT) ,0)

IF v_month=1 OR v_month=2 OR v_month=3


THEN Q1_SALES= QUANTITY*(PRICE -DISCOUNT)
ELSE Q1_SALES= 0

INPUT ONLY PORT(I) : IF THE COLUMN COMING FROM SOURE TO EXP,


BUT NOT GOING TO TARGET
INPUT/OUTPUT PORT(I/O) : IF THE COLUMN COMING FROM SOURE TO EXP
AND GOING TO TARGET
OUTPUT ONLY PORT (O) : IF THE COLUMN NOT COMING FROM SOURE TO EXP,
BUT GOING TO TARGET
VARIABLE PORT : IF THE COLUMN NOT COMING FROM SOURE TO EXP,
BUT NOT GOING TO TARGET

v_month = GET_DATE_PART(ORDER_DATE,'MM') = 11

GET_DATE_PART(ORDER_DATE,'MM') = ('11/17/2021 00:00:00', 'MM')

IIF(v_month=1 OR v_month=2 OR v_month=3,v_sales,0)

IIF( in(v_month,1,2,3) , v_sales,0)

IIF( v_month<=3 , v_sales, 0)


wf_s_m_orders_target_ff
s_m_orders_target_ff

Debugger in informatica
-----------------------

Filter
Router
EXPRESSION

You might also like