Error while exporting data to one file from different table sources.

Tools

Error while exporting data to one file from different table sources.

Hi Experts

I am trying to write a TPT script to export the data to a file from multiple table sources. am getting the following error:

>tbuild -f exp_tpt.ctl1

Teradata Parallel Transporter Version 13.10.00.12

TPT_INFRA: Syntax error at or near line 69 of Job Script File 'exp_tpt.ctl1':

TPT_INFRA: At "SELECT" missing { EXTENDED_LITERAL_ CHAR_STRING_LITERAL_ } in Rule: Character String Literal

Compilation failed due to errors. Execution Plan was not generated.

Job script compilation failed.

Job terminated with status 8.

My TPT SCRIPT is:

#############

DEFINE JOB EMPLOYEE_SOURCE_LOAD

    DESCRIPTION 'DATA EXPORT JOB'

    (

      DEFINE OPERATOR FILE_WRITER1

      DESCRIPTION 'DataConnector WRITER'

      TYPE DATACONNECTOR CONSUMER

      SCHEMA *

      ATTRIBUTES

      (

            VARCHAR PrivateLogName = 'dataconlog',

            VARCHAR FileName      = '/ngs/app/amn/tptfile1.txt',

            VARCHAR IndicatorMode = 'N',

            VARCHAR OpenMode      = 'Write',

            VARCHAR Format        = 'Delimited',

            VARCHAR TextDelimiter = ','

                  );

                  DEFINE SCHEMA EMPLOYEE_SOURCE_SCHEMA

                  DESCRIPTION 'EMPLOYEE INFORMATION SCHEMA'

                  (

                    Emp_id                   VARCHAR(11),

                    Emp_frst_Name              VARCHAR(50),

                    Emp_last_Name           VARCHAR(50),

                    Emp_age                 VARCHAR(50),

                    Emp_salary                 VARCHAR(50),

                    Emp_dept_id                VARCHAR(50),

                     Emp_Dept_Desc            VARCHAR(50)

                     );

                  DEFINE OPERATOR SQL_SELECTOR1

                  DESCRIPTION 'SQL OPERATOR'

                  TYPE SELECTOR

                  SCHEMA EMPLOYEE_SOURCE_SCHEMA

                  ATTRIBUTES

                  (

                        VARCHAR PrivateLogName         = 'exportoper_privatelog',

                        VARCHAR UserName            = '@UserName',

                        VARCHAR UserPassword        = '@password',

                        VARCHAR TdpId                = 'abc',

                        VARCHAR ReportModeOn         = 'Y',

                        VARCHAR SelectStmt         = 'select * from abc.Employee_dept;'

                      );

                  DEFINE OPERATOR SQL_SELECTOR

                  DESCRIPTION 'SQL OPERATOR'

                  TYPE SELECTOR

                  SCHEMA EMPLOYEE_SOURCE_SCHEMA

                  ATTRIBUTES

                  (

                        VARCHAR PrivateLogName         = 'exportoper_privatelog',

                        VARCHAR UserName            = '@username',

                        VARCHAR UserPassword        = '@password',

                        VARCHAR TdpId                = 'abc',

                        VARCHAR ReportModeOn         = 'Y',

                        VARCHAR SelectStmt         = 'abc.Employee_Table_old;'

                      );

                  APPLY  

                  (

                  SELECT * FROM OPERATOR( SQL_SELECTOR1 [1] );

                  );

                  APPLY  

                  (

                 TO OPERATOR( FILE_WRITER1  [1] )

                 SELECT * FROM OPERATOR( SQL_SELECTOR [1] );

                 );

);

I have the last two columns Emp_dept_id , Emp_Dept_Desc coming from abc.Employee_dept table and the rest from the other table.

Please suggest the error in script.