All Forums Tools
jmar 6 posts Joined 11/15
30 Nov 2015
TPT05015: Error: Cannot open the file '$SCHEMA_GEN_D_TBL001.txt' due to error 13. Permission denied

Hi.  I am executing `tbuild` with a job script that makes use of templates to delete from a staging table and load data into that table from a delimited text file.  When I execute this command logged in as my user it succeeds.  However, when I execute it logged in as someone else, it fails with:

Teradata Parallel Transporter Version

TPT_INFRA: TPT04032: Error: Schema generation failed for table 'MY_STG_SCHEMA.MY_STG_TABLE' in DBS 'foo':

  "GetDelimitedFileSchema" status: 48.


Job script preprocessing failed.

TPT_INFRA: TPT05015: Error: Cannot open the file '$SCHEMA_GEN_D_TBL001.txt' due to error 13.

                     Permission denied

Job terminated with status 12.


The error message is clear enough:  logged on as the other user, tbuild does not have permission to view a schema file.  But why?  Isn't tbuild creating the file and reading it in the same session?
Here is the command I am using:
tbuild -f /home/myusername/Delete_Table_Then_Load_File.txt -u TargetTdpId = 'foo', TargetUserName = 'bar', TargetUserPassword = 'baz', TargetTable = 'MY_STG_SCHEMA.MY_STG_TABLE', FileName = '/home/myusername/my_data_file.dat', DCPFileList = 'N', Format = 'Delimited', LogTable = 'MY_STG_SCHEMA.MY_STG_TABLE_L', DeleterLogTable = 'MY_STG_SCHEMA.MY_STG_TABLE_L', SourceFormat = 'Delimited', DCPSkipRows = 1, DCPSkipRowsEveryFile = 'Y', DCPOpenMode = 'Read', DCPTextDelimiter = '|', DCPQuotedData = 'Optional', DCPOpenQuoteMark = '"', DCPCloseQuoteMark = '"', LoadInstances = 1, DCPInstances = 1 TPT_20151130_153443
Here is /home/myusername/Delete_Table_Then_Load_File.txt:

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)




  STEP Load_File (

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




You must sign in to leave a comment.