infa folktalks qns

Upload: jinendraabhi

Post on 07-Jul-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 infa folktalks qns

    1/35

    Reverse the Contents of Flat File – InformaticaQ1) I have a flat file, want to reverse the contents of the flat file which means the first recordshould come as last record and last record should come as first record and load into the target

    file.

     As an example consider the source flat file data as

    Informatica Enterprise Solution

    Informatica Power center

    Informatica Power exchange

    Informatica Data quality

    Read more »Email ThisBlogThis! hare to Twitterhare to ace"oo#$ comments %a"els& Informatica, Informatica Interview 'uestions

    Source Qualifier Transformation Examples - Informatica(ere i am providing some "asic examples of using source )ualifier transformation in *ourmappings. This is a continuation to m* previous posts, %earn ource 'ualifierTransformation, 'ui+ on ource 'ualifier Transformation.

    To solve these examples create the emplo*ees and departments ta"les in *our data"ase. Thecreate ta"le statements are provided "elow.

    create table DEPARTMETS

    !

      DEPARTMET"ID #M$ER!%& not null'

      DEPARTMET"AME (AR)*AR+!,-& not null'

      MAA.ER"ID #M$ER!/&

    &

    alter table DEPARTMETS a00 primary 1ey !DEPARTMET"ID&2

    http://www.folkstalk.com/2012/05/reverse-contents-of-flat-file.htmlhttp://www.folkstalk.com/2012/05/reverse-contents-of-flat-file.html#morehttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=facebookhttp://www.folkstalk.com/2012/05/reverse-contents-of-flat-file.html#comment-formhttp://www.folkstalk.com/2012/05/reverse-contents-of-flat-file.html#comment-formhttp://www.folkstalk.com/search/label/Informaticahttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/12/source-qualifier-transformation.htmlhttp://www.folkstalk.com/2011/12/source-qualifier-transformation-in.htmlhttp://www.folkstalk.com/2011/12/source-qualifier-transformation-in.htmlhttp://www.folkstalk.com/2011/12/source-qualifier-transformation-in.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_01.htmlhttp://www.folkstalk.com/2012/05/reverse-contents-of-flat-file.html#morehttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=1170033239048675103&target=facebookhttp://www.folkstalk.com/2012/05/reverse-contents-of-flat-file.html#comment-formhttp://www.folkstalk.com/search/label/Informaticahttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/12/source-qualifier-transformation.htmlhttp://www.folkstalk.com/2011/12/source-qualifier-transformation-in.htmlhttp://www.folkstalk.com/2011/12/source-qualifier-transformation-in.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_01.htmlhttp://www.folkstalk.com/2012/05/reverse-contents-of-flat-file.html

  • 8/18/2019 infa folktalks qns

    2/35

    create table EMP345EES

    !

      EMP345EE"ID #M$ER!/& not null'

      AME (AR)*AR+!,6&'

      3AST"AME (AR)*AR+!,6&'

      SA3AR5 #M$ER!,6'+&'

      MAA.ER"ID #M$ER!/&'

      DEPARTMET"ID #M$ER!%&

    &

    alter table EMP345EES a00 primary 1ey !EMP345EE"ID&2

    alter table EMP345EES a00 foreign 1ey !DEPARTMET"ID& referencesDEPARTMETS !DEPARTMET"ID&2

    Table ame7 Employees

    EMP345EE"ID AME SA3AR5 MAA.ER"ID DEPARTMET"ID

    8888888888888888888888888888888888888888888888888

    ,6, PAT ,666 +6, ,6

    ,6+ 9E(I +666 +6, ,6

    +6, MI9E -666 #33 ,6

    :6, ;4*

  • 8/18/2019 infa folktalks qns

    3/35

    +6 *R -6,

    Tr* olving the "elow examples&

    1. -reate a mapping to oin emplo*ees and departments ta"le on /E0ART1E2T3I/ columnusing source )ualifier transformation4

    Solution5. ource )ualifier transformation can "e used to oin sources onl* from the same data"ase.

    6. -onnect the source definitions of departments and emplo*ees to the same )ualifiertransformation.

    7. As there is a primar*8#e*, foreign8#e* relationship "etween the source ta"les, the source)ualifier transformation "* default oins the two sources on the /E0ART1E2T3I/ column.

    !. -reate a mapping to oin emplo*ees and departments ta"le on 1A2A9ER3I/ column usingsource )ualifier transformation4

    Solution

    5. -onnect the source definitions of departments and emplo*ees to the same )ualifiertransformation.

    6. 9o to the properties ta" of source )ualifier 8:;ser /efined ?EE.1A2A9ER3I/.-lic# >#.

    7. 2ow connect the re)uired ports from the source )ualifier transformation to the target.

    ". -reate a mapping to get onl* the emplo*ees who have manager4

    Solution

    This is ver* simple. 9o to the properties ta" of source )ualifier8: ource ilter. >pen the editorand enter E10%>?EE.1A2A9ER3I/ I 2>T 2;%%

    #. -reate a mapping to sort the data of emplo*ees ta"le on /E0ART1E2T3I/, A%AR?4

    Solution

    1a#e sure the ports order in the source )ualifier transformation as shown "elow

    DEPARTMET"ID

    SA3AR5

    EMP345EE"ID

    AME

    3AST"AME

  • 8/18/2019 infa folktalks qns

    4/35

    MAA.ER"ID

    The first two ports should "e /E0ART1E2T3I/, A%AR? and the rest of the ports can "e in an*order.

    2ow go to the properties ta" of source )ualifier8: 2um"er >f orted 0orts. 1a#e the 2um"er >forted 0orts value as 6.

    $. -reate a mapping to get onl* distinct departments in emplo*ees ta"le4

    Solution5. The source )ualifier transformation should onl* contain the /E0ART1E2T3I/ port from

    E10%>?EE source definition.

    6. 2ow go to the properties ta" of source )ualifier8: elect /istinct. -hec# the chec# "ox ofelect /istinct option.

    If *ou are interested to solve complex pro"lems on mappings, ust go through Examples ofInformatica 1appings.Email ThisBlogThis! hare to Twitterhare to ace"oo#$ comments %a"els& Informatica, Informatica Interview 'uestions

    Informatica %ro&lems 'ith Solutions - %art 11. In this pro"lem we will see how to implement the not e)ual operator, greater than, greater thanor e)ual to, less than and less than or e)ual to operators when oining two ta"les in informatica.

    -onsider the "elow sales ta"le as an example4

    Ta"le name& alesproduct, prod3)uantit*, price , ?ear 

     A , 5$ , 5$$ , 6$5$B , 5@ , 5@$ , 6$5$ A , , $ , 6$55B , 6 , 6$ , 6$55

    2ow the pro"lem is to identif* the products whose sales is less than in the current *ear CIn thisexample& 6$55D when compared to the last *ear.

    (ere in this example, 0roduct A sold less in 6$55 when compared with the sales in 6$5$.

    This pro"lem can "e easil* implemented with the help of '% )uer* as shown "elowE%E-T c*.

    R>1 A%E c*,  A%E p*F(ERE c*.product = p*.product A2/ c*.*ear=6$55 A2/ p*.*ear=6$5$ A2/ c*.prod3)uantit* G p*.prod3)uantit*H

    In informatica, *ou can specif* onl* e)ual to condition in oiner. 2ow we will see how toimplement this pro"lem using informatica.

    Solution

    TE05& -onnect two source )ualifier transformations to the source definition. -all the first source)ualifier transformation as s)3c* Cc* means current *earD and the other as s)3p* Cp* meansprevious *earD.

    http://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=facebookhttp://www.folkstalk.com/2011/12/source-qualifier-transformation.html#comment-formhttp://www.folkstalk.com/2011/12/source-qualifier-transformation.html#comment-formhttp://www.folkstalk.com/search/label/Informaticahttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/12/informatica-problems-with-solutions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7054353122857173899&target=facebookhttp://www.folkstalk.com/2011/12/source-qualifier-transformation.html#comment-formhttp://www.folkstalk.com/search/label/Informaticahttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/12/informatica-problems-with-solutions.html

  • 8/18/2019 infa folktalks qns

    5/35

    TE06& In the s)3c* source )ualifier transformation, specif* the source filter as price=6$55. Inthe s)3p*, specif* the source filter as price=6$5$

    TE07& 2ow connect these two source )ualifier transformations to oiner transformation andma#e s)3c* as master, s)3p* as detail. In the oin condition, select the product port from master

    and detail.

    TE0& 2ow connect all the master ports and onl* the prod3)uantit* port from detail to the filtertransformation. In the filter transformation specif* the filter condition as prod3)uantit* Gprod3)uantit*5. (ere pord3)uantit* port is from master port and prod3)uantit*5 is from detailport.

    TE0& -onnect all the ports except the prod3)uantit*5 of filter transformation to the targetdefinition.

    !. (ow to implement the not exists operator in informatica which is availa"le in data"ase4

    Solution

    Implementing the 2ot Exists operator is ver* eas* in informatica. or example, we want to getonl* the records which are availa"le in ta"le A and not in ta"le B. or this use a oinertransformation with A as master and B as detail. pecif* the oin condition and in the oin t*pe,select detail outer oin. This will get all the records from A ta"le and onl* the matching recordsfrom B ta"le.

    -onnect the oiner to a filter transformation and specif* the filter condition as B3port is 2;%%.This will give the records which are in A and not in B. Then connect the filter to the targetdefinition.

    or informatica scenario )uestions& Informatica cenariosEmail ThisBlogThis! hare to Twitterhare to ace"oo#$ comments %a"els& Informatica Interview 'uestions

    Informatica Intervie( Questions - %art !5. Fhat are the differences "etween oiner transformation and source )ualifier transformation4 A oiner transformation can oin heterogeneous data sources where as a source )ualifier can oinonl* homogeneous sources. ource )ualifier transformation can oin data from onl* relationalsources "ut cannot oin flat files.

    6. Fhat are the limitations of oiner transformation4

    • Both pipelines "egin with the same original data source.

    Both input pipelines originate from the same ource 'ualifier transformation.• Both input pipelines originate from the same 2ormali+er transformation.

    • Both input pipelines originate from the same

  • 8/18/2019 infa folktalks qns

    6/35

    . Fhat are the oin t*pes in oiner transformation4The oin t*pes are

    • 2ormal C/efaultD

    • 1aster outer 

    • /etail outer 

    • ull outer 

    @. Fhat are the oiner caches4Fhen a

  • 8/18/2019 infa folktalks qns

    7/35

    Binar* sort order. If *ou configure the session to use a "inar* sort order, the informatica servercalculates the "inar* value of each string and returns the specified num"er of rows with thehighest "inar* values for the string.

    5. Fhat are the ran# caches4/uring the session, the informatica server compares an input row with rows in the data cache. If

    the input row out8ran#s a stored row, the informatica server replaces the stored row with the inputrow. The informatica server stores group information in an index cache and row data in a datacache.

    5@. Fhat is the Ran#index port in Ran# transformation4The /esigner automaticall* creates a RA2LI2/EM port for each Ran# transformation. TheInformatica erver uses the Ran# Index port to store the ran#ing position for each record in agroup.

    5. Fhat is the Router transformation4 A Router transformation is similar to a ilter transformation "ecause "oth transformations allow*ou to use a condition to test data. (owever, a ilter transformation tests data for one condition

    and drops the rows of data that do not meet the condition. A Router transformation tests data forone or more conditions and gives *ou the option to route rows of data that do not meet an* of theconditions to a default output group.If *ou need to test the same input data "ased on multiple conditions, use a RouterTransformation in a mapping instead of creating multiple ilter transformations to perform thesame tas#.

    5J. Fhat are the t*pes of groups in Router transformation4The different t*pes of groups in router transformation are

    • Input group

    • >utput group

    The output group contains two t*pes. The* are

    • ;ser defined groups

    • /efault group

    5. Fhat are the t*pes of data that passes "etween informatica server and stored procedure4Three t*pes of data passes "etween the informatica server and stored procedure.

    • InputN>utput parameters

    • Return Oalues

    • tatus code.

    5K. Fhat is the status code in stored procedure transformation4tatus code provides error handling for the informatica server during the session. The stored

    procedure issues a status code that notifies whether or not stored procedure completedsuccessfull*. This value cannot seen "* the user. It onl* used "* the informatica server todetermine whether to continue running the session or stop.

    6$. Fhat is the target load order4?ou can specif* the target load order "ased on source )ualifiers in a mapping. If *ou have themultiple source )ualifiers connected to the multiple targets, *ou can designate the order in whichinformatica server loads data into the targets.Email ThisBlogThis! hare to Twitterhare to ace"oo#$ comments %a"els& Informatica Interview 'uestions

    Informatica Intervie( Questions - %art 1

    5. Fhile importing the relational source definition from the data"ase, what are the metadata ofsource that will "e imported4The metadata of the source that will "e imported are&

    http://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=facebookhttp://www.folkstalk.com/2011/08/informatica-interview-questions-part-2.html#comment-formhttp://www.folkstalk.com/2011/08/informatica-interview-questions-part-2.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/08/informatica-interview-questions-part-1.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=8090152703831992009&target=facebookhttp://www.folkstalk.com/2011/08/informatica-interview-questions-part-2.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/08/informatica-interview-questions-part-1.html

  • 8/18/2019 infa folktalks qns

    8/35

    • ource name

    • /ata"ase location

    • -olumn names

    • /ata t*pePs

    Le* constraints6. (ow man* wa*s a relational source definition can "e updated and what are the*4There are two wa*s to update the relational source definition&

    • Edit the definition

    • Re8import the definition

    7. To import the flat file definition into the designer where should the flat file "e placed40lace the flat file in local folder in the local machine

    . To provide support for 1ainframes source data, which files are used as a source definitions4->B>% files

    @. Fhich transformation is needed while using the co"ol sources as source definitions4 As co"ol sources consists of denormali+ed data, normali+er transformation is re)uired tonormali+e the data.

    . (ow to create or import flat file definition in to the warehouse designer4Fe cannot create or import flat file definition into warehouse designer directl*. Fe can create orimport the file in source anal*+er and then drag it into the warehouse designer.

    J. Fhat is a mapplet4 A mapplet is a set of transformations that *ou "uild in the mapplet designer and can "e used inmultiple mappings.

    . Fhat is a transformation4

    It is a repositor* o"ect that generates, modifies or passes data.

    K. Fhat are the designer tools for creating transformations4

    • 1apping designer 

    • Transformation developer 

    • 1applet designer 

    5$. Fhat are active and passive transformations4 An active transformation can change the num"er of rows that pass through it. A passivetransformation does not change the num"er of rows that pass through it.

    55. Fhat are connected or unconnected transformations4

     An unconnected transformation is not connected to other transformations in the mapping.-onnected transformation is connected to other transformations in the mapping pipeline.

    56. (ow man* wa*s are there to create ports4There are two wa*s to create the ports&

    • /rag the port from another transformation

    • -lic# the add "utton on the ports ta".

    57. Fhat are the reusa"le transformations4Reusa"le transformations can "e used in multiple mappings and mapplets. Fhen *ou need toinclude this transformation into a mapping or a mapplet, an instance of it is dragged into themapping or mapplet. ince, the instance of reusa"le transformation is a pointer to that

    transformation, an* change in the reusa"le transformation will "e inherited "* all the instances.

    5. Fhat are the methods for creating reusa"le transformations4

  • 8/18/2019 infa folktalks qns

    9/35

    Two methods&

    • /esign it in the transformation developer.

    • 0romote a standard transformation C2on reusa"leD from the mapping designer. After

    adding a transformation to the mapping, we can promote it to the status of reusa"le transformation.

    5@. Fhat are the unsupported repositor* o"ects for a mapplet4

    • ->B>% source definition

  • 8/18/2019 infa folktalks qns

    10/35

    The a"ove tree structure data is represented in a ta"le as shown "elow.

    c5, c6, c7, c A, B, /, ( A, B, /, I A, B, E, 2;%% A, -, , 2;%% A, -, 9, 2;%%

    (ere in this ta"le, column -5 is parent of column -6, column -6 is parent of column -7, column-7 is parent of column -.

    Q1. /esign a mapping to load the target ta"le with the "elow data. (ere *ou need to generatese)uence num"ers for each element and then *ou have to get the parent id. As the element A

    is at root, it does not have an* parent and its parent3id is 2;%%.

    id, element, parent3id5, A, 2;%%6, B, 57, -, 5, /, 6@, E, 6, , 7J, 9, 7, (, K, I,

    I have provided the solution for this pro"lem in >racle )l )uer*. If *ou are interested *oucan -lic# (ere to see the solution.

    Q!. This is an extension to the pro"lem '5. %et sa* column -6 has null for all the rows, then -5"ecomes the parent of -7 and c7 is parent of -. %et sa* "oth columns c6 and c7 has null for allthe rows. Then c5 "ecomes the parent of c. /esign a mapping to accommodate these t*pe ofnull conditions.

    or more scenario "ased )uestions visit0art5 0art60art70art0art@

    http://www.folkstalk.com/2011/11/oracle-complex-queries-part-3.htmlhttp://www.folkstalk.com/2011/11/oracle-complex-queries-part-3.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/07/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/oracle-complex-queries-part-3.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/07/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html

  • 8/18/2019 infa folktalks qns

    11/35

    Email ThisBlogThis! hare to Twitterhare to ace"oo#6 comments %a"els& Informatica Interview 'uestions

    Informatica Intervie( Questions on TransformationsThe transformations which used mostl* are listed in the "elow ta"le. -lic# on the transforamtionto see the interview )uestions on the particular transformation.

    Aggregator    Active/Connected

    Expression   Passive/Connected

    Filter    Active/Connected

    Joiner    Active/Connected

    Lookup   Passive/Connected or Unconnected

     Normalizer    Active/Connected

    Rank    Active/Connected

    Router    Active/Connected

    e!uence "enerator    Passive/Connected

    orter    Active/Connectedource #uali$ier    Active/Connected

    #L   Active or Passive/Connected

    tored Procedure   Passive/Connected or Unconnected

    %ransaction Control   Active/Connected

    Union   Active/Connected

    Update trateg&   Active/Connected

    5. Fhat is a transformation4

     A transformation is a repositor* o"ect that generates, modifies, or passes data.

    6. Fhat is an active transformation4 An active transformation is the one which changes the num"er of rows that pass through it.Example& ilter transformation

    7. Fhat is a passive transformation4 A passive transformation is the one which does not change the num"er of rows that pass throughit.Example& Expression transformation

    . Fhat is a connected transformation4 A connected transformation is connected to the data flow or connected to the other

    transformations in the mapping pipeline.Example& sorter transformation

    @. Fhat is an unconnected transformation4 An unconnected transformation is not connected to other transformations in the mapping. Anunconnected transformation is called within another transformation and returns a value to thattransformation.Example& ;nconnected loo#up transformation, unconnected stored procedure transformation

    . Fhat are multi8group transformations4Transformations having multiple input and output groups are called multi8group transformations.Examples& -ustom, (TT0,

  • 8/18/2019 infa folktalks qns

    12/35

    J. %ist out all the transformations which use cache4 Aggregator,

  • 8/18/2019 infa folktalks qns

    13/35

    not "e row num"er 5 in the output stream. ;nion does not even guarantee that the output isrepeata"le

    Recommen*e* %osts

     Aggregator Transformation Interview 'uestions

    ilter Transformation Interview 'uestions2TI2;E3TRA2A-TI>2& The Integration ervice does not perform an*

    transaction change for this row. This is the default value of the expression.

    • T-3->11IT3BE>RE& The Integration ervice commits the transaction, "egins a new

    transaction, and writes the current row to the target. The current row is in the new transaction.

    • T-3->11IT3ATER& The Integration ervice writes the current row to the target,

    commits the transaction, and "egins a new transaction. The current row is in the committedtransaction.

    • T-3R>%%BA-L3BE>RE& The Integration ervice rolls "ac# the current transaction,

    "egins a new transaction, and writes the current row to the target. The current row is in the newtransaction.

    • T-3R>%%BA-L3ATER& The Integration ervice writes the current row to the target,

    rolls "ac# the transaction, and "egins a new transaction. The current row is in the rolled "ac#transaction.

    Recommen*e* %osts

    ;nion Transformation Interview 'uestions Aggregator Transformation Interview 'uestionsilter Transformation Interview 'uestions

  • 8/18/2019 infa folktalks qns

    14/35

    !. Fh* sorter is an active transformation4

     As sorter transformation can suppress the duplicate records in the source, it is called an activetransformation.

    ". (ow to improve the performance of a session using sorter transformation4

    ort the data using sorter transformation "efore passing in to aggregator or oiner transformation. As the data is sorted, the integration service uses the memor* to do aggregate and oinoperations and does not use cache files to process the data.

    Recommen*e* %osts

    Transaction -ontrol Transformation Interview 'uestions;nion Transformation Interview 'uestions Aggregator Transformation Interview 'uestionsilter Transformation Interview 'uestions

  • 8/18/2019 infa folktalks qns

    15/35

    Employee"i0' Salary' )umulati=e"sum

    88888888888888888888888888888888888

    ,6' ,666' ,666

    +6' +666' :666

    :6' :666' /666

    %6' -666' ,,666

    Q!. /esign a mapping to get the pervious row salar* for the current row. If there is no perviousrow exists for the current row, then the pervious row salar* should "e displa*ed as null.The output should loo# li#e as

    Employee"i0' Salary' Pre"row"salary

    88888888888888888888888888888888888

    ,6' ,666' ull

    +6' +666' ,666

    :6' :666' +666

    %6' -666' :666

    #. -onsider the following emplo*ees ta"le as source

    Department"no' Employee"name

    8888888888888888888888888888

    +6' R

    ,6' A

    ,6' D

    +6' P

    ,6' $

  • 8/18/2019 infa folktalks qns

    16/35

    ,6' )

    +6' >

    +6' S

    Q1. /esign a mapping to load a target ta"le with the following values from the a"ove source4

    Department"no' Employee"list

    8888888888888888888888888888

    ,6' A

    ,6' A'$

    ,6' A'$')

    ,6' A'$')'D

    +6' A'$')'D'P

    +6' A'$')'D'P'>

    +6' A'$')'D'P'>'R

    +6' A'$')'D'P'>'R'S

    Q!. /esign a mapping to load a target ta"le with the following values from the a"ove source4

    Department"no' Employee"list

    8888888888888888888888888888

    ,6' A

    ,6' A'$

    ,6' A'$')

    ,6' A'$')'D

    +6' P

  • 8/18/2019 infa folktalks qns

    17/35

    +6' P'>

    +6' P'>'R

    +6' P'>'R'S

    -lic# (ere to #now the solutions for the )uestion 7 and

    Recommen*e* %osts

    orter Transformation Interview 'uestionsTransaction -ontrol Transformation Interview 'uestions;nion Transformation Interview 'uestions Aggregator Transformation Interview 'uestionsilter Transformation Interview 'uestions

    Email ThisBlogThis! hare to Twitterhare to ace"oo#@ comments %a"els& Informatica Interview 'uestions

    Informatica Scenario ase* Questions - %art "1. -onsider the following product t*pes data as the source.

    0roduct3id, product3t*pe5$, video5$, Audio6$, Audio7$, Audio$, Audio

    @$, Audio5$, 1ovie6$, 1ovie7$, 1ovie$, 1ovie@$, 1ovie$, 1ovie

     Assume that there are onl* 7 product t*pes are availa"le in the source. The source contains 56records and *ou dont #now how man* products are availa"le in each product t*pe.

    Q1. /esign a mapping to select K products in such a wa* that 7 products should "e selectedfrom video, 7 products should "e selected from Audio and the remaining 7 products should "eselected from 1ovie.

    Solution

    Step1 ;se sorter transformation and sort the data using the #e* as product3t*pe.

    Step! -onnect the sorter transformation to an expression transformation. In the expressiontransformation, the ports will "e

    product3id

    product3t*peO3curr3prod3t*pe=product3t*peO3count = IICO3curr3prod3t*pe = O3prev3prod3t*pe,O3countQ5,5D

    http://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_22.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_9151.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_5913.htmlhttp://www.folkstalk.com/2011/05/informatica-interview-questions-on.htmlhttp://www.folkstalk.com/2011/05/informatica-interview-questions-on_29.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=facebookhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_20.html#comment-formhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_20.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_22.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_9151.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_5913.htmlhttp://www.folkstalk.com/2011/05/informatica-interview-questions-on.htmlhttp://www.folkstalk.com/2011/05/informatica-interview-questions-on_29.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=3335107249696777029&target=facebookhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_20.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.html

  • 8/18/2019 infa folktalks qns

    18/35

    O3prev3prod3t*pe=product3t*pe>3count=O3count

    Step" 2ow connect the expression transformaion to a filter transformation and specif* the filtercondition as >3countG=7. 0ass the output of filter to a target ta"le.

    Q!. In the a"ove pro"lem '5, if the num"er of products in a particular product t*pe are less than7, then *ou wont get the total K records in the target ta"le. or example, see the videos t*pe inthe source data. 2ow design a mapping in such wa* that even if the num"er of products in aparticular product t*pe are less than 7, then *ou have to get those less num"er of records fromanother porduc t*pes. or example& If the num"er of products in videos are 5, then thereamaining 6 records should come from audios or movies. o, the total num"er of records in thetarget ta"le should alwa*s "e K.

    Solution

    The first two steps are same as a"ove.

    Step" -onnect the expression transformation to a sorter transformation and sort the data usingthe #e* as >3count. The ports in soter transformation will "e

    product3idproduct3t*pe>3count Csort #e*D

    Step" /iscard >3count port and connect the sorter transformation to an expressiontransformation. The ports in expression transformation will "e

    product3id

    product3t*peO3count=O3countQ5>3prod3count=O3count

    Step# -onnect the expression to a filter transformation and specif* the filter condition as>3prod3countG=K. -onnect the filter transformation to a target ta"le.

    !. /esign a mapping to convert column data into row data without using the normali+ertransformation.The source data loo#s li#e

    col5, col6, col7a, ", cd, e, f 

    The target ta"le data should loo# li#e

    -ola"cdef 

    Solution

  • 8/18/2019 infa folktalks qns

    19/35

    -reate three expression transformations with one port each. -onnect col5 from ource 'ualifierto port in first expression transformation. -onnect col6 from ource 'ualifier to port in secondexpression transformation. -onnect col7 from source )ualifier to port in third expressiontransformation. -reate a union transformation with three input groups and each input groupshould have one port. 2ow connect the expression transformations to the input groups and

    connect the union transformation to the target ta"le.

    ". /esign a mapping to convert row data into column data.The source data loo#s li#e

    id, value5$, a5$, "5$, c6$, d6$, e

    6$, f 

    The target ta"le data should loo# li#e

    id, col5, col6, col75$, a, ", c6$, d, e, f 

    Solution

    Step1 ;se sorter transformation and sort the data using id port as the #e*. Then connect thesorter transformation to the expression transformation.

    Step! In the expression transformation, create the ports and assign the expressions asmentioned "elow.

    idvalueO3curr3id=idO3count= IICv3curr3id=O3prev3id,O3countQ5,5DO3prev3id=id>3col5= IICO3count=5,value,2;%%D>3col6= IICO3count=6,value,2;%%D>3col7= IICO3count=7,value,2;%%D

    Step" -onnect the expression transformation to aggregator transformation. In the aggregatortransforamtion, create the ports and assign the expressions as mentioned "elow.

    id Cspecif* group "* on this portD>3col5>3col6>3col7col5=1AMC>3col5Dcol6=1AMC>3col6Dcol7=1AMC>3col7D

    Stpe# 2ow connect the ports id, col5, col6, col7 from aggregator transformation to the target

    ta"le.

  • 8/18/2019 infa folktalks qns

    20/35

    or more scenario "ased )uestions visit0art5 0art60art70art0art@

    If *ou li#e this post, please share it "* clic#ing on Q5 Button.Email ThisBlogThis! hare to Twitterhare to ace"oo#5 comments %a"els& Informatica Interview 'uestions

    Informatica Scenario ase* Questions - %art !1. -onsider the following emplo*ees data as source

    emplo*ee3id, salar*5$, 5$$$6$, 6$$$7$, 7$$$

    $, @$$$

    Q1. /esign a mapping to load the cumulative sum of salaries of emplo*ees into target ta"le4The target ta"le data should loo# li#e as

    emplo*ee3id, salar*, cumulative3sum5$, 5$$$, 5$$$6$, 6$$$, 7$$$7$, 7$$$, $$$$, @$$$, 55$$$

    Solution

    -onnect the source 'ualifier to expression transformation. In the expression transformation,create a varia"le port O3cum3sal and in the expression editor write O3cum3salQsalar*. -reate anoutput port >3cum3sal and assign O3cum3sal to it.

    Q!. /esign a mapping to get the pervious row salar* for the current row. If there is no perviousrow exists for the current row, then the pervious row salar* should "e displa*ed as null.The output should loo# li#e as

    emplo*ee3id, salar*, pre3row3salar*5$, 5$$$, 2ull

    6$, 6$$$, 5$$$7$, 7$$$, 6$$$$, @$$$, 7$$$

    Solution

    -onnect the source 'ualifier to expression transformation. In the expression transformation,create a varia"le port O3count and increment it "* one for each row entering the expressiontransformation. Also create O3salar* varia"le port and assign the expressionIICO3count=5,2;%%,O3prev3salar*D to it . Then create one more varia"le port O3prev3salar*and assign alar* to it. 2ow create output port >3prev3salar* and assign O3salar* to it. -onnectthe expression transformation to the target ports.

    In the expression transformation, the ports will "e

    http://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/07/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/informatica-scenario-based-questions.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=facebookhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.html#comment-formhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/07/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/informatica-scenario-based-questions.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=7556445942805495601&target=facebookhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.html

  • 8/18/2019 infa folktalks qns

    21/35

    emplo*ee3idsalar*O3count=O3countQ5O3salar*=IICO3count=5,2;%%,O3prev3salar*DO3prev3salar*=salar*

    >3prev3salar*=O3salar*

    Q". /esign a mapping to get the next row salar* for the current row. If there is no next row for thecurrent row, then the next row salar* should "e displa*ed as null.The output should loo# li#e as

    emplo*ee3id, salar*, next3row3salar*5$, 5$$$, 6$$$6$, 6$$$, 7$$$7$, 7$$$, @$$$$, @$$$, 2ull

    Solution

    Step1 -onnect the source )ualifier to two expression transformation. In each expressiontransformation, create a varia"le port O3count and in the expression editor write O3countQ5. 2owcreate an output port >3count in each expression transformation. In the first expressiontransformation, assign O3count to >3count. In the second expression transformation assignO3count85 to >3count.

    In the first expression transformation, the ports will "e

    emplo*ee3id

    salar*O3count=O3countQ5>3count=O3count

    In the second expression transformation, the ports will "e

    emplo*ee3idsalar*O3count=O3countQ5>3count=O3count85

    Step! -onnect "oth the expression transformations to oiner transformation and oin them onthe port >3count. -onsider the first expression transformation as 1aster and second one asdetail. In the oiner specif* the oin t*pe as /etail >uter

  • 8/18/2019 infa folktalks qns

    22/35

    emplo*ee3id, salar*, salar*3sum5$, 5$$$, 55$$$6$, 6$$$, 55$$$7$, 7$$$, 55$$$$, @$$$, 55$$$

    Solution

    Step1 -onnect the source )ualifier to the expression transformation. In the expressiontransformation, create a dumm* port and assign value 5 to it.

    In the expression transformation, the ports will "e

    emplo*ee3idsalar*>3dumm*=5

    Step! 0ass the output of expression transformation to aggregator. -reate a new port>3sum3salar* and in the expression editor write ;1Csalar*D. /o not specif* group "* on an*port.

    In the aggregator transformation, the ports will "e

    salar*>3dumm*>3sum3salar*=;1Csalar*D

    Step" 0ass the output of expression transformation, aggregator transformation to oinertransformation and oin on the /;11? port. In the oiner transformation chec# the propert*

    sorted input, then onl* *ou can connect "oth expression and aggregator to oiner transformation.

    Step# 0ass the output of oiner to the target ta"le.

    !. -onsider the following emplo*ees ta"le as source

    department3no, emplo*ee3name6$, R5$, A5$, /6$, 05$, B5$, -6$, '6$,

    Q1. /esign a mapping to load a target ta"le with the following values from the a"ove source4

    department3no, emplo*ee3list5$, A5$, A,B5$, A,B,-5$, A,B,-,/

    6$, A,B,-,/,06$, A,B,-,/,0,'

  • 8/18/2019 infa folktalks qns

    23/35

    6$, A,B,-,/,0,',R6$, A,B,-,/,0,',R,

    Solution

    Step1 ;se a sorter transformation and sort the data using the sort #e* as department3no and

    then pass the output to the expression transformation. In the expression transformation, the portswill "e

    department3noemplo*ee3nameO3emplo*ee3list = IICI2;%%CO3emplo*ee3listD,emplo*ee3name,O3emplo*ee3listS,Semplo*ee3nameD>3emplo*ee3list = O3emplo*ee3list

    Step! 2ow connect the expression transformation to a target ta"le.

    Q!. /esign a mapping to load a target ta"le with the following values from the a"ove source4

    department3no, emplo*ee3list5$, A5$, A,B5$, A,B,-5$, A,B,-,/6$, 06$, 0,'6$, 0,',R6$, 0,',R,

    Solution

    Step1 ;se a sorter transformation and sort the data using the sort #e* as department3no andthen pass the output to the expression transformation. In the expression transformation, the portswill "e

    department3noemplo*ee3nameO3curr3deptno=department3noO3emplo*ee3list = IICO3curr3deptno! = O3prev3deptno,emplo*ee3name,O3emplo*ee3listS,Semplo*ee3nameDO3prev3deptno=department3no>3emplo*ee3list = O3emplo*ee3list

    Step! 2ow connect the expression transformation to a target ta"le.

    Q". /esign a mapping to load a target ta"le with the following values from the a"ove source4

    department3no, emplo*ee3names5$, A,B,-,/6$, 0,',R,

    Solution 

    The first step is same as the a"ove pro"lem. 0ass the output of expression to an aggregatortransformation and specif* the group "* as department3no. 2ow connect the aggregator

  • 8/18/2019 infa folktalks qns

    24/35

    transformation to a target ta"le.

    or more scenario "ased )uestions visit0art5 0art60art7

    0art0art@

    If *ou li#e this post, please share it "* clic#ing on Q5 Button.Email ThisBlogThis! hare to Twitterhare to ace"oo#55 comments %a"els& Informatica Interview 'uestions

    Informatica Scenario ase* Intervie( Questions (ith ,ns(ers - %art 11. (ow to generate se)uence num"ers using expression transformation4

    SolutionIn the expression transformation, create a varia"le port and increment it "* 5. Then assign the

    varia"le port to an output port. In the expression transformation, the ports are&O3count=O3countQ5>3count=O3count

    !. /esign a mapping to load the first 7 rows from a flat file into a target4

    Solution?ou have to assign row num"ers to each record. 9enerate the row num"ers either using theexpression transformation as mentioned a"ove or use se)uence generator transformation.Then pass the output to filter transformation and specif* the filter condition as >3count G=7

    ". /esign a mapping to load the last 7 rows from a flat file into a target4

    Solution-onsider the source has the following data.cola"cde

    Step1 ?ou have to assign row num"ers to each record. 9enerate the row num"ers using theexpression transformation as mentioned a"ove and call the row num"er generated port as>3count. -reate a /;11? output port in the same expression transformation and assign 5 to

    that port. o that, the /;11? output port alwa*s return 5 for each row.

    In the expression transformation, the ports areO3count=O3countQ5>3count=O3count>3dumm*=5

    The output of expression transformation will "ecol, o3count, o3dumm*a, 5, 5", 6, 5c, 7, 5

    d, , 5e, @, 5

    http://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/07/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/informatica-scenario-based-questions.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=facebookhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.html#comment-formhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/07/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/informatica-scenario-based-questions.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=4755954548985243445&target=facebookhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.html

  • 8/18/2019 infa folktalks qns

    25/35

    Step! 0ass the output of expression transformation to aggregator and do not specif* an* group"* condition. -reate an output port >3total3records in the aggregator and assign >3count port toit. The aggregator will return the last row "* default. The output of aggregator contains the/;11? port which has value 5 and >3total3records port which has the value of total num"er ofrecords in the source.

    In the aggregator transformation, the ports are>3dumm*>3count>3total3records=>3count

    The output of aggregator transformation will "e>3total3records, >3dumm*@, 5

    Step" 0ass the output of expression transformation, aggregator transformation to oinertransformation and oin on the /;11? port. In the oiner transformation chec# the propert*

    sorted input, then onl* *ou can connect "oth expression and aggregator to oiner transformation.

    In the oiner transformation, the oin condition will "e>3dumm* Cport from aggregator transformationD = >3dumm* Cport from expressiontransformationD

    The output of oiner transformation will "ecol, o3count, o3total3recordsa, 5, @", 6, @c, 7, @d, , @

    e, @, @

    Step# 2ow pass the ouput of oiner transformation to filter transformation and specif* the filtercondition as >3total3records Cport from aggregatorD8>3countCport from expressionD G=6

    In the filter transformation, the filter condition will "e>3total3records 8 >3count G=6

    The output of filter transformation will "ecol o3count, o3total3recordsc, 7, @d, , @e, @, @

    #. /esign a mapping to load the first record from a flat file into one ta"le A, the last record from aflat file into ta"le B and the remaining records into ta"le -4

    SolutionThis is similar to the a"ove pro"lemH the first 7 steps are same. In the last step instead of usingthe filter transformation, *ou have to use router transformation. In the router transformationcreate two output groups.

    In the first group, the condition should "e >3count=5 and connect the corresponding outputgroup to ta"le A. In the second group, the condition should "e >3count=>3total3records andconnect the corresponding output group to ta"le B. The output of default group should "e

    connected to ta"le -.

  • 8/18/2019 infa folktalks qns

    26/35

    $. -onsider the following products data which contain duplicate rows. AB--B

    /B

    Q1. /esign a mapping to load all uni)ue products in one ta"le and the duplicate rows in anotherta"le.The first ta"le should contain the following output A/

    The second target should contain the following outputBB

    B--

    Solution;se sorter transformation and sort the products data. 0ass the output to an expressiontransformation and create a dumm* port >3dumm* and assign 5 to that port. o that, the/;11? output port alwa*s return 5 for each row.

    The output of expression transformation will "e0roduct, >3dumm* A, 5

    B, 5B, 5B, 5-, 5-, 5/, 5

    0ass the output of expression transformation to an aggregator transformation. -hec# the group"* on product port. In the aggreagtor, create an output port >3count3of3each3product and writean expression countCproductD.

    The output of aggregator will "e0roduct, >3count3of3each3product A, 5B, 7-, 6/, 5

    2ow pass the output of expression transformation, aggregator transformation to oinertransformation and oin on the products port. In the oiner transformation chec# the propert*sorted input, then onl* *ou can connect "oth expression and aggregator to oiner transformation.

    The output of oiner will "eproduct, >3dumm*, >3count3of3each3product A, 5, 5

    B, 5, 7B, 5, 7

  • 8/18/2019 infa folktalks qns

    27/35

    B, 5, 7-, 5, 6-, 5, 6/, 5, 5

    2ow pass the output of oiner to a router transformation, create one group and specif* the group

    condition as >3dumm*=>3count3of3each3product. Then connect this group to one ta"le.-onnect the output of default group to another ta"le.

    Q!. /esign a mapping to load each product once into one ta"le and the remaining productswhich are duplicated into another ta"le.The first ta"le should contain the following output AB-/

    The second ta"le should contain the following output

    BB-

    Solution;se sorter transformation and sort the products data. 0ass the output to an expressiontransformation and create a varia"le port,O3curr3product, and assign product port to it. Thencreate a O3count port and in the expression editor write IICO3curr3product=O3prev3product,O3countQ5,5D. -reate one more varia"le port O3prev3port and assign product port to it. 2owcreate an output port >3count port and assign O3count port to it.

    In the expression transformation, the ports are

    0roductO3curr3product=productO3count=IICO3curr3product=O3prev3product,O3countQ5,5DO3prev3product=product>3count=O3count

    The output of expression transformation will "e0roduct, >3count A, 5B, 5B, 6B, 7-, 5-, 6/, 5

    2ow 0ass the output of expression transformation to a router transformation, create one groupand specif* the condition as >3count=5. Then connect this group to one ta"le. -onnect theoutput of default group to another ta"le.

    or more scenario "ased )uestions visit0art5 0art60art7

    0art0art@

    http://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/07/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/06/informatica-scenario-based-questions_17.htmlhttp://www.folkstalk.com/2011/07/informatica-scenario-based-questions.htmlhttp://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html

  • 8/18/2019 infa folktalks qns

    28/35

    If *ou li#e this post, please share it "* clic#ing on Q5 Button.Email ThisBlogThis! hare to Twitterhare to ace"oo#7 comments %a"els& Informatica Interview 'uestions

    Informatica Intervie( Questions on SQ Transformation

    1. Fhat is '% transformation4'% transformation process '% )ueries midstream in a pipeline and *ou can insert, update,delete and retrieve rows from a data"ase.

    !. (ow do *ou configure a '% transformation4The following options are re)uired to configure '% transformation&

    • 1ode& pecifies the mode in which '% transformation runs. '% transformation

    supports two modes. The* are script mode and )uer* mode.

    • /ata"ase t*pe& The t*pe of data"ase that '% transformation connects to.

    • -onnection t*pe& 0ass data"ase connection to the '% transformation at run time or

    specif* a connection o"ect.

    ". Fhat are the different modes in which a '% transformation runs4'% transformation runs in two modes. The* are&

    • cript mode& The '% transformation runs scripts that are externall* located. ?ou can

    pass a script name to the transformation with each input row. The '% transformation outputs onerow for each input row.

    • 'uer* mode& The '% transformation executes a )uer* that *ou define in a )uer* editor.

    ?ou can pass parameters to the )uer* to define d*namic )ueries. ?ou can output multiple rowswhen the )uer* has a E%E-T statement.

    #. In which cases the '% transformation "ecomes a passive transformation and activetransformation4If *ou run the '% transformation in script mode, then it "ecomes passive transformation. If *ourun the '% transformation in the )uer* mode and the )uer* has a E%E-T statement, then it"ecomes an active transformation.

    $. Fhen *ou configure an '% transformation to run in script mode, what are the ports that thedesigner adds to the '% transformation4The designer adds the following ports to the '% transformation in script mode&

    • cript2ame& This is an input port. cript2ame receives the name of the script to execute

    the current row.

    • criptResult& This is an output port. criptResult returns 0AE/ if the script execution

    succeeds for the row. >therwise it returns AI%E/.

    • criptError& This is an output port. criptError returns the errors that occur when a script

    fails for a row.

    . Fhat are the t*pes of '% )ueries *ou can specif* in the '% transformation when *ou use itin )uer* mode.

    • tatic '% )uer*& The )uer* statement does not change, "ut *ou can use )uer*

    parameters to change the data. The integration service prepares the )uer* once and runs the )uer*for all input rows.

    • /*namic '% )uer*& The )uer* statement can "e changed. The integration service

    prepares a )uer* for each input row.

    /. Fhat are the t*pes of connections to connect the '% transformation to the data"ase

    availa"le4

    http://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=facebookhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-interview-questions-on-sql.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=5404817420011788456&target=facebookhttp://www.folkstalk.com/2011/06/informatica-scenario-based-interview.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-interview-questions-on-sql.html

  • 8/18/2019 infa folktalks qns

    29/35

    • tatic connection& -onfigure the connection o"ect tin the session. ?ou must first create

    the connection o"ect in wor#flow manager.

    • %ogical connection& 0ass a connection name to the '% transformation as input data at

    run time. ?ou must first create the connection o"ect in wor#flow manager.

    • ull data"ase connection& 0ass the connect string, user name, password and other

    connection information to '% transformation input ports at run time.

    0. (ow do *ou find the num"er of rows inserted, updated or deleted in a ta"le4?ou can ena"le the 2umRowsAffected output port to return the num"er of rows affected "* theI2ERT, ;0/ATE or /E%ETE )uer* statements in each input row. This 2umRowsAffectedoption wor#s in )uer* mode.

    . Fhat will "e the output of 2umRowsAffected port for a E%E-T statement4The 2umRowsAffected outout is +ero for the E%E-T statement.

    12. Fhen *ou ena"le the 2umRowsAffected output port in script mode, what will "e the output4In script mode, the 2umRowsAffected port alwa*s returns 2;%%.

    11. (ow do *ou limit the num"er of rows returned "* the select statement4?ou can limit the num"er of rows "* configuring the 1ax >utput Row -ount propert*. Toconfigure unlimited output rows, set 1ax >utput Row -ount to +ero.

    Recommen*e* %osts

    Expression Transformation Interview 'uestionsorter Transformation Interview 'uestionsTransaction -ontrol Transformation Interview 'uestions;nion Transformation Interview 'uestions Aggregator Transformation Interview 'uestions

    Email ThisBlogThis! hare to Twitterhare to ace"oo#$ comments %a"els& Informatica Interview 'uestions

    Informatica Intervie( Questions on oo3up Transformation1. Fhat is a loo#up transformation4 A loo#up transformation is used to loo# up data in a flat file, relational ta"le, view, and s*non*m.

    !. Fhat are the tas#s of a loo#up transformation4The loo#up transformation is used to perform the following tas#s4

    • 9et a related value& Retrieve a value from the loo#up ta"le "ased on a value in the

    source.

    • 0erform a calculation& Retrieve a value from a loo#up ta"le and use it in a calculation.

    • ;pdate slowl* changing dimension ta"les& /etermine whether rows exist in a target.

    ". (ow do *ou configure a loo#up transformation4-onfigure the loo#up transformation to perform the following t*pes of loo#ups&

    • Relational or flat file loo#up

    • 0ipeline loo#up

    • -onnected or unconnected loo#up

    • -ached or uncached loo#up

    #. Fhat is a pipeline loo#up transformation4 A pipeline loo#up transformation is used to perform loo#up on application sources such as

  • 8/18/2019 infa folktalks qns

    30/35

    $. Fhat is connected and unconnected loo#up transformation4

    •  A connected loo#up transformation is connected the transformations in the mapping

    pipeline. It receives source data, performs a loo#up and returns data to the pipeline.

    •  An unconnected loo#up transformation is not connected to the other transformations in

    the mapping pipeline. A transformation in the pipeline calls the unconnected loo#up with a &%L0

    expression.

    . Fhat are the differences "etween connected and unconnected loo#up transformation4

    • -onnected loo#up transformation receives input values directl* from the pipeline.

    ;nconnected loo#up transformation receives input values from the result of a &%L0 expression inanother transformation.

    • -onnected loo#up transformation can "e configured as d*namic or static cache.

    ;nconnected loo#up transformation can "e configured onl* as static cache.

    • -onnected loo#up transformation can return multiple columns from the same row or

    insert into the d*namic loo#up cache. ;nconnected loo#up transformation can return one columnfrom each row.

    • If there is no match for the loo#up condition, connected loo#up transformation returnsdefault value for all output ports. If *ou configure d*namic caching, the Integration ervice insertsrows into the cache or leaves it unchanged. If there is no match for the loo#up condition, theunconnected loo#up transformation returns null.

    • In a connected loo#up transformation, the cache includes the loo#up source columns in

    the loo#up condition and the loo#up source columns that are output ports. In an unconnected loo#uptransformation, the cache includes all loo#upNoutput ports in the loo#up condition and theloo#upNreturn port.

    • -onnected loo#up transformation passes multiple output values to another

    transformation. ;nconnected loo#up transformation passes one output value to anothertransformation.

    -onnected loo#up transformation supports user8defined values. ;nconnected loo#uptransformation does not support user8defined default values.

    /. (ow do *ou handle multiple matches in loo#up transformation4 or what is %oo#up 0olic* on1ultiple 1atch4%oo#up 0olic* on 1ultiple 1atch option is used to determine which rows that the loo#uptransformation returns when it finds multiple rows that match the loo#up condition. ?ou can selectloo#up to return first or last row or an* matching row or to report an error.

    0. Fhat is >utput >ld Oalue on ;pdate4This option is used when d*namic cache is ena"led. Fhen this option is ena"led, the integrationservice outputs old values out of the loo#upNoutput ports. Fhen the Integration ervice updates a

    row in the cache, it outputs the value that existed in the loo#up cache "efore it updated the row"ased on the input data. Fhen the Integration ervice inserts a new row in the cache, it outputsnull values. Fhen *ou disa"le this propert*, the Integration ervice outputs the same values outof the loo#upNoutput and inputNoutput ports.

    . Fhat is Insert Else ;pdate and ;pdate Else Insert4These options are used when d*namic cache is ena"led.

    • Insert Else ;pdate option applies to rows entering the loo#up transformation with the row

    t*pe of insert. Fhen this option is ena"led the integration service inserts new rows in the cache andupdates existing rows when disa"led, the Integration ervice does not update existing rows.

    • ;pdate Else Insert option applies to rows entering the loo#up transformation with the row

    t*pe of update. Fhen this option is ena"led, the Integration ervice updates existing rows, and

    inserts a new row if it is new. Fhen disa"led, the Integration ervice does not insert new rows.

  • 8/18/2019 infa folktalks qns

    31/35

    12. Fhat are the options availa"le to configure a loo#up cache4The following options can "e used to configure a loo#up cache&

    • 0ersistent cache

    • Recache from loo#up source

    • tatic cache

    • /*namic cache

    • hared -ache

    • 0re8"uild loo#up cache

    11. Fhat is a cached loo#up transformation and uncached loo#up transformation4

    • -ached loo#up transformation& The Integration ervice "uilds a cache in memor* when it

    processes the first row of data in a cached %oo#up transformation. The Integration ervice storescondition values in the index cache and output values in the data cache. The Integration ervice)ueries the cache for each row that enters the transformation.

    • ;ncached loo#up transformation& or each row that enters the loo#up transformation, the

    Integration ervice )ueries the loo#up source and returns a value. The integration service does not"uild a cache.

    1!. (ow the integration service "uilds the caches for connected loo#up transformation4The Integration ervice "uilds the loo#up caches for connected loo#up transformation in thefollowing wa*s&

    • e)uential cache& The Integration ervice "uilds loo#up caches se)uentiall*. The

    Integration ervice "uilds the cache in memor* when it processes the first row of the data in acached loo#up transformation.

    • -oncurrent caches& The Integration ervice "uilds loo#up caches concurrentl*. It does

    not need to wait for data to reach the %oo#up transformation.

    1". (ow the integration service "uilds the caches for unconnected loo#up transformation4The Integration ervice "uilds caches for unconnected %oo#up transformations as se)uentiall*.

    1#. Fhat is a d*namic cache4The d*namic cache represents the data in the target. The Integration ervice "uilds the cachewhen it processes the first loo#up re)uest. It )ueries the cache "ased on the loo#up condition foreach row that passes into the transformation. The Integration ervice updates the loo#up cacheas it passes rows to the target. The integration service either inserts the row in the cache orupdates the row in the cache or ma#es no change to the cache.

    1$. Fhen *ou use a d*namic cache, do *ou need to associate each loo#up port with the inputport4

    ?es. ?ou need to associate each loo#upNoutput port with the inputNoutput port or a se)uence I/.The Integration ervice uses the data in the associated port to insert or update rows in theloo#up cache.

    1. Fhat are the different values returned "* 2ew%oo#upRow port4The different values are

    • $ 8 Integration ervice does not update or insert the row in the cache.

    • 5 8 Integration ervice inserts the row into the cache.

    • 6 8 Integration ervice updates the row in the cache.

    1/. Fhat is a persistent cache4

    If the loo#up source does not change "etween session runs, then *ou can improve theperformance "* creating a persistent cache for the source. Fhen a session runs for the first time,

  • 8/18/2019 infa folktalks qns

    32/35

    the integration service creates the cache files and saves them to dis# instead of deleting them.The next time when the session runs, the integration service "uilds the memor* from the cachefile.

    10. Fhat is a shared cache4?ou can configure multiple %oo#up transformations in a mapping to share a single loo#up cache.

    The Integration ervice "uilds the cache when it processes the first %oo#up transformation. Ituses the same cache to perform loo#ups for su"se)uent %oo#up transformations that share thecache.

    1. Fhat is unnamed cache and named cache4

    • ;nnamed cache& Fhen %oo#up transformations in a mapping have compati"le caching

    structures, the Integration ervice shares the cache "* default. ?ou can onl* share static unnamedcaches.

    • 2amed cache& ;se a persistent named cache when *ou want to share a cache file

    across mappings or share a d*namic and a static cache. The caching structures must match or "ecompati"le with a named cache. ?ou can share static and d*namic named caches.

    !2. (ow do *ou improve the performance of loo#up transformation4

    • -reate an index on the columns used in the loo#up condition

    • 0lace conditions with e)ualit* operator first

    • -ache small loo#up ta"les.

    • R/ER B? on all columns in the loo#up source. pecif* explicitl* the >R/ER B*

    clause on the re)uired columns.

    or flat file loo#ups, provide orted files as loo#up source.

    Recommen*e* %osts

    '% Transformation Interview 'uestionsExpression Transformation Interview 'uestionsorter Transformation Interview 'uestionsTransaction -ontrol Transformation Interview 'uestions;nion Transformation Interview 'uestionsEmail ThisBlogThis! hare to Twitterhare to ace"oo#@ comments %a"els& Informatica Interview 'uestions

    Informatica Intervie( Questions on +p*ate Strate45 Transformation1. Fhat is an update strateg* transformation4

    ;pdate strateg* transformation is used to flag source rows for insert, update, delete or reectwithin a mapping. Based on this flagging each row will "e either inserted or updated or deletedfrom the target. Alternativel* the row can "e reected.

    !. Fh* update strateg* is an active transformation4

     As update strateg* transformation can reect rows, it is called as an active transformation.

    ". Fhat are the constants used in update strateg* transformation for flagging the rows4

    • //3I2ERT is used for inserting the rows. The numeric value is $.

    • //3;0/ATE is used for updating the rows. The numeric value is 5.

    http://www.folkstalk.com/2011/06/informatica-interview-questions-on-sql.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_20.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_22.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_9151.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_5913.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=facebookhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_06.html#comment-formhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_06.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_7587.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on-sql.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_20.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_22.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_9151.htmlhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_5913.htmlhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=emailhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=bloghttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=twitterhttp://www.blogger.com/share-post.g?blogID=8881992064821482213&postID=2400980249788553303&target=facebookhttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_06.html#comment-formhttp://www.folkstalk.com/search/label/Informatica%20Interview%20Questionshttp://www.folkstalk.com/2011/06/informatica-interview-questions-on_7587.html

  • 8/18/2019 infa folktalks qns

    33/35

    • //3/E%ETE is used for deleting the rows. The numeric value is 6.

    • //3RE

  • 8/18/2019 infa folktalks qns

    34/35

    procedures are stored and run within the data"ase.

    !. 9ive some examples where a stored procedure is used4

    The stored procedure can "e used to do the following tas#s

    • -hec# the status of a target data"ase "efore loading data into it.

    • /etermine if enough space exists in a data"ase.

    • 0erform a speciali+ed calculation.

    • /rop and recreate indexes.

    ". Fhat is a connected stored procedure transformation4

    The stored procedure transformation is connected to the other transformations in the mappingpipeline.

    #. In which scenarios a connected stored procedure transformation is used4

    • Run a stored procedure ever* time a row passes through the mapping.

    • 0ass parameters to the stored procedure and receive multiple output parameters.

    $. Fhat is an unconnected stored procedure transformation4

    The stored procedure transformation is not connected directl* to the flow of the mapping. It either runs "efore or after the session or is called "* an expression in another transformation in themapping.

    . In which scenarios an unconnected stored procedure transformation is used4

    • Run a stored procedure "efore or after a session

    • Run a stored procedure once during a mapping, such as pre or post8session.

    • Run a stored procedure "ased on data that passes through the mapping, such as when a

    specific port does not contain a null value.

    • Run nested stored procedures.

    • -all multiple times within a mapping.

    /. Fhat are the options availa"le to specif* when the stored procedure transformation needs to"e run4

    The following options descri"e when the stored procedure transformation runs&

    • 2ormal& The stored procedure runs where the transformation exists in the mapping on a

    row8"*8row "asis. This is useful for calling the stored procedure for each row of data that passesthrough the mapping, such as running a calculation against an input port. -onnected storedprocedures run onl* in normal mode.

    • 0re8load of the ource& Before the session retrieves data from the source, the stored

    procedure runs. This is useful for verif*ing the existence of ta"les or performing oins of data in atemporar* ta"le.

    • 0ost8load of the ource& After the session retrieves data from the source, the stored

    procedure runs. This is useful for removing temporar* ta"les.

    • 0re8load of the Target& Before the session sends data to the target, the stored procedure

    runs. This is useful for verif*ing target ta"les or dis# space on the target s*stem.

    • 0ost8load of the Target& After the session sends data to the target, the stored procedure

    runs. This is useful for re8creating indexes on the data"ase.

  • 8/18/2019 infa folktalks qns

    35/35

     A connected stored procedure transformation runs onl* in 2ormal mode. A unconnected storedprocedure transformation runs in all the a"ove modes.

    0. Fhat is execution order in stored procedure transformation4

    The order in which the Integration ervice calls the stored procedure used in the transformation,relative to an* other stored procedures in the same mapping. >nl* used when the tored0rocedure T*pe is set to an*thing except 2ormal and more than one stored procedure exists.

    . Fhat is 0R>-3RE;%T in stored procedure transformation4

    0R>-3RE;%T is a s*stem varia"le, where the output of an unconnected stored proceduretransformation is assigned "* default.

    12. Fhat are the parameter t*pes in a stored procedure4

    There are three t*pes of parameters exist in a stored procedure&

    • I2& Input passed to the stored procedure• >;T& >utput returned from the stored procedure

    • I2>;T& /efines the parameter as "oth input and output. >nl* >racle supports this

    parameter t*pe.