How to Run Fast Export

Tools
Enthusiast

How to Run Fast Export

Hello All,

I am trying to run the below script in fxp:

.LOGTABLE DB.errors

.LOGON jugalDB/JBhatt,jugal

.BEGIN EXPORT

.EXPORT OUTFILE samples111

Sel top 10 * from db.table1

.END EXPORT

.LOGOFF

In the Interactive Mode i gave it as below:

fxp < fxpExample.txt

I am getting an error. This is the 1st time i am learning about FastExport. Please help me how to proceed.. THanks

Tags (1)
5 REPLIES
Junior Contributor

Re: How to Run Fast Export

You should always specify which error you get.

FastExport commands must start with a period. Both Fexp and SQL commands must be terminated by a semicolon:

.LOGTABLE DB.errors;
.LOGON jugalDB/JBhatt,****;
.BEGIN EXPORT;
.EXPORT OUTFILE samples111;
Sel top 10 * from db.table1;
.END EXPORT;
.LOGOFF;
Teradata Employee

Re: How to Run Fast Export

Dieter's example should work, otherwise whats the error? Something to do with HOSTS file?

Enthusiast

Re: How to Run Fast Export

Hi Dnoeth,

I had forgot to include the semicolon while posting this issue. Sorry for that.

While runnin the script in my PC i had included period in the beginnin and a semicolon in the end of the code.

I got the answer from google.

fxp < /home/jugal/fexport.txt

Enthusiast

Re: How to Run Fast Export

When i write a FastExport Script with the .ACCEPT Command.. How should i give the data in param_file. Is there a particular format???

.LOGTABLE DB.errors;
.LOGON jugalDB/JBhatt,****;
.ACCEPT col1,col2 from param_file;
.BEGIN EXPORT;
.EXPORT OUTFILE samples111;
Sel top 10 * from db.table1
where col1='&col1' and col2='$col2';
.END EXPORT;
.LOGOFF;
Enthusiast

Re: How to Run Fast Export

correction:

where col1='&col1' and col2='&col2';