Source (Flatfile) - Target (1-1 mapping). How to load first or
last 20 record to target?
Answers were Sorted based on User's Feedback
Answer / joe
We cannot use a sorter because it will shuffle the data.
For the last 20 rows. In a seperate pipeline use aggregator
and do a Count(key) and Max(key) to get the total number of
rows.
use an output port o_count and o_max to populate this count
to an expression transformation before the Filter.
o_count_last_20 = o_count - 20
i.e. if there are 35 records we need records from 15 to 35
In the filter check nextval between o_count_last_20 and
o_Max
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sunny
Hello joe, your solution is partially correct - what if the
records are not in sequence to do MAX minus 20 ? I guess
this logic can be applied only after passing through
sequence generator, by getting a sequence number.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / joe
1. Use a sequence generator to associate a NEXTVAL to the
row.
2. Filter condition : NextVal <=20
For source- dbase: Do a filter at SQ by including the
following condition . WHERE Rownum <=20
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sri
For this you can write SQL query by TOP clause in expression
transformation.
Or else You can use Rank Transformation.
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / raju
You can also achieve using following flow in the mapping.
1)Create an out put port SNO in expression transformation
and connect it to NEXTVAL port in sequence generator
transformation.
2)Use sorter transformation.In sorter ,use SNO port as key
column and Direction is Descending.
3)Use filter transformation with filter condition as
SNO<=20.
Is This Answer Correct ? | 0 Yes | 3 No |
Can you use one mapping to populate two tables in different schemas
Which tool yoU use to create and manage sessions and batches and to monitor and stop the informaticaserver?
what is bitmap index? did u use it?and how to use it in informatica
How can we reset Sequence Generator, when we move objects from Dev Environment to QA env?
WAT IS THE MEANING OF UPGRADTION OF REPOSITORY?
How can i explain my project architecture in interview..? in Igate asked me tell me your project flow from source to target..?
1 Answers Ameri Group, CGI, CTS, HCL, iGate, TCS, Wipro,
In router source is a boy age 20 I given 3 conditions in router a>20, a<=20, a=20 which one exit first?
What are the data movement modes in informatica?
Please explain in detail with example about 1.Confirmed Dimension. 2.Junk Dimension. 3.Degenerated Dimension. 4.Slowly changing Dimensions
Which version configuration tool used in ur project?
Tell me about MD5 functions in informatica
wt is the difference between truncate and delete in which situation u use delete and truncate in real time..