DS8 TD Connector and Pimary Indexes

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
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

DS8 TD Connector and Pimary Indexes

Post by bcarlson »

I am trying to build a generic job to load a dataset to a target table in Teradata. We we are using the Teradata Connector. The job is generic, so I want the job to be abel to create/replace a target table if needed. The problem is that I cannot figure out how to specify a primary index.

By default, Teradata will use the first field in a table's DDL, or in the case of DataSTage, the first field of a record to define the Primary Index. The PI is used to spread your data across the amps to allow for parallel processing. If that first field has low cardinality, then you will get data skew - some amps having more data than others.

So, is there a way to specify what field or fields you want to use for a Primary Index in Teradata connector? And if so, can it be parameterized? If memory serves me correctly, you could do this with the old Teradata Enterprise stage that used FastLoad, but we need to use Connector.

Thanks!

Brad
It is not that I am addicted to coffee, it's just that I need it to survive.
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

Post by deva »

you can create your own create statment and you can specify which field you want primary index

genarate create statement at runtime=no

and you can enter your own sql.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

I thought about that option, but the next question that came to mind was how to dynamically generate the table DDL. This is to be a generate job reading an input dataset and creating a target table to match it.

If there is a good way to generate table DDL based on a dataset schema, then we can pass the tble DDL as a parm, and that would probably resolve the issue.... although it sure was nice to be able to simply pass a PI parameter in TD Enterprise... :)

Brad.
It is not that I am addicted to coffee, it's just that I need it to survive.
Post Reply