Assigning Primary Keys while creating the table

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
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Assigning Primary Keys while creating the table

Post by sshettar »

Hi All,

I am trying to create a oracle table before loading the data. i have to set one of the cloumns as primary keys while doing so. I am using Oracle Enterprise Stage and in the properties tab i have set the create primary column to True.
The jobs successfully completes with creating the table and loading the data but the table has not assigned any primary key.
In the meta data i have checked the key tab for the column i intend to be a primary key.
Also i have set the wrtie method to load and write mode to Create.

Could anybody help me if i have to do something else if i need to set a primary key to the table while creating it and lodaing the data.

Any help is highly appreciated.

Thanks in advance
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Re: Assigning Primary Keys while creating the table

Post by vivekgadwal »

sshettar wrote:Hi All,

I am trying to create a oracle table before loading the data. i have to set one of the cloumns as primary keys while doing so. I am using Oracle Enterprise Stage and in the properties tab i have set the create primary column to True.
The jobs successfully completes with creating the table and loading the data but the table has not assigned any primary key.
In the meta data i have checked the key tab for the column i intend to be a primary key.
Also i have set the wrtie method to load and write mode to Create.

Could anybody help me if i have to do something else if i need to set a primary key to the table while creating it and lodaing the data.

Any help is highly appreciated.

Thanks in advance
Did you check the DDL that the stage generate for the table creation? Does that have PRIMARY KEY (<some_ID>) set to the column of your choice?
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

well i did for the oracle log file, but it doesnot show the DDL for table creation . oits only giving the insert details.

Do you think i need to check for that else where?

Thanks
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

I used a turn around solution for this.

AS i went through the Oracle enterprise stage in the documentation of Information Server 8.1 , it was talking about loading the data from a dataset while creating the table.

So i made 2 jobs where in the first job unloads the data from SQL server and the second job loads the data while creating the table.
This actually created the table with the primary key .
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

I used a turn around solution for this.

AS i went through the Oracle enterprise stage in the documentation of Information Server 8.1 , it was talking about loading the data from a dataset while creating the table.

So i made 2 jobs where in the first job unloads the data from SQL server and the second job loads the data while creating the table.
This actually created the table with the primary key .
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Post by vivekgadwal »

sshettar wrote:I used a turn around solution for this.

AS i went through the Oracle enterprise stage in the documentation of Information Server 8.1 , it was talking about loading the data from a dataset while creating the table.

So i made 2 jobs where in the first job unloads the data from SQL server and the second job loads the data while creating the table.
This actually created the table with the primary key .
Good...please mark the topic as "Resolved" or "Work around exists" for future purposes.
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
Post Reply