Column Generator : Column Method = Schema File

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
memrinal
Participant
Posts: 74
Joined: Wed Nov 24, 2004 9:13 pm

Column Generator : Column Method = Schema File

Post by memrinal »

Hi All,

What should be the format of the schema file if one uses Column Method=Schema File.
What should this schema file contain?

I have to generate sequence number from a given number for each record. currently i am using combination o f lookup, transformer nd row generator for this. as the sequnce number generated by the Column generator is from 0.
Will changing Column method to Schema file help my starting the numbers from a given number that i can specifyu in the fie.

TIA
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
The stage you need is PxSurrogateKeyGenerator not column generator, column generator is a dev/debug tool.

schema file is a substitute for the table definition in the stage itself.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Memrinal,

Colum Method = Schema File is used by sequential file stage/file set stage. It is basically used when you dont want to give the metadata directly in the stage but rather use the schema file for getting the metadata information.

A sample schema file looks like this

schema record
(
column1:int32;
column2:string[max=12];
)

HTH
Rich
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

roy wrote:Hi,
The stage you need is PxSurrogateKeyGenerator not column generator, column generator is a dev/debug tool.

IHTH,
Is there a reason why the Column Generator should not be used outside of development? Just wondering...

From what I've seen, the Column Generator is far more flexible than the PxSurrogateKeyGenerator (and just as fast). The Surrogate gen can only do numeric (identity) fields while you can generate pretty much anything with the Column Generator.

Yes, you can use the Column Generator to create test data, but we use it all the time to add code fields, period dates, temporary join fields, timestamps, etc.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Development/Debug is a Category. If you'd prefer to have the Column Generator stage in a different category, customize your Palette and move it to where you want it.
There is no reason whatsoever to eschew use of the Column Generator stage in production - bcarlson's site makes good use of this stage in establishing a column to contain an artificial key - the column is (re-)populated in a subsequent stage in the job design.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Re: Column Generator : Column Method = Schema File

Post by roy »

memrinal wrote:Hi All,

What should be the format of the schema file if one uses Column Method=Schema File.
What should this schema file contain?

I have to generate sequence number from a given number for each record. currently i am using combination o f lookup, transformer nd row generator for this. as the sequnce number generated by the Column generator is from 0.
Will changing Column method to Schema file help my starting the numbers from a given number that i can specifyu in the fie.

TIA
I mentioned the PxSurrogateKeyGenerator since the original poster mentioned numeric sequence that they need some controll over the starting number.

I guess other uses for the column generator is just a matter of opinion and I do encorrage thinking outside the box so as long as it serves the purpose why not go for it ;) (we do so many things to gain performance so if it helps, by all means :))
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply