TD Connector Stage

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
patelamit009
Participant
Posts: 20
Joined: Fri Jan 27, 2006 12:17 am

TD Connector Stage

Post by patelamit009 »

Hi All,

We are using DataStage 8.0.1 and Database is Teradata on Unix platform.

As a code review, I want to find all the jobs in my project that have a Target TD Connector stage and in which the Write Mode is not "Truncate".

I tried taking two test jobs in which I have one target TD connector stage each.

In first job I kept the Write Mode as Append and in the second job I kept the Write mode as Truncate.

Then I exported the jobs and tried to find out some patterns that can identify the Write Mode.

I used the pattern "GenerateTruncateStatement" to search for the table that gets loaded in Write Mode as "Truncate".

But I could find that patter present in both the dsx files.

One thing that I observed is, There are two instances of pattern "GenerateTruncateStament" in the dsx where the write mode is Append. I found 8 instances of the above pattern in the dsx file where Write mode is Truncate.

I tried taking two target stages in a job each having Write Mode as "Truncate". Here I got 16 instances where the above pattern is present. Then I took three target TD stages and in the export file found that there are 22 instances of The pattern "GenerateTruncateStatement".

I was expecting 24 count logically in this case. If that was the case I could determine exaclt logic behind identification and could have written a small wrapper to find the jobs by scanning the Export of jobs.

The strange thing that I observed is, in the export files where I had kept two/three target stages with Write Mode as Append I could not find any instances of "GenerateTruncateStatement". This is quite obvious, but then why do I have 2 instances of above pattern present in the file where there is one target TD stage with write mode Append????

Can anyone please help me what approach should I follow to identify the Write mode of the target TD stage is not Truncate?????
Regards,
Patel
Post Reply