Search code examples
plsqloracle-data-integrator

Any way to call odi package or interface through the oracle database


I need to execute the odi package/mapping through database parametric procedure along with that i need to capture the package/Mapping status(Failed/Passed) in procedure .

ODI Version : 12c

i have tried the mentioned code and it's showing the attached error message:**enter image description here**


Solution

  • You can do it in two steps:

    1. Create a plsql procedure that will run a shell script/line command
    2. The line command will call an ODI scenario of a map.

    You can achieve the first point by reading this.

    PL/SQL procedure that executes a command line:

    create or replace procedure host( cmd in varchar2 )
    as
    status number;
    begin
    dbms_pipe.pack_message( cmd );
    status := dbms_pipe.send_message( 'HOST_PIPE' );
    if ( status <> 0 ) then raise_application_error( -20001, 'Pipe error' );
    end if;
    end;
    /
    

    Second point it's written in the ODI documentation, at chapter 7.3.2 Executing Scenario from command line.