PX creating flat file with duplicate entries

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
data_whs_team
Charter Member
Charter Member
Posts: 18
Joined: Fri Aug 18, 2006 11:47 pm
Location: California

PX creating flat file with duplicate entries

Post by data_whs_team »

I'm reading an sql table and writing the results to a flat file via a sequential stage. The sql query has 'group by' and an 'order by' statements to ensure unique values in the file.

I'm finding that for every unique row I get back from the sql statement, DataStage is writing one for every node we have defined in our /appl/Ascential/....Configurations/default.apt file. In this case, we have 12 nodes in the default.apt file. Therefore I'm getting 11 MORE sets of data in my file than I want!

The file should look like this:

abc
123
def
456

But I'm getting this:

abc
123
def
456
abc
123
def
456
abc
123
def
456
abc
123
def
456
..... etc.

I can't change the default.apt file.

Any help is greatly appreciated!

Cathy
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Describe the stages in your job. Any chance you set a partitioning to ENTIRE, which sends a full copy of all rows to all nodes, which in turn you write to a sequential file?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
data_whs_team
Charter Member
Charter Member
Posts: 18
Joined: Fri Aug 18, 2006 11:47 pm
Location: California

Post by data_whs_team »

We just figured it out. I changed the mode on my Teradata stage from 'parallel' to 'sequential'. Works like a charm now!

TY,
Cathy
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Glad to be of zero help. Next time, state your stages first. I don't see you mentioning Teradata in your original post, just an unmentioned relational stage and a sequential file.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
data_whs_team
Charter Member
Charter Member
Posts: 18
Joined: Fri Aug 18, 2006 11:47 pm
Location: California

Post by data_whs_team »

Sorry about the lack of information. I didn't mention the database stage because I didn't think it was relevant. I was focusing on the node count in the default.apt stage.

I'll be more detailed next time! :wink:

Cheers,
Cathy
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Cathy,

If you done with this as it appears to be.Please mark this as 'Resolved'
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Post Reply