Modify column on a quoted column name

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
jneasy
Participant
Posts: 32
Joined: Sun Jan 29, 2012 8:47 pm
Location: Australia

Modify column on a quoted column name

Post by jneasy »

Hi,

I am trying to rename a field using the following MODIFY spec.

Code: Select all

"MODE":string[50]=string_from_ustring(MODE);
But I get this error "Error parsing modify adapter"

I have a generic job using RCP to SELECT * from a DB2 then load into Teradata

DB2 --> Modify --> Teradata

The Teradata table defines the column with double quotes as "MODE" but I can't seem to define the column name with double quotes.

Any ideas?

Cheers,
Joe.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

You can't use quotes in column names in DataStage. The only legal special characters are dollar signs, underscores and periods.

I would think it is being translated to MODE when it enters DataStage. Try this for your specification:

NewName:string=MODE

To validate what names it is really using, turn on RCP and dump the Teradata Connector straight into a Peek. That will show the resulting column names in the Director log.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
jneasy
Participant
Posts: 32
Joined: Sun Jan 29, 2012 8:47 pm
Location: Australia

Post by jneasy »

I tried what you suggested asorrell - the peek named the column without quotes.

As a work around I renamed the target to an appropriate column name without double quotes then once the table was loaded I renamed the column back to the double quoted column name.

Cheers,
Joe
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

A Column Alias without the quotes would also work...
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply