Creating Teradata table in the Datastage job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 29
- Joined: Tue Feb 16, 2010 8:47 am
Creating Teradata table in the Datastage job
Hi All,
My requirement is to design a job which would create a table (teradata) by itself and should get loaded from the input file.
File ------- transformer --------- TD table.
The TD table will not exists in the DB, we need to create in the job itself.
Could any one help in this, as I am new to TD stages.
Thanks,
Anand
My requirement is to design a job which would create a table (teradata) by itself and should get loaded from the input file.
File ------- transformer --------- TD table.
The TD table will not exists in the DB, we need to create in the job itself.
Could any one help in this, as I am new to TD stages.
Thanks,
Anand
-
- Participant
- Posts: 2
- Joined: Mon Jan 17, 2011 11:22 pm
Re: Creating Teradata table in the Datastage job
Hi Anand,
Please use TeradataPX stage in General tab Create table aection put Generate DDL and Drop table action put Generate DDL . this will work each run Drop the table and Create it.
Regards,
Sagar.
Please use TeradataPX stage in General tab Create table aection put Generate DDL and Drop table action put Generate DDL . this will work each run Drop the table and Create it.
Regards,
Sagar.
-
- Participant
- Posts: 29
- Joined: Tue Feb 16, 2010 8:47 am
Re: Creating Teradata table in the Datastage job
Hi Sagar,
Thanks for your reply.
We only have two stages in Teradata. they are
Teradata enterprize
Teradata multiload.
I am not sure about the Teradata Px stage.
Please suggest.
Thanks,
Anand
Thanks for your reply.
We only have two stages in Teradata. they are
Teradata enterprize
Teradata multiload.
I am not sure about the Teradata Px stage.
Please suggest.
Thanks,
Anand
-
- Participant
- Posts: 2
- Joined: Mon Jan 17, 2011 11:22 pm
Re: Creating Teradata table in the Datastage job
Hi Anand,
in Mload Script tab -> Before use this syntax
DROP TABLE database.TableName;
CREATE TABLE database.TableName (
ID DECIMAL(12,0) NOT NULL,
NAME CHAR(5) NOT NULL,
)
PRIMARY INDEX (Keycolumns);
Regards,
Sagar.
in Mload Script tab -> Before use this syntax
DROP TABLE database.TableName;
CREATE TABLE database.TableName (
ID DECIMAL(12,0) NOT NULL,
NAME CHAR(5) NOT NULL,
)
PRIMARY INDEX (Keycolumns);
Regards,
Sagar.
-
- Participant
- Posts: 29
- Joined: Tue Feb 16, 2010 8:47 am
Re: Creating Teradata table in the Datastage job
Hi Sagar,
Job is finishing successfully.
But the table is not getting created.
Any idea? not warning is there in the job as well
Thanks,
Anand.
Job is finishing successfully.
But the table is not getting created.
Any idea? not warning is there in the job as well
Thanks,
Anand.
Re: Creating Teradata table in the Datastage job
Clarify your requirement, please. Do you need to create this table once (the first run only) or is it ok to drop and recreate it each run? The advice you are getting is for the latter solution, just wanted to double-check.anandkumar442 wrote:My requirement is to design a job which would create a table (teradata) by itself and should get loaded from the input file.
The former is a tougher nut to crack.
And I don't really see how the job can be "finishing successfully" if the table is not getting created.
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 29
- Joined: Tue Feb 16, 2010 8:47 am
Hi Chulett,
My apologies for the above replies.
Yes, the requirement is to drop and recreate the table for each and every run.We actually were able to create a table and load it from the file, using the 'Teradata Enterprise stage'.
Now, we would like to get some advice, to drop and recreate the teradata table for each and every run of the job.
Note: We do not want to use Teradata Multiload stage.
Thanks,
Anand.
My apologies for the above replies.
Yes, the requirement is to drop and recreate the table for each and every run.We actually were able to create a table and load it from the file, using the 'Teradata Enterprise stage'.
Now, we would like to get some advice, to drop and recreate the teradata table for each and every run of the job.
Note: We do not want to use Teradata Multiload stage.
Thanks,
Anand.
-
- Participant
- Posts: 29
- Joined: Tue Feb 16, 2010 8:47 am