All Forums Tools
hakme 3 posts Joined 09/11
22 Nov 2011
Loading into Views using TPT

HI All,

 Can we use TPT  load/Update operator and insert into Views instead of Tabless directly? In the Reference document, for the attributes of  Load/Update Operator, only VARCHAR TargetTable is mentioned in the syntax. But in user guide

Basic Processing

Teradata PT can load data into, and export data from, any accessible database object in the

Teradata Database or other data store using Teradata PT operators or access modules.

 

Please let me know

Thanks Hakme!!!!
feinholz 1234 posts Joined 05/08
22 Nov 2011

The Load and Update operators do not support loading into views. That is a restriction of the FastLoad and MultiLoad protocols (from the DBS).

You can use the TPT Stream operator (similar to using TPump) but that loading will not be as fast as the other protocols.

 

--SteveF

Jimm 298 posts Joined 09/07
22 Nov 2011

 

Steve

Normally I would never question your word, but Multiload manual (V13 I am looking at) specifically says you can use Multiload into updatable views (generally single table views). See the final paragraphs of the BEGIN MLOAD command.  I have used this in the past in both Mload and - I think Fload.

Is TPT different for views?

feinholz 1234 posts Joined 05/08
22 Nov 2011

Then I stand corrected. If the MultiLoad protocol allows views (I have always been under the impression that those 2 utilities canno load views, but if the documentation says otherwise, then so be it), then you will be able to do the same with the TPT Update operator.

The TPT operators use the exact same protocols as their older utility counterparts. So the DBS restrictions and rules are the same.

As for the "TargetTable" keyword, do not get hung up on the name of the attribute. It defines the DBS object to get loaded. It does no make sense for us to have an attribute called ViewName. Just use TargetTable. Afterall, the data is going into a table, isn't it?

--SteveF

hakme 3 posts Joined 09/11
22 Nov 2011

Thanks for the help. I am ble to use Update Operator to load into updateble views.

Thanks Hakme!!!!

MaheshJessy 26 posts Joined 12/10
05 May 2015

Hi Team, Can we export the data from VIEWS by using TPT? Would you please confirm me!

TDThrottle 51 posts Joined 11/11
05 May 2015

Yes, you can use TPT to export data referring to Views.
Please verify necessary cross-db grants are in place and userid used in TPT has SELECT access on View DB.
Thanks!!

MaheshJessy 26 posts Joined 12/10
07 May 2015

Thanks Velu! Is there any default option in TPT to get the "Hearders" along with export?
Example: Varchar header='yes'
Can you please help on this!
Thanks.

feinholz 1234 posts Joined 05/08
07 May 2015

TPT only exports data.

--SteveF

You must sign in to leave a comment.