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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the components of datastage?

643


what is the custome stage in datastage? how can we impliment that one? plz tell me

1901


Is it possible to query a hash file?

1553


hi.... am facing typical problem in every interview " I need some critical scenarios faced in real time" plz help me guys

2419


sed,awk,head

960






root tree will find which is server job and which is parallel job?

1443


What are sequencers?

609


Have you used Unstructured data?

824


What are the different types of lookups in datastage?

618


Why do you need stage variables?

652


What is difference between join, merge and lookup stage?

632


What is the purpose of interprocessor stage in server jobs?

1720


Have you have ever worked in unix environment and why it is useful in datastage?

640


How do you generate sequence number in datastage?

618


How to perform incremental load in datastage?

657