teradata enterprise with unknown destination columns

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

trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post by trobinson »

I am very interested in the outcome of this post. I have looked in the documentation and I cannot find the reference but I believe I read somewhere that the Teradata Enterprise Stage will create a work table when an append to a Teradata table is selected for the job. I believe this is because a FastLoad must load to an empty table which is impossible with an append operation. To get around this DataStage FastLoads to a generated empty work table and then does insert into (select * from work table) on the database side. This seems to match what you are seeing. It appears that the Append option will create an empty teradata table with ALL fields but NO defaults. It generates this empty table from the teradata metadata NOT your DataStage job metadata. "Teradata Metadata" say that 5 times fast.
Can you confirm or shoot down this theory as total whooie?
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

Do not get deep into the work tables created by teradata. they will be created as per your input file schema. so if you are defaulting some values in your datastage job then the work tables will be created according to that automatically.

What i would suggest is instead of teradata stage as output send all the records to a flat file and see is the default values are getting loaded. if they are getting loaded fine then get hold of your teradata admin.
tyvix
Participant
Posts: 16
Joined: Fri Sep 03, 2004 1:13 am

Post by tyvix »

Thanks all for your interest.

In response for Trobinson, datastage use teradata metadata to create temporary table with (select * from work table), this make the load being faster using fastload (empty table, no rollback constraints,no lock....).

Unfortunatly we can't specify the list of columns to load (keeping default values).
The case opened talk about the "select list" propertie which name destination columns but doesn't modify the list of source columns...

For Krazykoolrohit:
When using temporary table, datastage replace unknowns columns whith null.
inserting null in teradata doesn't use the default values mechanism which is used only when columln is not specified

If support can't find any solution, we may use resticted column list using insert throught teradata view (may impact performances)
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If IBM is not able to find a solution then you can load your records to a flat file and generate a sql script. Invoke the teradata utility and execute the sql scripts.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
tyvix
Participant
Posts: 16
Joined: Fri Sep 03, 2004 1:13 am

Post by tyvix »

DSguru2B wrote:If IBM is not able to find a solution then you can load your records to a flat file and generate a sql script. Invoke the teradata utility and execute the sql scripts.
Well I prefere considerate using views than rewrite the job with fastload, even if i sometimes think that using fastload instead of datastage would be nicer....
But in this case all the application steps and metrics use datastage and some people wouldn't appreciate the exclusion of datastage product (thinking of IBM and some chiefs... :) )
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Well DataStage is not just an "L" tool its and "ETL" tool. Fastload wont be able to do a percent of things DataStage does.
Lets hope IBM gives you a patch for it or an acceptable workaround.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
tyvix
Participant
Posts: 16
Joined: Fri Sep 03, 2004 1:13 am

Post by tyvix »

yes, lets see, i hope there's a patch...
Post Reply