problem with TPT load :TPT12108: Output Schema does not match data from SELECT statement

General

problem with TPT load :TPT12108: Output Schema does not match data from SELECT statement

Hi I am trying to workout delta transformation in TPT.

I am trying to compare src and target tables and accordingly updaing target table somthing like

DEFINE JOB delta_USING_SRC_TABLE

DESCRIPTION 'incorporate DELTA - We will load load_tbl using load_tbl_src. If row is existing, row in

load_tbl will get updated If rows are missing in load_tbl, insert operation will be

carried out in load_tbl If rows are missing in load_tbl_src, delete operation will be

carried out in load_tbl.'

(

  DEFINE SCHEMA COMB_SCHEMA

  DESCRIPTION 'COMB_SCHEMA'

   (

 account_number_src   INTEGER,

 account_number_tgt  INTEGER,

 street_number_src  INTEGER,

 street_number_tgt   INTEGER,

 street_src   VARCHAR(25 ),

 street_tgt   VARCHAR(25 ),

 city_src   VARCHAR(20 ),

 city_tgt   VARCHAR(20 ), 

 state_src    VARCHAR(2 ),

 state_tgt   VARCHAR(2 ),

 zip_code_src   INTEGER,

 zip_code_tgt   INTEGER,

 balance_forward_src   DECIMAL(10, 2),

  balance_forward_tgt  DECIMAL(10, 2),

 balance_current_src  DECIMAL(10, 2),

 balance_current_tgt  DECIMAL(10, 2),

 upd_flg     VARCHAR(3),

 key_col    INTEGER

 );

 DEFINE OPERATOR EXPORT_OPERATOR

 DESCRIPTION 'QUERY1'

 TYPE EXPORT

 SCHEMA COMB_SCHEMA

  ATTRIBUTES

   (VARCHAR PrivateLogName,

    VARCHAR TdpId = 'myhost',

    VARCHAR UserName = 'dbc',

    VARCHAR UserPassword = 'dbc',

    VARCHAR AccountId,

    VARCHAR SelectStmt

  );

  DEFINE OPERATOR UPDATE_OPERATOR

  DESCRIPTION 'TERADATA PARALLEL TRANSPORTER UPDATE OPERATOR'

  TYPE UPDATE

  SCHEMA *

  ATTRIBUTES

  (

   VARCHAR TargetTable =  'tpch.load_tbl',

    VARCHAR TdpId = 'myhost',

    VARCHAR UserName = 'dbc',

    VARCHAR UserPassword = 'dbc',

    VARCHAR AccountId,

    VARCHAR LogTable = 'tpch.upd_tables_log',

    VARCHAR PrivateLogName = 'Private_Log1'

  );

APPLY

   CASE 

    WHEN (UPD_FLG = 'DEL')

    THEN 'DELETE FROM tpch.load_tbl  WHERE ACCOUNT_NUMBER = :KEY_COL;'

    WHEN (UPD_FLG = 'UPD')

    THEN 'UPDATE  tpch.load_tbl

          SET  Street_Number = :street_number_tgt

  , Street = :street_tgt

  ,City = :city_tgt

  ,State = :state_tgt

  , Zip_Code = :zip_code_tgt

  , Balance_Forward = :balance_forward_tgt

  , Balance_Current = :balance_current_tgt

   WHERE ACCOUNT_NUMBER = :key_col;'

    WHEN (UPD_FLG = 'INS')

    THEN 'INSERT INTO tpch.load_tbl  (Account_Number,Street_Number,Street,City,State,Zip_Code

    ,Balance_Forward,Balance_Current)

 VALUES (:account_number_tgt,:street_number_tgt,:street_tgt,:city_tgt,:state_tgt,:zip_code_tgt

    ,:balance_forward_tgt,:balance_current_tgt);'

   END

TO OPERATOR (UPDATE_OPERATOR [1] )

SELECT  account_number_src 

       ,account_number_tgt 

       ,street_number_src 

       ,street_number_tgt 

       ,street_src  

       ,street_tgt  

       ,city_src  

       ,city_tgt  

       ,state_src  

       ,state_tgt  

       ,zip_code_src  

       ,zip_code_tgt  

       ,balance_forward_src 

       ,balance_forward_tgt 

       ,balance_current_src 

       ,balance_current_tgt 

       ,upd_flg   

       ,key_col   

FROM OPERATOR

(

 EXPORT_OPERATOR [1]

  ATTR

  (

    SelectStmt = 'SELECT src.Account_Number as    account_number_src 

   ,tgt.Account_Number AS  account_number_tgt 

         ,src.Street_Number as         street_number_src 

         ,tgt.Street_Number as         street_number_tgt 

          ,src.Street as          street_src  

          ,tgt.Street as           street_tgt  

   ,src.City as   city_src  

   ,tgt.City as    city_tgt  

   ,src.State as    state_src  

   ,tgt.State as    state_tgt  

   ,src.Zip_Code as   zip_code_src  

   ,tgt.Zip_Code as   zip_code_tgt  

          ,src.Balance_Forward as  balance_forward_src 

          ,tgt.Balance_Forward as  balance_forward_tgt 

          ,src.Balance_Current as  balance_current_src 

          ,tgt.Balance_Current as  balance_current_tgt 

        ,CASE  WHEN account_number_src IS NULL

                THEN ''DEL''

         WHEN account_number_src=account_number_tgt

         THEN ''UPD''

         WHEN account_number_src IS NOT NULL

         THEN ''INS''

   END AS UPD_FLG

       ,cast(CASE WHEN account_number_src IS NULL

             THEN account_number_tgt

        ELSE  account_number_src

        END AS key_col

  FROM tpch.load_tbl tgt

  FULL OUTER JOIN  tpch.load_tbl_src src

  ON  src.Account_Number= tgt.Account_Number

  ;'

   )

);

);

when I execute it , its giving error "TPT12108: Output Schema does not match data from SELECT statement" .

What might be the issue?