Page 1 of 1

DS8 TD Connector and Pimary Indexes

Posted: Fri Apr 23, 2010 12:46 pm
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

Posted: Fri Apr 23, 2010 1:13 pm
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.

Posted: Fri Apr 23, 2010 2:35 pm
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.