hi all, i have 1 flat file having 10 rows. like:-
id name amt
100 a 100
200 b 200
100 n 300
400 p 3000
100 a 100
600 x 6000
Now i want to load half of this data into one flat file and
remaining in other flat file.like :-
flat file 1
id name amt
100 a 100
200 b 200
100 n 300
----------------------
----------------------
flat file 2
id name amt
400 p 3000
100 a 100
600 x 6000
Plz reply me ASAP.
Answers were Sorted based on User's Feedback
Answer / rashmi garg
From source to expression connect ID, Name and Amt.
Add one sequence generator and connect to expression
now expression TF is like
expression
----------
ID
Name
Amt
Number
pass number port to aggregator TF to get the max value in
number and pass ID,Name, amt and number from exression to
router and max value from aggregator to router
now router is having ports
Id
Name
Amt
Number
Max
now route the rows on the basis of
number < max/2 (output group 1)
number > max/2 (output group 2)
Is This Answer Correct ? | 17 Yes | 5 No |
Answer / honey
when u apply the procedure given by Mr.Ramesh u will get
alternative records to be stored in the two flatfiles.
Is this what u wanted.
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / srinivasarao dasari
Find the count of the records using `wc -l` Command and
pass this to mapping varaiable.Now you can route the data
by dividing 2.I hope this would be helpful to you.
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / psnadh
Hi,
In the source file if the row count is odd number,then how
can we check the condition to divide the ff into two halves?
If it is even,we can divide the ff into two halves as per
the above solutions.
Please give me reply how to implent that
Thanks in Advance
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / shashank
source->SQ->exp[dummyRow=1]->sorter[sort by dummyRow]->
(input to 2 transformation,pipeline branching)
1. joiner[normal join on dummyRow]
2. aggregator[no group by,add port TotalNoOfRows with
expression COUNT(dummyRow)]
Sequence generator->joiner{say port name be RowNo}
{so, joiner will get input from 3 trn, sorter, seq gen &
agg}
Joiner->exp[add port halfNo with exp iff
(RowNo<=TotalNoOfRows/2,1,2)]-> router[halfNo=1,halfNo=2]
->Target1(if halfNo=1)
->Target2(if halfNo=2)
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / bsgsr
send the flat file data into an expression transformation
and create a new pory say xyz and connect nextval mport on
seq_gen to this. then connect expression to router take two
groups. using the nem port created write conditions.
newport<5 in first group ice versa. i believe this would
work
Is This Answer Correct ? | 1 Yes | 3 No |
Answer / bala ramesh
in this logic , frist take one sequene genrator
transformation ,pass next value to expression
transformation and also pass id,name,and amt.
in this transformation and also create one output port
(temp).it is decimat type and write codition like
(iif(NEXTVAL %2=0,0,1)) , after take one router
transformation ,pass these ports (id,name,amt and
temp) .then create two group ,one is temp=0 and another one
is temp=1.after pass first group to one flat file ,second
group to second flat file.
Is This Answer Correct ? | 3 Yes | 6 No |
Answer / sajjan
solution1:- use rank transformation, divide into two
quartiles and pass them to different targets
Is This Answer Correct ? | 0 Yes | 4 No |
In seqence generator transformation maximum limit is reached,after reaching maximum limit how will u insert the data
how to create a sample mapping for dynamic lookup transformation
Name 4 output files that informatica server creates during session running?
What happen if you have 3 ports in SQ and 4 ports in SQL override of SQ( provided all ports are in same order and they are connected with proper source and target)? Also what happens when I have 4 ports and will extract 3 values in SQloverride.. What will be the value in 4th port ?
In which circumstances that informatica server creates Reject files?
How to load the name of the current processing flat file along with the data into the target using informatica mapping?
what is junk dimension
what are the enhancements made to Informatica 7.1.1 version when compared to 6.2.2 version?
What is a parameter When and where do you them when does the value will be created
There are 2 files, Master and User. We need to compare 2 files and prepare a output log file which lists out missing Rolename for each UserName between Master and User file. Please find the sample data- MASTER.csv ---------- Org|Tmp_UsrID|ShortMark|Rolename ---|---------|----------|------------ AUS|0_ABC_PW |ABC PW |ABC Admin PW AUS|0_ABC_PW |ABC PW |MT Deny all GBR|0_EDT_SEC|CR Edit |Editor GBR|0_EDT_SEC|CR Edit |SEC MT103 GBR|0_EDT_SEC|CR Edit |AB User USER.csv -------- Org|UserName|ShortMark|Rolename ---|--------|---------|------------ AUS|charls |ABC PW |ABC Admin PW AUS|amudha |ABC PW |MT Deny all GBR|sandya |CR Edit |Editor GBR|sandya |CR Edit |SEC MT103 GBR|sandya |CR Edit |AB User GBR|sarkar |CR Edit |Editor GBR|sarkar |CR Edit |SEC MT103 Required Output file: --------------------- Org|Tmp_UsrID|UserName|Rolename |Code ---|---------|--------|------------|-------- AUS|0_ABC_PW |charls |ABC Admin PW|MATCH AUS|0_ABC_PW |charls |MT Deny all |MISSING AUS|0_ABC_PW |amudha |ABC Admin PW|MISSING AUS|0_ABC_PW |amudha |MT Deny all |MATCH GBR|0_EDT_SEC|sandya |Editor |MATCH GBR|0_EDT_SEC|sandya |SEC MT103 |MATCH GBR|0_EDT_SEC|sandya |AB User |MATCH GBR|0_EDT_SEC|sarkar |Editor |MATCH GBR|0_EDT_SEC|sarkar |SEC MT103 |MATCH GBR|0_EDT_SEC|sarkar |AB User |MISSING Both the files are mapped through Organization, Shor_mark. So, based on each Organization, Short_Mark, for each UserName from User.csv, we need to find the Matching and Missing Rolename. I am able to bring Matching records in the output. But really I don't find any concept or logic to achieve "MISSING" records which are present in Master and not in User.csv for each UserName. Please help out guys. Let me know if you need any more information. Note:- In User.csv file, there are n number of Organization, under which n number Shortmark comes which has n number of UserName.
What is a design?
Why we require dwh in particular projects?