0% found this document useful (0 votes)
19 views3 pages

Exp TR

The document explains the use of expression transformation in calculations for data processing, detailing the types of ports: input only, input/output, output only, and variable ports. It outlines naming conventions for each port type and provides examples of how to concatenate strings and perform conditional calculations. Additionally, it emphasizes the temporary storage of values in variable ports for repetitive calculations and their visibility in transformation edit mode only.

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)
19 views3 pages

Exp TR

The document explains the use of expression transformation in calculations for data processing, detailing the types of ports: input only, input/output, output only, and variable ports. It outlines naming conventions for each port type and provides examples of how to concatenate strings and perform conditional calculations. Additionally, it emphasizes the temporary storage of values in variable ports for repetitive calculations and their visibility in transformation edit mode only.

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/ 3

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
- 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

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

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) =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,QUANTITY*(PRICE-DISCOUNT),0)

IIF(v_month<=3 , QUANTITY*(PRICE-DISCOUNT) , 0)

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

You might also like