TPT_INFRA: TPT02019: Error: opening file '$SCHEMA_GEN_D_TBL001.txt': "No such file or directory" (error code 2).

Tools
Enthusiast

TPT_INFRA: TPT02019: Error: opening file '$SCHEMA_GEN_D_TBL001.txt': "No such file or directory" (error code 2).

Hi.  I am using a single generic TPT script to load data from different files into several different tables and I noticed that when two or more jobs using this script kick off at roughly the same time, they fail with the following error code:

    TPT_INFRA: TPT02019: Error: opening file '$SCHEMA_GEN_D_TBL001.txt': "No such file or directory" (error code 2).

In my experience, at least one of these jobs succeeds while one or more of the others fails.  I am guessing this is because they are all trying to create a temporary file and using the same name as the other jobs ('$SCHEMA_GEN_D_TBL001.txt').

Is there any way to prevent this behavior?  The more TPT jobs we schedule using this script, the higher the probability that there will be a collision unless we specifically stagger our batch due to this apparent "bug" (which is going to be a tough sell).

My generic TPT script:

DEFINE JOB Delete_Table_Then_Load_File

DESCRIPTION 'Delete data from a staging table and then load data from a file'

(

  STEP Delete_Table (

    APPLY ('DELETE FROM ' || @TargetTable)

    TO OPERATOR ($DELETER);

  );

  STEP Load_File (

    APPLY $INSERT TO OPERATOR ($LOAD()[@LoadInstances])

    SELECT * FROM OPERATOR ($DATACONNECTOR_PRODUCER()[@DCPInstances]);

  );

);

Two example commands that would "collide" if started roughly simultaneously:

tbuild -f Delete_Table_Then_Load_File.txt -u TargetTdpId = 'myhostname', TargetUserName = 'myusername', TargetUserPassword = 'mypassword', TargetTable = 'SOME_OWNER.SOME_TABLE_01', FileName = '/path/to/file_01.dat', DCPFileList = 'Y', Format = 'Delimited', SourceFormat = 'Delimited', DCPSkipRows = 1, DCPSkipRowsEveryFile = 'Y', DCPOpenMode = 'Read', DCPTextDelimiter = ',', DCPQuotedData = 'Optional', DCPOpenQuoteMark = '"', DCPCloseQuoteMark = '"', LoadInstances = 1, DCPInstances = 1 TPT_20160119_134521

tbuild -f Delete_Table_Then_Load_File.txt -u TargetTdpId = 'myhostname', TargetUserName = 'myusername', TargetUserPassword = 'mypassword', TargetTable = 'SOME_OWNER.SOME_TABLE_01', FileName = '/path/to/file_02.dat', DCPFileList = 'Y', Format = 'Delimited', SourceFormat = 'Delimited', DCPSkipRows = 1, DCPSkipRowsEveryFile = 'Y', DCPOpenMode = 'Read', DCPTextDelimiter = ',', DCPQuotedData = 'Optional', DCPOpenQuoteMark = '"', DCPCloseQuoteMark = '"', LoadInstances = 1, DCPInstances = 1 TPT_20160119_134522

4 REPLIES
Enthusiast

Re: TPT_INFRA: TPT02019: Error: opening file '$SCHEMA_GEN_D_TBL001.txt': "No such file or directory" (error code 2).

Has anyone seen this before?  We saw another job fail with a similar error due to the same problem, I suspect:

TPT_INFRA: TPT02019: Error: opening file '$INSERT_D_TBL001.txt': "No such file or directory" (error code 2).

Teradata Employee

Re: TPT_INFRA: TPT02019: Error: opening file '$SCHEMA_GEN_D_TBL001.txt': "No such file or directory" (error code 2).

Use the -j option to provide a unique jobname for each job.

Enthusiast

Re: TPT_INFRA: TPT02019: Error: opening file '$SCHEMA_GEN_D_TBL001.txt': "No such file or directory" (error code 2).

Fred, thanks for the tip.  Can you comment on the difference between using the -j option and how I'm currently passing the job name?

Currently, I'm passing a string to `tbuild` as the last argument (notice the "TPT_20160119_..." at the end of each command in my original post), without using the '-j' switch.

Based on the first few lines of the log file, TPT seems to correctly register this as the job name:

Teradata Parallel Transporter Version 14.10.00.00

Job log: /opt/teradata/client/14.10/tbuild/logs/TPT_PY_20160122_173021-1515.out

Job id is TPT_PY_20160122_173021-1515, running on w1eisinformatica02

Am I not successfully telling TPT to use the job name I want?  If I am, is there any other reason why two jobs would conflict like this?

Teradata Employee

Re: TPT_INFRA: TPT02019: Error: opening file '$SCHEMA_GEN_D_TBL001.txt': "No such file or directory" (error code 2).

This error is not due to the job name.

It is due to a temp file that is created for a brief moment and when 2 jobs are started simulataneously, there is a slight chance of a collision. We fixed this right after 14.10.00.00 was made available (by ensuring our temp files have unique names).

You are running with a very old version of TPT 14.10 (one should actually not run with a version that ends with "00.00" as we are always adding patches).

Please upgrade to the latest version of 14.10 and you should see this problem go away.

-- SteveF