how can we load first and last record from a flat file
source to target?
Answers were Sorted based on User's Feedback
I have an IDEA,
After sql Trans,go with AGG,RANK transformation,
in RankTrans Properties set the rank 1 only---1 row returns,
In AggTrans Dont do any column for Group--Last row returns,
We need 2 Target tables. 1 for 1st record,2 for last record,
if u using the UNIONtrans one Target table is enough,,,
i think it wii help u,,,,,,srinu,,,,,,,,,
Is This Answer Correct ? | 13 Yes | 4 No |
Answer / hardeep
We can use below configurations to achieve desired output. We need 1 SQ, 1 SGen, 2 Rank and 2 Trgt Defn(same Trt). I think it will be cheaper.
Src-SQualifier-->
|
Rank1(Top 1st) -->Trgt1
--->
Rank2(Bottom 1st) -->Trgt2
|
SGen(NEXTVAL)-->
Is This Answer Correct ? | 14 Yes | 5 No |
Answer / hina
Below transformation would work: Add the Nextval port of the sequence generator to both the Rank Transformations. In rank transformation select Top and Bottom resp.
------ Rank Transformation (Top)----Tgt(Ins1)
|
SQ---Sequence Generator-----
|
-------Rank Transformation(Bottom)-Tgt(Ins2)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vinod saini
After sql Trans use AGG,JOINER transformation,and use FIRST
& LAST function in AGG transformation without any group.
FIRST & LAST return the first & Last record values. give
JOINER condition based on first & last.
Is This Answer Correct ? | 4 Yes | 5 No |
Answer / sudhar
Alternatively we can use the unix pre session command to
read the 1st and last record from the file and place it in
another file and use that new file as source to load the
target table.
Is This Answer Correct ? | 1 Yes | 6 No |
SRC QF -> SEQ -> EXP -> AGR -> RTR -> TGT
create a port in expression t/r and generate a value for
each row using SEQ genrator, then in Agr take count of all
th record.create 2 condition in in router one with SEQ = 1
and another with SEQ = count of rows (this will give last
row).connect both to target.dont forget to give reset
option in SEQ generator.
Is This Answer Correct ? | 1 Yes | 9 No |
How many ways are there to do 'remove duplicate records in informatica'?
What the difference is between a database, a data warehouse and a data mart?
What are the mapping parameters and mapping variables?
i have source file data empno,ename,sal 100,ram,1000 200,tyu,2000 300,gh,3000 out put as e empno,ename,sal 100,ram,null 200,tyu,1000 300,gh,2000 how to load it?
Define filter transformation?
I have two different source structure tables, but I want to load into single target table? How do I go about it? Explain in detail through mapping flow.
what is size of u r database?
wat are deployement groups in informatica, how it will be used for developers
Can one use mapping parameter or variables created in one mapping into any other reusable transformation?
what is session override?
I have a flat file, in which i have two fields, emp_id, emp_name. The data is like this, emp_id,emp_name 101,soha 101,ali 101,khan 102,siva 102,shanker 102,reddy. how to merge the names so that my output is like this Emp_id Emp_name 101 Soha ali kahn 102 siva shenkar reddy please provide solution
normalizer transformation