Skip to Content
avatar image
Former Member

error_number () data services designer

Dear All,


I am using data services designer for ETL jobs.


When I try to insert a register in the target tabla  that already exists I get "Error: ORA-00001: unique constraint (string.string) violated"


I have in the work flow a CATCH OBJECT which capture the errors using  variables as$BITA_VGB_ERR = error_number();


Errors are inserted in the table BITA_DW_DM_CONTROL_ERRORES using variables as $BITA_VGB_ERR which get the error through   error_number();


The value of $BITA_VGB_ERR = error_number(); is 0  and 0 means no errors.


Which is the number return by error_number() captured by a CATCH OBJECT after an ORA_00001 ?


I GET 0 but 0 is no errors and I got ORA_00001 I Do not understand why error_number() return 0


Thanks in advance-


Best Regards


Antonio





$BITA_VGB_JOB_NAME = job_name();

$BITA_VGB_ERR = error_number();

$BITA_VGB_ERR_CTX = error_context();

$BITA_VGB_ERR_MSG = error_message();

$BITA_VGB_ERR_TIME = error_timestamp();

$BITA_VGB_ERR_DATE =  ((year(error_timestamp())* 10000) + (month(error_timestamp())*100))+ day_in_month(error_timestamp());

$BITA_VGB_FILE_JOB_LOG = 'log_'||$BITA_VGB_JOB_NAME||$BITA_VGB_ERR_DATE || '.txt';

sql('BITA_DS_DEST','INSERT INTO BITA_DW_DM_CONTROL_ERRORES (NUM_ERR, JOB_NAME_ERR, CTX_ERR, MSG_ERR, FC_REGISTRO_BBDD, DATE_ERR) VALUES('||$BITA_VGB_ERR||',{$BITA_VGB_JOB_NAME}, {$BITA_VGB_ERR_CTX},{$BITA_VGB_ERR_MSG}, sysdate,'||$BITA_VGB_ERR_DATE||')');

Re: error_number () data services designer

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 18, 2014 at 10:51 AM

    we cant load duplicate record to database.

    eg: Assume you have loaded the combination of primary key of custmer- C001 and Material-M001 to target.we cant load the same combination of primary key to target.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I know that I cannot cant load the same combination of primary key to target  because of that I get an ORA_00001 .

      I have a error table BITA_DW_DM_CONTROL_ERRORES for this cases but in the errror table BITA_DW_DM_CONTROL_ERRORES I cannot see the error of ORA_00001 , I see only error_number = 0 means NO ERRORS. I want to register all the errors in BITA_DW_DM_CONTROL_ERRORES table.

      Do you know why $BITA_VGB_ERR  = 0  ? <- error_number();

      Do you know the function error_number() of data services designer?

      Please give which are the values that this function return. I get 0 but why it is 0?????????

      Thanks in advance.

      Best Regards

      Antonio