All Forums Tools
mayanktiwari 6 posts Joined 10/12
30 Apr 2013
TD utilities and JAVA.

Hi All,
I am developing a code on Core JAVA. But I dont know how to Execute the code with the help of the TD Utilities on UNIX.
Is there any facility/add-in provided by TD by we can do this.
Please respond back if anybody knows about it.
 
Thanks & Regards,
 
Mayank

tomnolan 594 posts Joined 01/08
30 Apr 2013

Please provide more information about what you want to do.
 
When you say "TD Utilities", what are you referring to? Are you referring to FastLoad and FastExport?
 
The Teradata JDBC Driver supports FastLoad and FastExport at the wire-protocol level, to transfer data to and from and Teradata Database. The traditional FastLoad and FastExport utility programs are not involved.

mayanktiwari 6 posts Joined 10/12
29 May 2013

Hi Tom,
 
In simpler words I can say, I want to ran a java program from a BTEQ script.
But i am not able to find post regarding or related to this. Is it possible to run a java program with and of the Teradata utility?
 
Waiting for the response if anyhow you can help. :)

ulrich 816 posts Joined 09/09
29 May 2013

Still very unclear what you want.
In BTEQ you can use the OS command to run scripts on OS level - like rm to remove files.
This could be used to call a java programm as well. 
But what would be the difference to calling the java program in a shell directly.
So it is still very unclear what you do with the java programm and what you wanne achive by calling it in BTEQ...

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

tomnolan 594 posts Joined 01/08
29 May 2013

Like ulrich said, you can use the .os command in BTEQ. For example:
 
.os java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)

mayanktiwari 6 posts Joined 10/12
19 Jun 2013

Thanks Ulrich and Tom.
 
Is there any possibility to execute a program using BTEQ or any other utility on UNIX environment. ?
I want to run a JAVA program which will run TD queries and fetch out the results from TD itself.
I think this is more clear to you about my requirement.
 
Thanks in advance for further responses.

tomnolan 594 posts Joined 01/08
19 Jun 2013

Yes, you can run your own command-line Java program using BTEQ's .os command.
 
Let's assume that your command-line Java program is named foo.bar.MyProgram and let's assume that it requires a Java classpath of dir1/dir2 and dir3/dir4
 
Then your .os command in BTEQ would be:
 
.os java -cp dir1/dir2:dir3/dir4 foo.bar.MyProgram
 

mayanktiwari 6 posts Joined 10/12
09 Oct 2013

Hi Tom,
Thanks a lot for the help. 
I'll try to run with provided steps.
 
Thanks & Regards,
Mayank Tiwari

Pratyus_Vabtos1 1 post Joined 05/16
12 Jun 2016

Hello All,
           I am trying to perform dataloading from one teradata db to another teradata db using fastexport and fastload. But i am not being able to understand wire-protocol level usage of fastexport and fastload present in jdbc. How can i perform fastexport and fastload from within a java class?
Any ideas would help.
Thanks and Regards,
Pratyus.
 

tomnolan 594 posts Joined 01/08
13 Jun 2016

The Teradata JDBC Driver implements the wire protocol for FastLoad and FastExport. You do not need to understand the wire protocol.
 
The Teradata JDBC Driver's FastLoad and FastExport functionality are documented in the Teradata JDBC Driver User Guide, which is available here on Developer Exchange. Here are links to the relevant sections in the Teradata JDBC Driver User Guide.
The TYPE connection parameter: http://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_2.html#URL_TYPE
JDBC FastLoad: http://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_2.html#BABFGFAF
JDBC FastExport: http://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_2.html#BGBFBBEG
 
We also provide sample programs iilustrating how to use JDBC FastLoad and JDBC FastExport in a Java program:
http://developer.teradata.com/doc/connectivity/jdbc/reference/current/samplePrograms.html
 

You must sign in to leave a comment.