Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


A flatfile contains 200 records.I want to load first 50
records at first time running the job,second 50 records at
second time running and so on,how u can develop the job?pls
give the steps?pls pls

Answers were Sorted based on User's Feedback



A flatfile contains 200 records.I want to load first 50 records at first time running the job,seco..

Answer / varun

Design the job like this:
1. Read records from input flat file and click on option of
rownumbercolumn in the file. It will generate a unique
number corresponding to each record in that file.
2. Use filter stage and write the conditions like this:
a. rownumbercolumn<=50(in 1st link to load the records
in target file/database)
b. rownumbercolumn>50 (in 2nd link to load the records
in the file with the same name as input file name, in
overwrite mode)


So, first time when your job runs first 50 records will be
loaded in the target and same time the input file records
are overwritten with records next first 50 records i.e. 51
to 200.
2nd time when your job runs first 50 records(i.e. 51-100)
will be loaded in the target and same time the input file
records are overwritten with records next first 50 records
i.e. 101 to 200.
And so on, all 50-50 records will be loaded in each run to
the target

Is This Answer Correct ?    19 Yes 9 No

A flatfile contains 200 records.I want to load first 50 records at first time running the job,seco..

Answer / sreekanth reddy peddakkagari

Answer given by varun is exactly correct but there is a
small correction in the answer, as varun told that at the
same time we can not use same file name as the source as
well as target , so we need to read from actual file
(Ex:Source.txt) write it to new file(Ex:New_Source.txt),
after that we need to rename the new file to old file using
after Subroutene(mv New_Source.txt Source.txt).

Is This Answer Correct ?    7 Yes 1 No

A flatfile contains 200 records.I want to load first 50 records at first time running the job,seco..

Answer / subhash

other than VARUN solution

1. Add 'row number' column in Seq File stage, so that each record has a number associated with it.
2. Add a job param with which we can provide the number of record from where we want to run the job. We can pass this either using Sequence Start LOOP(List type variables-50,100,150,200) or by shell script.
3. In the tfm, use a stage variable to run only from the record number till 50 records by counting each record.

Is This Answer Correct ?    2 Yes 0 No

A flatfile contains 200 records.I want to load first 50 records at first time running the job,seco..

Answer / sarath

i think using global parameter we can achieve this in transformer . first set the parameter value to 0 or 1 and finally after transforming set the parameter value to max(rownum) so that the value will b updated. for the next time using use that parameter as the starting point to load the data.

sorry if it is wrong.

Is This Answer Correct ?    1 Yes 1 No

A flatfile contains 200 records.I want to load first 50 records at first time running the job,seco..

Answer / siva

i thing we can solve this problem using mapping paraeter,workflow variable

Is This Answer Correct ?    0 Yes 0 No

A flatfile contains 200 records.I want to load first 50 records at first time running the job,seco..

Answer / msk22

Follow the steps:
1: import source definition(relational or flat file)
2: create mapping parameter $$m_count with datatype double
3: create expression transformation map all the output ports of source qualifier to expression.
4: create a variable port v_cnt and in expression write v_cnt+1
5: create an output port o_cnt and assign v_cnt to it.
6: take filter transformation, map all the output ports to filter and in filter condition write o_cnt<$$m_count and o_cnt>$$m_count-50
7: map all the output ports to target and save the mapping.
8: create a workflow for the mapping and then create a workflow variable $$wf_count with double datatype and enable persistent option.
9: create an assignment task and in the expression tab for user-defined variable choose $$wf_count and for expression write $$wf_count+50.
ex: $$wf_count=$$wf_count+50
10: now create the session for the mapping and go to session properties then select components tab, go to pre-session variable assignment column then open value and then there select mapping variable $$m_count and parent workflow variable $$wf_count
ex: $$m_count=$$wf_count.
11: save the workflow and execute.
That's it.......

Is This Answer Correct ?    0 Yes 0 No

A flatfile contains 200 records.I want to load first 50 records at first time running the job,seco..

Answer / lakshmi

i think using scheduling proces in server jobs.

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More Data Stage Interview Questions

source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TARGET2 TARGET2 235

6 Answers   US Technology,


iam new to datastage...now i want to know what are fact tables, dimension tables in bank domain...if any body knows plz tell me asap..

4 Answers   Wipro,


what is the use of surogate key in datastage

3 Answers  


I have load a Dataset in UAT with 2 Node configuration, imported the job into PROD environment which is 4 node configuration and using this DataSet as SRC to other job. will the job run fine or give any errors? If job runs fine, on how many nodes? 2 nodes or 4 nodes?

2 Answers   TCS,


How can u write exception handling in seq file????

2 Answers   IBM,


What is a quality stage?

1 Answers  


WHAT ARE THE COMMON ERRORS IN DATA STAGE?

6 Answers   IBM, ME,


Is there no issue when you try to convert a NOt null column in nullable and vice versa in aggregator styage and transformer stage? When I tried i got the warnings but in a running code I can see such type of scenarios. Please explain

2 Answers  


In Informatica,for the table I can find coreesponding dependent mappings.Likewise can I find the dependent jobs with all the information by using the table name

0 Answers   TCS,


I am defining one varaible parameter date in job parameters.I want use this variable date in where clause in source query.

2 Answers   TCS,


what are fact tables and dimension tables? give example assuming one table.

3 Answers   IBM,


hi iam new to this tooliam cmpltied to know abt datastage so now iam in project tell me whole step by step what iam doing iwnt to go with exp so plz hlp me pals

0 Answers  


Categories