i have to extract data from a flat file.the flat file has 10
records.i have to extract the 1st and 5th record every
time.how is it done.

Answer Posted / vinay

Here are the steps that you will need to follow to catch record numbers 1,5,11,15,21,25,31,35.....so on.

Step1: Create an expression T/F and define a variable to count the number of records, say we name it as "CNT"
CNT (int) = CNT+1

Step2: In the same T/F, at the end of all the ports define a flag, say we name it as
flg_VALID_ROW (string(1))=
IIF((SUBSTR(TO_CHAR(CNT),-1)= '1' or
(SUBSTR(TO_CHAR(CNT),-1)= '5'),'Y','N')

Step3: Next define a Filter T/F, where you can catch hold of the record using flag = 'Y'
Filter Cond'n: flg_VALID_ROW = 'Y'

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you convert single row from source into three rows into target?

599


What is meant by lookup transformation?

608


Differentiate between router and filter transformation?

608


Enlist the tasks for which source qualifier transformation is used.

582


Hi Everybody, I have one fixed width file as source and 4 oracle tables (relational) as target. What are the Unit test cases i need to implement ? 1.Using TextPad software i tested postion of the field 2.As per specification i tested like whether it is correctly mapped or not? Is there any other test case do i need to implement. If possible can any one give me the test cases Advance Thanks

1528






Suppose we do not group by on any ports of the aggregator what will be the output?

568


Explain lookup transformation source types in informatica

694


rank() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid order by case when opt2.dm_market_flg in ('Y', 'U') then 1 else 2 end, lkp.contact_rank) as rank1, case opt2.contact_type when 'Buyer' then row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc, ship_to_flg desc , last_order_dt desc) when 'Decision Maker' then row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc , last_quote_dt desc , mailability_score desc , source_ranking desc) when 'Influencer' then row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc, mailability_score desc, source_ranking desc) when 'Payer' then row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc, mailability_score desc, source_ranking desc) --elu 05/28/2013 else row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc, mailability_score desc, source_ranking desc) end rank2 row_number() over (partition by opt3.dim_plat_site_id, opt3.dim_site_opt_sid order by rank1,rank2) as "rank", case when "rank"<= opt3.maximum_value then 'Y' else 'N' end as include_flg

1525


Design time, run time. If you don't create parameter what will happen

1422


Debugger what are the modules, what are the options you can specify when using debugger, can you change the expression condition dynamically when the debugger is running.

1864


What if the source is a flat-file?

586


3.how will u get information about bugs how will u rectify the bugs in realtime whch tool we are using to rectify the bugs

1748


Hello, Can you please send the admin and advanced mapping design sample questions to ns_sharmin@yahoo.com?

1850


What are some examples of informatica etl programs?

529


What is repository manager?

532