Lengths for Varchar Fields

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
CGI_SUREN
Premium Member
Premium Member
Posts: 32
Joined: Fri Feb 22, 2008 10:28 am
Contact:

Lengths for Varchar Fields

Post by CGI_SUREN »

Is there any down side of not providing the lengths for the Varchar fields through out the entire job flow?

We have created few jobs and removed the lengths for the Varchar fields from all the way source (Sequentail files) to the target (Datasets).
We removed the lengths for the Varchar fields even in the Transformers, Joins.. etc within the job flow.

Trying to understand , if there there any down side of doing this.
Will this approach have any impact with DataStage 8.1?

Thanks in Advance.
Suren V
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No significant downside and no difference at Version 8.1 to the former version.

You will have to ensure that you don't write a VarChar value that is longer than the target (e.g. an Oracle table) can contain, but using unterminated VarChar columns within DataStage jobs is not a problem - in fact it is an advantage in several cases such as when writing to Datasets (storage space is minimized).
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

You may get a ticket from the metadata police...
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
CGI_SUREN
Premium Member
Premium Member
Posts: 32
Joined: Fri Feb 22, 2008 10:28 am
Contact:

Post by CGI_SUREN »

asorrell wrote:You may get a ticket from the metadata police...

Thanks ArndW & Andy Sorrell.

Will there be any issues with doing Metadata Impact Analysis?
Suren V
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

I think you might get a mild warning on some reports that the column length doesn't match the database setting. But I'm not at a site with Metadata WorkBench installed, so I can't confirm.

I seem to remember getting that warning in the director logs as well. It is easy enough to get rid of, just put a length on the column when it goes to / from the database.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply