All Forums Tools
devallu_y 11 posts Joined 08/12
24 Aug 2012
TPT script: error while executing TPT script

Hi,

Iam new to Teradata and need to develop TPT script to load data from file to teradata table.

I have developed the script and while running iam getting the error like:

TPT19404 pmOpen Failed Requested file not found(4)

TPT19304 Fatal error opening file

 

Could any one help on this.. Its urgent.

 

Thanks,

Devallu Y

ulrich 816 posts Joined 09/09
24 Aug 2012

So the message states that the file does not exists 

did you check the file name in the script?

beside this you would need to share the tpt script...

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

devallu_y 11 posts Joined 08/12
24 Aug 2012

Hi,

Thanks for reply..

I have checked the file and able to open the same in same path mentoned in TPT script.

For security reasons i can't share the TPT script.

is there any other reason for this error.

 

Thanks,

Devallu Y

ulrich 816 posts Joined 09/09
24 Aug 2012

TPT installation might be incomplete.

Can you run 

tbuild -V

 

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

devallu_y 11 posts Joined 08/12
24 Aug 2012

I am able to run

 

tbuild -v <script>

feinholz 1234 posts Joined 05/08
24 Aug 2012

"tbuild -v <script>" is not valid syntax.

If you are providing the script, use the -f option.

If you would like further help on this you are going to have to provide the script, or at least portions of the script. Just remove all sensitive information. At a minimum, provide the text of the Data Connector Operator definition so that we can make sure you are providing all of the necessary information.

Are you using the "DirectoryPath" attribute in addition to the "FileName" attribute?

 

--SteveF

devallu_y 11 posts Joined 08/12
27 Aug 2012

Hi,

 

I have given full path along with file as below

 

 

VARCHAR FileName='/path/filename'

ulrich 816 posts Joined 09/09
27 Aug 2012

can you run and share

tbuild -V

UPPERCASE V to get the version info

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

devallu_y 11 posts Joined 08/12
28 Aug 2012

Hi,

 

I have run tbuild -V

 

version is 13.10.00.08

ulrich 816 posts Joined 09/09
28 Aug 2012

In this case it is as feinholz stated
"If you would like further help on this you are going to have to provide the script, or at least portions of the script. Just remove all sensitive information. At a minimum, provide the text of the Data Connector Operator definition so that we can make sure you are providing all of the necessary information."

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

devallu_y 11 posts Joined 08/12
30 Aug 2012

Hi,

 

Please find the data connector part below:

 

define operator <name>

type dataconnector producer

schema <name>

attributes(

varchar filename='/directory/filename',

varchar format='DELIMITED',

varchar openmode='READ'

varchar skip rows=1,

varchar multiplereaders='Y'

varchar textdelimiter='|'

)

ramarao2010 1 post Joined 12/12
13 Dec 2012

See, Please give complete file name for filename parameter,
 
I.e.,EX:  If your filename is emplist.txt than give emplist.txt ( but not emplist)
     (or)  If your filename is filename.out than give filename.out
 
Please try and give extension of the file and let me know the status
 

Karthikk 6 posts Joined 10/15
13 Mar 2016

Hi All,
   I have built a TPT script to export the data from a table into a flat file. I am facing the below error when i run the script.
TPT19404 pmOpen Failed Requested file not found(4)
TPT19304 Fatal error opening file
Requested file not found(4): As per the failure what is the file that is not found. Is it the tpt job script or the one which i am trying to export to?. 
Attaching my TPT DATACONNECTOR which I have used in the script. Please check and let me know if I am missing anything.
DEFINE OPERATOR FILE_WRITER_REQ1 
TYPE DATACONNECTOR CONSUMER 
SCHEMA SCHEMA_TEST 
ATTRIBUTES ( 
FileName = '/myID/directory/tablename.dat', 
Format = 'DELIMITED', 
TextDelimiter='|', 
IndicatorMode = 'N', 
OpenMode = 'Write' 
); 
Thanks in advance :)
Regards,
Karthik

--Karthik

sgarlapa 88 posts Joined 03/13
13 Mar 2016

Try listing both your tpt script and the output files at the prompt with complete path.
Ex:
ls /teradata/tpt/scriptname.extension
ls /teradata/tpt/output/outfilename.extension
 
Ensure you are using the proper extensions of the files  (Ex. .txt, .dat). That may resolve your problem.

feinholz 1234 posts Joined 05/08
14 Mar 2016

You ALWAYS need to tell us what version of TPT you are using.
That way we will know if there is a fix for a particular version that you might be able to use.
This error sometimes comes up when you do not have permission to create files in the directory from where you are running TPT. That is because we create temp files while setting up the job.
The error could also occur if you do not have permissions to write into the logs directory.
Check out these 2 areas, and if that is not the issue, post your version of TPT.
 

--SteveF

Karthikk 6 posts Joined 10/15
15 Mar 2016

Thank You sgarlapa and Steve. I have tried the suggestions from both of you. The issue is am facing is with Teradata TPT version 
Teradata Parallel Transporter Version 14.00.00.09
Also attaching the log of the TPT job. Earlier I had run the job once and it completed successfully. Next time when i tried to run the job its failing. I have compared both the logs and below statement is missing in the log of the failure run.
FILE_WRITER_REQ1: TPT19222 Operator instance 1 processing file '/directory/filename.dat'. 
Above statement is missing in the failure log and script is failing due to that. Attaching the log for your reference. In the attachment highlighted statement is missing when I run the script now.
Please advice.
Regards,
Karthik

--Karthik

Karthikk 6 posts Joined 10/15
15 Mar 2016

Hi Steve,

I was able to fix that error. I have deleted the checkpoint files of my previous failure runs from tpt installation directory.

After that script ran fine and was able to export data from table without any issues. As tpt job resumed each time from checkpoint rather than restarting the tpt job , my failure job was still reflecting even though i have fixed the errors in my script.

Thank you for your assistance on this.

Regards,
Karthik

--Karthik

You must sign in to leave a comment.