Вы находитесь на странице: 1из 3

11/18/13

More Next Blog

Data Warehousing: Expression Transformation


Create Blog

Informatica Real-time Project Scenarios faq's Teradata Oracle


Thi s Bl og i s devel oped to Sha re my knowl edge to the worl d. If a ny s ugges ti ons or comments on thi s bl og gra te pl ea s ure to wel come.

Home

Data Warehousing

INFORMATICA

TERADATA

ORACLE

Interview Zone

DWH Books

Download

MONDAY, 12 NOVEMBER 2012

Expression Transformation
INFORMATICA

SEARCH THIS BLOG

Informa ti ca (3) Informa ti ca Compl ete Reference (1) Informa ti ca Functi ons (1) Informa ti ca Powercenter Archi tecture (1) i nforma ti ca project (1) Informa ti ca Qui es ti ons (1) Informa ti ca Qui es ti ons 3 (1) Informa ti ca Rea l ti me Scena ri os (1) Informa ti ca s cena ri os (3) Integra ti on Tes ti ng (1)

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

Search

SMS

TRANSLATE TO UR LANGUAGE

Select Language

TERADATA

Tera da ta (33) Tera da ta La tes t FAQ's (1) Tera da ta ma i n (1) Tera da ta SQL a s s i s ta nt (1)

ORACLE

Ora cl e (1) Ora cl e Queri es (1) PL/SQL (2) PL/SQL Excepti on (1) PL/SQL Loopi ng (1) SQL Queri es (2)

TOTAL PAGEVIEWS

211,960
MOTHER TERESA QUOTES

UNIX

Archi tecture of UNIX (1) Ba s i c Uni x Comma nds (1) Funda menta l s of UNIX (1) Uni x (2)

Spread love everywhere you go. Let no one ever come to you without leaving happier. ..................................... Mother Teresa

CONTACT ME ON SKYPE DATAWAREHOUSING-KAREEM

ADS 468X60PX

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_totalsal 4. 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.

Subscribe via Email


Enter email
Submit

informatica-kareem.blogspot.in/2012/11/passive-and-connected-transformation_12.html

1/3

11/18/13
SOCIAL ICONS

Data Warehousing: Expression Transformation


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 -> Validate 15. Repository -> Save Create Session and Workflow as described earlier. Run the workflow and see the data in target table.

pow ered by

Data Warehouse
Like 71

FOLLOWERS

RECENT POSTS

Da ta Wa rehous i ng PL/SQL Records Wha t a re records ? Records a re a nother type of da ta types PL/SQL Cons ta nts As the na me i mpl i es a cons ta nt i s a va l ue us ed Impl ementi ng Informa ti ca Pers i s tent Ca che You mus t ha ve noti ced tha t the "ti me" Informa ti ca ta kes Informa ti ca Us er Defi ned Functi ons Informa ti ca Us er Defi ned Functi ons a re s i mi l a r to Bui l t-i n Functi ons , Informa ti ca Performa nce Improvement Ti ps We often come a cros s s i tua ti ons where Da ta Tra ns forma ti on Ma na ger Informa ti ca Devel opment Bes t Pra cti ces Ma ppi ng The fol l owi ng a re genera l l y a ccepted Bes t Pra cti ces for Informa ti ca

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.
Posted by Kareem M at Monday, November 12, 2012 Recommend this on Google

SUBSCRIBE TO

Pos ts Comments

Data Warehouse

FEEDJIT

No comments: Post a Comment


Tha nks for your Comments , @ka reem

Like 71 people like Data Warehouse.

Live Traffic Feed

Enter your comment...


POPULAR POSTS

The Compl ete Informa ti ca Tutori a l Ins ta l l a ti on of Informa ti ca Informa ti ca power center 8.6 Ins ta l l a ti on Informa ti ca Power Cente... INFORMATICA SCENARIOS INFORMATICA SCENARIOS 1. How to genera te s equence numbers us i ng expres s i on tra ns forma ti on? 2. Des i gn a ma ppi ng to l oa d the fi rs t 3... Wha t i s i nforma ti ca I nforma ti ca Power Center i s a powerful ETL tool from Informa ti ca Corpora ti on. Informa ti ca Corpora ti on products a re: Informa ti ca Power Ce... Al l Downl oa ds Cl i ck the bel ow l i nks to downl oa d.. Informa ti ca Qui es ti on Ba nk Informa ti ca Qui es ti on Ba nk2 Ta l l y 9.0 Tera da ta Rea l ti me Qui es ti ... Da ta Wa rehous i ng Da ta Wa rehous i ng Wha t i s Da ta Wa rehous e? DWH Model i ng Da ta Wa rehous e Schema s Da ta wa rehous i ng Qui es ti ons 1 Da ta ... Informa ti ca Compl ete Reference Informa ti ca Rea l -ti me Project [ETL] Wha t i s

By Data Warehousing / +Get This!

Comment as:

Google Account

Publish

Preview

A visitor from Warminster, Pennsylvania viewed "Data Warehousing: Oracle Queries" 5 mins ago A visitor from Hyderabad, Andhra Pradesh viewed "Data Warehousing: Informatica scenarios" 51 mins ago A visitor from Daytona Beach, Florida viewed "Data Warehousing" 1 hour 1 min ago A visitor from India viewed "Data Warehousing: Teradata" 1 hour 11 mins ago A visitor from Daytona Beach, Florida viewed "Data Warehousing" 1 hour 34 mins ago A visitor from India viewed "Data Warehousing: The Complete Informatica Tutorial" 2 hours 4
BLOG ARCHIVE

2013 (92) 2012 (256) December (108) November (28)


Newer Pos t Welcome to KAREEM's Blog Subs cri be to: Pos t Comments (Atom) Home Ol der Pos t

Sequence genera tor Tra ns forma ti on Pa s s i ve Tra ns forma ti on Ca n be Connected or Unc... Joi ner Tra ns forma ti on

LABELS

Teradata (33)

Informatica (3) Informatica scenarios (3) Data warehousing Quiestions (2) Locking

table for access? (2) PL/SQL (2) SQL Queries (2) Unix (2) AUGUST 15th (1) Architecture of UNIX (1) Basic Unix Commands

Aggri ga tor Tra ns forma ti on

informatica-kareem.blogspot.in/2012/11/passive-and-connected-transformation_12.html

2/3

11/18/13
Informa ti ca ? Tra ns forma ti ons i n Informa ti ca 9 ....La tes t Informa ti ca Tuni ng - Step b...

Data Warehousing: Expression Transformation


(1) Constraint-Based Loading (1) Data Warehouse Schemas (1) Data warehousing Quiestions1 (1) Debugger (1) Downloads (1) ETL Process (1) Fundamentals of UNIX (1) Get top 5 records to target without using rank (1) Home (1) How do you perform incremental logic or Delta or CDC (1) Incremental Loading for Dimension Table (1) Informatica Complete Reference (1) Informatica Functions (1) Informatica Powercenter Architecture (1) Informatica Quiestions (1) Informatica Quiestions3 (1) Informatica Real time Scenarios (1) Integration Testing (1) Introduction of Unix (1) Oracle (1) Oracle Queries (1) PL/SQL Exception (1) PL/SQL Looping (1) PL/SQL Programs (1) Power center Client (1) Separate rows on group basis (1) TESTING-User Acceptance Test (1) Recent Posts Widget | Webaholic Target Load Order (1) Teradata Latest FAQ's (1) Teradata SQL assistant (1) Teradata main (1) Unit Testing (1) What is informatica (1) informatica project (1)

Source Qua l i fi er Tra ns forma ti on Ra nk Tra ns forma ti on Sorter Tra ns forma ti on Ra nk Tra ns forma ti on Fi l ter Tra ns forma ti on Tera da ta i ntervi ew ques ti ons Wha t i s SQL As s i s tence?pl ea s e ea mpl e Is PK concept a va i l a bl e i n Tera da ta . If i t i s how ... Wha t i s FILLER comma nd i n Tera da ta ? WHY us i i s two a mp opera ti on i n tera da ta ? Why FLOAD does not s upport mul ti s et ta bl es ?? wha t i s the a dva nta ges of other etl tool tha n tera ... i d na me gender 1 Ra m Fema l e 2 Kuma r Fema l e 3 s a thi ... denti fi ca ti on a nd el i mi na ti on of performa nce bottl ... Expres s i on Tra ns forma ti on Look-up Tra ns forma ti on Performa nce Opti mi s a ti on Informa ti ca Tuni ng Step by Step Approa ch Sta r Schema v/s Snowfl a ke Schema : Fa ct Ta bl e Wha t i s Da ta Model i ng? Da ta model i ng i s the proce... Di ff Between OLTP a nd OLAP Cha nge Da ta Ca pture (CDC) Tra ns forma ti ons i n Informa ti ca 9 Wha t i s a Tra ns for... October (14) Augus t (106)

NEWTON'S THIRD LAW FOR EVERY ACTION THERE IS AN EQUAL AND OPPOSITE REACTION.

Copy ri ghts @Da ta Wa rehous i ng. Templ a te i ma ges by merrymoonma ry. Powered by Bl ogger.

Twi tter Bi rd Ga dget

informatica-kareem.blogspot.in/2012/11/passive-and-connected-transformation_12.html

3/3

Вам также может понравиться