New to teradata RDBMS error 3707: Syntax error, expected something like a name or a Unicode delimited identifier

Database
Fan

New to teradata RDBMS error 3707: Syntax error, expected something like a name or a Unicode delimited identifier

 

I am trying to transport data from SQL server to teradata and I get a syntax error.  This is the script, any help will be well appreciated.

DEFINE JOB Queue_Transfer

(

    DEFINE OPERATOR W_1_o_Queue_Transfer

    TYPE LOAD

    SCHEMA *

    ATTRIBUTES

    (

        VARCHAR UserName,

        VARCHAR UserPassword,

        VARCHAR LogTable,

        VARCHAR TargetTable,

        INTEGER BufferSize,

        INTEGER ErrorLimit,

        INTEGER MaxSessions,

        INTEGER MinSessions,

        INTEGER TenacityHours,

        INTEGER TenacitySleep,

        VARCHAR AccountID,

        VARCHAR DateForm,

        VARCHAR ErrorTable1,

        VARCHAR ErrorTable2,

        VARCHAR NotifyExit,

        VARCHAR NotifyExitIsDLL,

        VARCHAR NotifyLevel,

        VARCHAR NotifyMethod,

        VARCHAR NotifyString,

        VARCHAR PauseAcq,

        VARCHAR PrivateLogName,

        VARCHAR TdpId,

        VARCHAR TraceLevel,

        VARCHAR WorkingDatabase

    );

    DEFINE SCHEMA W_0_s_Queue_Transfer

    (

        objid INTEGER,

        dev INTEGER,

        Id_Number VARCHAR(40),

        Queue VARCHAR(100),

        Start_date INTDATE,

        End_Date INTDATE,

        Queue2Case INTEGER,

        Queue2Subcase INTEGER

    );

    DEFINE OPERATOR W_0_o_Queue_Transfer

    TYPE ODBC

    SCHEMA W_0_s_Queue_Transfer

    ATTRIBUTES

    (

        VARCHAR UserName,

        VARCHAR UserPassword,

        VARCHAR SelectStmt,

        VARCHAR PrivateLogName,

        VARCHAR DSNName,

        VARCHAR ConnectString,

        VARCHAR TruncateData

    );

    APPLY

        (

            'INSERT INTO DL07_CUSTOMER_CARE.Clarify_Queue (objid,dev,Id_number,Queue,Startdate,Enddate,QueueCase ,QueueSubcase) VALUES (:objid,:dev,:Id_Number,:Queue,:Start_date,:End_Date,: Queue2Case,:Queue2Subcase);'

        )

    TO OPERATOR

    (

        W_1_o_Queue_Transfer[3]

        ATTRIBUTES

        (

            UserName = @TeradataDestinationUser,

            UserPassword = @TeradataDestinationPassword,

            LogTable = 'DL07_CUSTOMER_CARE.Clarify_Queue_log',

            TargetTable = 'DL07_CUSTOMER_CARE.Clarify_Queue',

            TdpId = 'dwdbmp18'

        )

    )

    SELECT * FROM OPERATOR

    (

        W_0_o_Queue_Transfer[1]

        ATTRIBUTES

        (

            UserName = @OdbcSourceUser,

            UserPassword = @OdbcSourcePassword,

            SelectStmt = 'SELECT objid,dev,Id_Number,Queue,Start_date,End_Date,Queue2Ca se,Queue2Subcase FROM Clarify.dbo.CaseQueue_tbl;',

            DSNName = 'localclarify'

        )

    );

);

3 REPLIES
Fan

Re: New to teradata RDBMS error 3707: Syntax error, expected something like a name or a Unicode delimited identifier

I forgot to put the whole error message

TPT10508: RDBMS error 3707: Syntax error, expected something like a name or a Unicode delimited identifier or an 'UDFCALLNAME' keyword between ',' and the 'Queue' keyword.

Fan

Re: New to teradata RDBMS error 3707: Syntax error, expected something like a name or a Unicode delimited identifier

I was able to figure out what the problem was.  I was taking a look at the table where the data was going to load and notice that on the table definition, the field Queue was between quotes.  The reason for being in quotes is because the name Queue is a definition name within teradata.  Once I changed the name, the data was able to be transported.

Re: New to teradata RDBMS error 3707: Syntax error, expected something like a name or a Unicode delimited identifier

The solution:

Define the length on the columns in the teradata stage whenever loading data into teradata.

Data length cant be empty like in an oracle stage