Sql server

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Sql server

Post by vsi »

Hi folks,

I designed a datastage parallel job,

source :- sequential File ---- Variable length --- delimiter Pipe
Target :- sql server (DRS Stage)

when i designed the job from sequential file to intermediate sequential file , from intermediate file to sql server it is working fine.

if i removed the intermediate sequential file , it is not working .

not working:-
sequential file ---- transformer ---- sequential file2 ---- Drs stage

Working:-
sequential file --- transformer --- sequential file2 ---- job1
seqfile2 --- transformer --- sqlserver ---- job2

To make it as a one job can you suggest some tips:
sequential file --- transformer --- sqlserver ---- job1

Thanks in advance.
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Re: Sql server

Post by thebird »

vsi wrote:
Working:-
sequential file --- transformer --- sequential file2 ---- job1
seqfile2 --- transformer --- sqlserver ---- job2

To make it as a one job can you suggest some tips:
sequential file --- transformer --- sqlserver ---- job1
Not sure if I am missing something here - but can't you not simply replace the sequential file2 in the job1 with an SQL server - after including all transformations happening in the Transformer in job2 into the one in job1.

Regarding the not working job-
vsi wrote: not working:-
sequential file ---- transformer ---- sequential file2 ---- Drs stage
A sequential file can have have only one mainstream input or output link. In this case it looks like you are linking the reject link off the sequential file stage to the DRS stage.

Or did I misunderstand your post?
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Post by Nageshsunkoji »

What is the problem with the below approach :

Sequential File .............. Transformer............. SQL server

Did you face any problems with it ?

As Bird said, Sequential file will allow either input or output and a reject link.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Re: Sql server

Post by vsi »

thebird wrote:
vsi wrote:
Working:-
sequential file --- transformer --- sequential file2 ---- job1
seqfile2 --- transformer --- sqlserver ---- job2

To make it as a one job can you suggest some tips:
sequential file --- transformer --- sqlserver ---- job1
Not sure if I am missing something here - but can't you not simply replace the sequential file2 in the job1 with an SQL server - after including all transformations happening in the Transformer in job2 into the one in job1.

Regarding the not working job-
vsi wrote: not working:-
sequential file ---- transformer ---- sequential file2 ---- Drs stage
A sequential file can have have only one mainstream input or output link. In this case it looks like you are linking the reject link off the sequential file stage to the DRS stage.

Or did I misunderstand your post?

A sequential file can have have only one mainstream input or output link. In this case it looks like you are linking the reject link off the sequential file stage to the DRS stage.

Or did I misunderstand your post?[/quote]

Thanks for your prompt reply. I do agree with what you said above. But I ran into errors. Let me explain the scenario.

The master source file has 3 types of data in a variable length columns to be inserted into 3 different tables. Data for Type1, Type2 and Type3 has different columns. Say if type1 has 137 columns, type2 has 83 columns and type3 has 67 columns.

I want to extract type1 data in type1 sql server table so on and so forth for rest of 2 tables.

After several attempt I could run the job by dividing into 2 methods.
1. Extract from master source file into an intermediate sequential file and
2. from intermediate sequential file to finally sql server.

But directly from master source to sql server tables I am getting errors.

I hope above explanation gives you a picture.

Thanks
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

Does it mean that your Master Source file has data for all the 3 types in varying metadata - say type1 has 137 columns, type2 has 83 columns and type3 has 67 columns? - and all this in a single file?

You might want to read it as a single column and then split it into different columns using the Column Import stage based on the delimiter. Now you should be able to cary your data to the 3 different target tables as required provided you have a differentiator in the data that identifies your type, other than the number of columns.

Aneesh
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Re: Sql server

Post by Sreenivasulu »

Hi

I also understand that you are setting the reject link to the target sql server

Regards
Sreeni
vsi wrote:Hi folks,

I designed a datastage parallel job,

source :- sequential File ---- Variable length --- delimiter Pipe
Target :- sql server (DRS Stage)

when i designed the job from sequential file to intermediate sequential file , from intermediate file to sql server it is working fine.

if i removed the intermediate sequential file , it is not working .

not working:-
sequential file ---- transformer ---- sequential file2 ---- Drs stage

Working:-
sequential file --- transformer --- sequential file2 ---- job1
seqfile2 --- transformer --- sqlserver ---- job2

To make it as a one job can you suggest some tips:
sequential file --- transformer --- sqlserver ---- job1

Thanks in advance.
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Re: Sql server

Post by vsi »

Sreenivasulu wrote:Hi

I also understand that you are setting the reject link to the target sql server

Regards
Sreeni
vsi wrote:Hi folks,

I designed a datastage parallel job,

source :- sequential File ---- Variable length --- delimiter Pipe
Target :- sql server (DRS Stage)

when i designed the job from sequential file to intermediate sequential file , from intermediate file to sql server it is working fine.

if i removed the intermediate sequential file , it is not working .

not working:-
sequential file ---- transformer ---- sequential file2 ---- Drs stage

Working:-
sequential file --- transformer --- sequential file2 ---- job1
seqfile2 --- transformer --- sqlserver ---- job2

To make it as a one job can you suggest some tips:
sequential file --- transformer --- sqlserver ---- job1

Thanks in advance.
Hello Folks,

An update:

I fixed the metadata of Master Source Seq. File and kept only 1 reject file at the Master Source Seq. File and it worked fine.

Thanks for your inputs
Post Reply