Error in ODI procedure

Hi Experts,
I have created following procedure and triyng to get column value by using rownum. When I run the scenario, I am getting following exception at ODI Procedure step. Can any one please help me on it
I have created loop package to fetch column value until loop end.
Please let me know if you are not clear my query
ODI Procedure:
begin
select a.eno into '#EMPNO' from (select rownum r,e.* from trg_emp_01 e) a where a.r=#Counter;
end;
#EMPNO variable created as alphanumeric datatype and
#Counter variable created as alphanumic datatype and it is assign with '1' value
Exception:
6550 : 65000 : java.sql.SQLException: ORA-06550: line 1, column 25:
PLS-00220: simple name required in this context
ORA-06550: line 1, column 28:
PL/SQL: ORA-00904: : invalid identifier
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
java.sql.SQLException: ORA-06550: line 1, column 25:
PLS-00220: simple name required in this context
ORA-06550: line 1, column 28:
PL/SQL: ORA-00904: : invalid identifier
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
     at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
     at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
     at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
     at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
     at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcOrders(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
     at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
     at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
     at com.sunopsis.dwg.cmd.e.i(e.java)
     at com.sunopsis.dwg.cmd.g.y(g.java)
     at com.sunopsis.dwg.cmd.e.run(e.java)
     at java.lang.Thread.run(Thread.java:595)
ODI Procedure:
begin
select a.eno into #EMPNO from (select rownum r,e.* from trg_emp_01 e) a where a.r=#Counter;
end;
Exception:
6550 : 65000 : java.sql.SQLException: ORA-06550: line 1, column 26:
PL/SQL: ORA-00936: missing expression
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
java.sql.SQLException: ORA-06550: line 1, column 26:
PL/SQL: ORA-00936: missing expression
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
     at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
     at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
     at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
     at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
     at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcOrders(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
     at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
     at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
     at com.sunopsis.dwg.cmd.e.i(e.java)
     at com.sunopsis.dwg.cmd.g.y(g.java)
     at com.sunopsis.dwg.cmd.e.run(e.java)
     at java.lang.Thread.run(Thread.java:595)
Thanks
Phani
Edited by: Phanikanth on Jul 9, 2010 1:25 AM
Edited by: Phanikanth on Jul 9, 2010 2:08 AM

Good point - In my case, these are single executable statements. These have been saved in ODI and executed successfully. Just no using my machine.
EXAMPLE 1------------
DECLARE
RetVal ;
I_STRING VARCHAR2(200);
BEGIN
I_STRING := '';
RetVal := XXX.PKG_XXX.SF_COMMA_TO_TABLE ( I_STRING );
COMMIT;
END;
EXAMPLE 2------------
SELECT C.COL1, B.COL2, B.COL3,TO_CHAR(B.EFFDT,'YYYY-MM-DD') COL4,B.COL5,B.COL6
FROM TABLE1 A, TABLE2 B, TABLE3 C
WHERE
and A.ID = 'XXX'
and a.setcntrlvalue = ' '
AND A.NAME = 'XXX'
AND A.EFFDT =
(SELECT MAX(A_ED.EFFDT) FROM TABLE1 A_ED
WHERE A.SETID = A_ED.SETID
AND A_ED.EFFDT <= SYSDATE)
AND B.EFFDT =
(SELECT MAX(B_ED.EFFDT) FROM TABLE2 B_ED
WHERE B.SETID = B_ED.SETID
AND B.ACCOUNT = B_ED.ACCOUNT
AND B_ED.EFFDT <= SYSDATE)
AND A.SETID = B.SETID
AND A.RANGE_FROM = A.RANGE_TO
AND B.ACCOUNT = A.RANGE_FROM
AND A.SETID = C.SETID
AND A.TREE_NAME = C.TREE_NAME
AND A.TREE_NODE_NUM = C.TREE_NODE_NUM
AND C.EFFDT =
(SELECT MAX(C_ED.EFFDT) FROM TABLE3 C_ED
WHERE C.SETID = C_ED.SETID
AND C_ED.EFFDT <= A.EFFDT)
------------------

Similar Messages

  • ODI -OBIEE Lineage:Error while running ODI Procedure

    Hi ,
    I am using prebuilt mapping provided by oracle to achive dtata lineage between odi and obiee.
    I am getting error when i run scenario at Create "Same Column dummy Exp" procedure step.
    Error Info :
    ODI-1228: Task Create the "Same Column" dummy Expression (Procedure) fails on the target ORACLE connection ORACLE_XPONE.
    Caused By: java.sql.SQLSyntaxErrorException: ORA-00984: column not allowed here
    Procedure info:
    insert into <%=odiRef.getObjectName("LINEAGE_EXPRESSION")%>
    (I_LINEAGE_EXPRESSION, PROJECT_NAME, FOLDER_NAME, JOB_NAME, EXPRESSION, EXPRESSION_ORIGIN)
    values
    (<%=odiRef.getObjectName("BI_OBJ_ID.NEXTVAL")%>, 'Dummy', 'Dummy', 'Dummy', '(Same Column)', 'Dummy')
    Please let me know how to overcome this problem if anybody have achived lineaged by using oracle provided mappings.
    Thanks in Advance

    Hi,
    If you are on ODI 11g remove the odiRef.getObjectName("BI_OBJ_ID.NEXTVAL") function call and just give the sequence BI_OBJ_ID.NEXTVAL where ever its being used.
    Regards,
    Rajesh

  • ODI Procedure error log syntax

    hi
    I need to call an odi procedure and an error log needs to be stored on an error table.
    I have created an ODI procedure and in command on source select Oracle as technology and the logical schema
    here I put
    DECLARE
    ODI_VAR VARCHAR2(4000);
    BEGIN
    select ( '<%=odiRef.getPrevStepLog( "MESSAGE" )%>') into ODI_VAR from dual;
    END;
    and in target tab.
    Insert into ERROR_LOG (TASK_NAME,ERROR_DESCRIPTION)
    Values ('test','ODI_VAR');
    AFTER executing I am getting the below error
    900 : 42000 : java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement
    java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:397)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
         at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:662)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Odscrarr.doODNY(T4C8Odscrarr.java:101)
         at oracle.jdbc.driver.T4CPreparedStatement.doDescribe(T4CPreparedStatement.java:848)
         at oracle.jdbc.driver.OracleStatement.describe(OracleStatement.java:5331)
         at oracle.jdbc.driver.OracleResultSetMetaData.<init>(OracleResultSetMetaData.java:58)
         at oracle.jdbc.driver.OracleResultSetImpl.getMetaData(OracleResultSetImpl.java:274)
         at oracle.odi.runtime.agent.execution.sql.concurrent.FastJDBCRecordSet.<init>(FastJDBCRecordSet.java:73)
         at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:97)
         at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)
         at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:67)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)
    Please help me to resolve this issue.

    Hi,
    Try like this :
    Command on source :
    select ( '<%=odiRef.getPrevStepLog( "MESSAGE" )%>')  ODI_VAR from dual
    Command on target:
    Insert into ERROR_LOG (TASK_NAME,ERROR_DESCRIPTION)
    Values ('test',:ODI_VAR)
    Use the above syntax as it is....it should work..........

  • Error while execution ODI procedure : java.lang.NullPointerException

    Hi,
    I`m trying to execute a simple ODI procedure and I`m getting the following exception:
    java.lang.NullPointerException
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.j(e.java)
         at com.sunopsis.dwg.cmd.g.F(g.java)
         at com.sunopsis.dwg.dbobj.SnpScen.a(SnpScen.java)
         at com.sunopsis.dwg.dbobj.SnpScen.localExecuteSync(SnpScen.java)
         at com.sunopsis.dwg.tools.StartScen.actionExecute(StartScen.java)
         at com.sunopsis.dwg.function.SnpsFunctionBaseRepositoryConnected.execute(SnpsFunctionBaseRepositoryConnected.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.j(e.java)
         at com.sunopsis.dwg.cmd.g.z(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:595)
    The source of the procedure:
    select
    P_ID,
    P_NAME,
    to_char(START_TIME_KEY,'DD-MON-YYYY HH24:MI:SS') as START_TIME_KEY,
    to_char(END_TIME_KEY,'DD-MON-YYYY HH24:MI:SS') as END_TIME_KEY,
    P_IS_ACTIVE,
    from persons
    The target of the procedure:
    DECLARE
    v_START_TIME_KEY DATE;
    v_END_TIME_KEY DATE;
    v_NAME VARCHAR2(200);
    v_ID NUMBER;
    BEGIN
    v_NAME := '#P_NAME';
    commit;
    END;
    ODI version: 10.1.3.5.5
    Source and target technology: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    Thanks!

    Hello,
    Is your aim to get the Name from the table into the variable. ?
    And if there is only one row from the table you can use refresh variable to get the name:
    if there are more rows and you want to do somehthing repeatedly using the name, then you need to use the method you have described.
    Declare the variable in the pakcage and give some default value to the variable then call the procedure.
    Regards
    Reshma

  • How to execute unix command from ODI Procedure

    Hi,
    I am trying to execute below unix command from ODI Procedure (Command on Target tab) but I am getting the error "java.io.IOException: Cannot run program "cd": error=2, No such file or directory" but when I try to execute the same command using OdiOSCommand, it is executing successfully. I don't want to use shell script to execute this command. Is there any specific syntax am I missing to execute this command from ODI procedure?
    cd /project3/tmt/;ls *.dmp > dmplist.lst
    Please help me on this...
    Thanks
    MT

    Hi nahlikh,
    Thank you for the reply.
    I used below command in Procedure but still getting the same error as "java.io.IOException: Cannot run program "OdiOSCommand": error=2, No such file or directory".
    OdiOSCommand "-COMMAND=cd /project3/tmt/;ls *.dmp > dmplist.lst"
    as I mentioned earlier if I use the command cd /project3/tmt/;ls *.dmp > dmplist.lst in OdiOSCommand tool it is executing successfully without any issues.
    any thoughts appreciated to get a solution for this issue.
    Thanks
    MT

  • Getting error in Jython Procedure

    hi all,
    I m writing this code in ODI procedure with Target technology as Jython and ignore errors checked.
    filesrc = open('D:\MyFile.txt ','r')
    first=filesrc.readline()
    lines = 0
    while first:
    lines += 1
    first=filesrc.readline()
    def intWithCommas(x):
    if type(x) not in [type(0), type(0L)]:     
    raise TypeError("Parameter must be an integer.")
    if x < 0:
    return '-' + intWithCommas(-x)
    result =''
    while x >= 1000:
    x, r = divmod(x, 1000)
    result = ",%03d%s" % (r, result)
    return "%d%s" % (x, result)
    s1=str(intWithCommas(lines))
    s2='\n\n and the First Line of the File is —>> \n\n'
    filesrc.seek(0)
    s3=str(filesrc.readline())
    final=s1 + s2 + s3
    raise '\n\n The Number of Lines in the File are —>> ', final
    but getting this error:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    (no code object) at line 0
    SyntaxError: ('invalid syntax', ('<string>', 5, 1, 'lines += 1'))
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:345)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:169)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2374)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java:1615)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java:1580)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2755)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:619)
    Please help me in this regard..

    hi,
    Thanks for ur reply....
    i tried it using command promt...
    bin>jython D:\My_Jython.py
    but got errror...
    'jython' is not recognized as an internal or external command,
    operable program or batch file.
    then i tried
    bin>startcmd jython D:\My_Jython.py
    Again error::::
    OracleDI: Starting Command jython D:\MyFile.py
    java.lang.RuntimeException: oracle.odi.oditools.InvalidOdiToolException: Error:
    Unrecognized Oracle Data Integrator built-in function: jython
    at oracle.odi.oditools.OdiAbstractToolRunner$1$1.doAction(OdiAbstractToo
    lRunner.java:87)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgOb
    jectTemplate.java:193)
    at oracle.odi.oditools.OdiAbstractToolRunner$1.doInTransaction(OdiAbstra
    ctToolRunner.java:77)
    at oracle.odi.core.persistence.transaction.support.TransactionTemplate.e
    xecute(TransactionTemplate.java:119)
    at oracle.odi.oditools.OdiAbstractToolRunner.executeOpenTool(OdiAbstract
    ToolRunner.java:70)
    at oracle.odi.oditools.OdiAbstractToolRunner.executeTool(OdiAbstractTool
    Runner.java:53)
    at oracle.odi.ToolRunner.main(ToolRunner.java:75)
    Caused by: oracle.odi.oditools.InvalidOdiToolException: Error: Unrecognized Orac
    le Data Integrator built-in function: jython
    at com.sunopsis.dwg.function.SnpsFunctionBase.getOpenToolApi(SnpsFunctio
    nBase.java:939)
    at oracle.odi.oditools.OdiAbstractToolRunner$1$1.doAction(OdiAbstractToo
    lRunner.java:83)
    ... 6 more
    oracle.odi.oditools.OdiToolException: java.lang.RuntimeException: oracle.odi.odi
    tools.InvalidOdiToolException: Error: Unrecognized Oracle Data Integrator built-
    in function: jython
    at oracle.odi.oditools.OdiAbstractToolRunner.executeOpenTool(OdiAbstract
    ToolRunner.java:104)
    at oracle.odi.oditools.OdiAbstractToolRunner.executeTool(OdiAbstractTool
    Runner.java:53)
    at oracle.odi.ToolRunner.main(ToolRunner.java:75)
    Caused by: java.lang.RuntimeException: oracle.odi.oditools.InvalidOdiToolExcepti
    on: Error: Unrecognized Oracle Data Integrator built-in function: jython
    at oracle.odi.oditools.OdiAbstractToolRunner$1$1.doAction(OdiAbstractToo
    lRunner.java:87)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgOb
    jectTemplate.java:193)
    at oracle.odi.oditools.OdiAbstractToolRunner$1.doInTransaction(OdiAbstra
    ctToolRunner.java:77)
    at oracle.odi.core.persistence.transaction.support.TransactionTemplate.e
    xecute(TransactionTemplate.java:119)
    at oracle.odi.oditools.OdiAbstractToolRunner.executeOpenTool(OdiAbstract
    ToolRunner.java:70)
    ... 2 more
    Caused by: oracle.odi.oditools.InvalidOdiToolException: Error: Unrecognized Orac
    le Data Integrator built-in function: jython
    at com.sunopsis.dwg.function.SnpsFunctionBase.getOpenToolApi(SnpsFunctio
    nBase.java:939)
    at oracle.odi.oditools.OdiAbstractToolRunner$1$1.doAction(OdiAbstractToo
    lRunner.java:83)
    ... 6 more
    what wrong this time while executing the command....

  • Update Statement in ODI Procedure

    Hi All,
    I want to update a value in a table through ODI procedure
    I Created a procedure,added new step,given details like Technology,Context,Schema in Command on target
    on the command:
    i was trying with:-
    update table_name
    set column_name1='value1'
    where column_name2='value2'
    and also i tried with:-
    begin
    UPDATE Schema_name.Table_name SET column_name1='value1' WHERE column_name2='value2';
    end;
    in both cases i am unable to update the value in the table
    Please suggest me
    Thanks in Advance

    Hi,
    Thanks for the reply
    I fixed that problem
    It was caused due to Database error
    Thanks

  • Executing Java Code in ODI Procedure

    Hi All,
    I have following  java code which i need to write on ODI procedure but i am not sure which technology to chose (Jython,Sunopsis API or Java BeanShell).
    I tried to execute the procedure Jyhton with <% "Java code"%> but getting the error.Any boddy can suggest where i doing wrong.
    <%
    import javax.naming.Context;
    import javax.naming.NamingEnumeration;
    import javax.naming.directory.*;
    import java.util.Hashtable;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    String userName = "HXXXXXX";
    String CN1=null;
    String Dis_Name=null;
    String Mem_of=null;
    String Mail=null;
    String SGID=null;
    File file = new File("C:/Project/ODI/LDAPID.txt");
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "LDAP://XX.if.YYYY.net:389/OU=XYZ,DC=ZZ,DC=if,DC=XYZ,DC=COM");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, new String("" + "\\" + userName));
    env.put(Context.SECURITY_CREDENTIALS, "");
    DirContext ctx = null;
    NamingEnumeration results = null;
    ctx = new InitialDirContext(env);
    SearchControls controls = new SearchControls();
    controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
    results = ctx.search("", "(objectclass=person)", controls);
    FileWriter fw = new FileWriter(file.getAbsoluteFile());
    BufferedWriter bw = new BufferedWriter(fw);
       while (results.hasMore())
             SearchResult searchResult = (SearchResult) results.next();
             Attributes attributes = searchResult.getAttributes();
             Attribute attr = attributes.get("cn");
             String cn = (String) attr.get();
             CN1=(String.valueOf(attributes.get("cn")));
             Dis_Name=(String.valueOf(attributes.get("displayName")));
             SGID=(String.valueOf(attributes.get("userPrincipalName")));
             Mem_of=(String.valueOf(attributes.get("memberOf")));
             Mail=(String.valueOf(attributes.get("mail")));
             bw.write(CN1 + " || " + Dis_Name + " || " + SGID + " || " + Mail);
             bw.newLine();
    bw.close();
    results.close();
    ctx.close();
    %>
    I am getting following error.
    The application script threw an exception: java.lang.NullPointerException BSF info: CODE_JAVA at line: 0 column: columnNo
    Please suggest what went wrong with the code.
    Thanks
    Regards

    In Jython you don not need to declare the type so String userName = "HXXXXXX"; should simply read userName = "HXXXXXX" . Lots of your code need to be rewritten to work with Jython if you choose that as your technology.

  • How to read I$ table using ODI procedure

    Hi
    Can any one help me how to drop a I$ table from out sie of interface.
    I have tried below approches but no luck
    I have created ODI procedure with technology oracle and target logical schema (I$ tables are creating on target DB) with and with out begin and end;
    Approch 1:
    Given below code in ODi procedure
    drop table <%=odiRef.getTable("L", "INT_NAME", "W")%> <% if (new Integer(odiRef.getOption( "COMPATIBLE" )).intValue() >= 10 ) { out.print( "purge" ); }; %>
    Approch 2:
    drop table I$_<%=odiRef.getTable("L", "TARG_NAME", "A") %>;
    Approch 3:
    drop table <%=odiRef.getTable("L", "INT_NAME", "W")%> (but it is fetching target dtabase schema anme not I$ table)
    Please help me any other alternative way to drop a I$ table, more over this code should be unique for all interface
    Regards,
    Phanikanth

    Thanks bhabani,
    Actaul my requirement is some time my scenario is stoping due some issue at Merge Rows Step (I am using IKM Oracle Incremental Update(Merge) KM) when the next iteration starts it is thwoing and error at create flow table I$ step and error is table name is already exists, so i am doing is if the interface went failed I am storing those information in one table using ODI procedure (INF--ko-->ODI procedure) in same ODI procedure I want to call a I$ table to drop.
    Can you please provide the steps so it will very useful for me using Java variable.
    I have gievn a step as below on create I$ table step (after create I$ statement)
    <@ java.lang.String Idollertable = <%=odiRef.getTable("L", "INT_NAME", "W")%> ; @>
    I am calling Idollertable variable in ODI procedure which is ko>* of INF as <@=Idollertable@>
    Note: I have followed below approch
    ODI Procedure Code:
    drop table <@=Idollertable@>; --> *2nd approch*
    begin
    insert into ODI_EXECUTION_ERROR_DETAILS
    (SESSION_NO,
    SCENARIO_NAME,
    CONTEXT_NAME,
    ERR_MESSAGE,
    INSERT_COUNT,
    ERROR_COUNT)
    values
    <%=snpRef.getSession("SESS_NO")%>,
    '<%=odiRef.getPrevStepLog("STEP_NAME")%>',
    '<%=odiRef.getContext( "CTX_NAME" )%>',
    '<%=odiRef.getPrevStepLog("MESSAGE")%>',
    '<%=odiRef.getPrevStepLog("INSERT_COUNT")%>',
    '<%=odiRef.getPrevStepLog("ERROR_COUNT")%>'
    commit;
    drop table <@=Idollertable@>; --> * first approch *
    end;
    Please help me
    Regards,
    Phanikanth
    Edited by: Phanikanth on Mar 3, 2013 9:52 PM
    Edited by: Phanikanth on Mar 3, 2013 9:52 PM

  • Odi os call with option parameter from odi procedure

    Hi.
    I am calling a shell script from ODI as below inside an ODI procedure P1. The os command below is in 'Command on Target' side.I have defined v_in_param as an 'option' inside procedure P1
    OdiOSCommand sample.sh v_in_param
    i am getting error as 'OS command returned 1'.
    Is it the right syntax to pass an 'option' parameter to an OS call?
    thanks

    you can try OdiOSCommand sh sample.sh <%=odiRef.getOption("v_in_param")%> or even call OS Command in ODI Package and paste the above code.

  • Oracle error in ODI

    HI All,
    I am using ODI 11.
    I have a requirment where i need to see oracle error in ODI operator .
    Suppose the error is Format/Datatype/or etc error then it will show as the error with the error code in Operator.
    Plz let me know how to do this in ODI.
    Thanks,
    Lony

    Store the error in to java variable or odi variable.
    Then in procedure use below codes to print error into operator.
    throw new Exception("<@=java_variable@>"); or
    throw new Exception(" #odi_variable");

  • Importing ODI Procedure in Insert/Insert-Update mode

    Can we import an ODI procedure from one project to another in INSERT or INSERT-UPDATE mode?
    We are getting xml import error while doing this. But when we do the import in DUPLICATION mode, it successfully does so.
    The issue is that we have an ODI procedure in INT environment which is been used by several other packages. We changed the code of it in our DEV environment and when we tried to import it in INT environment through INSERT-UPDATE mode so that the the changes gets effected, we got error.
    This is quite obvious that the folder/sub-folder IDs are different in both environment and this is causing trouble.
    So, is there any other way, we can reflect the change in the INT environment with minimum effort? I mean, we don't want to import it in DUPLICATION mode....if we do so, we will have to re-map that procedure in all the packages and regenerate them.

    You can use variable to replace the value at runtime in the query but you need to either pass the variable value at startup or you can refresh variable value. But I dont think you can directly retrieve any topology setting as the variable value to be substituted in the query.

  • ODI Procedure - updting the source table

    Hi,
    I need to call a PL/SQL package via ODI. I used ODI procedure to do the task.
    In source tab - select empid from employee
    In target tab -
    decalre
    ab varchar2(25);
    begin
    pack1.proced1(:empid,ab);
    update success1 set val1 = ab where empid = *:empid;*
    commit;
    end;
    But when i execute the procedure, its giving the error as missing parameter empid. It could not recognise the bolded part. When i give the direct value in the cmd,
    update success1 set val1 = ab where empid = *101;* its working fine.
    Any idea to resove this issue.
    Thanks in Advance,
    Ram Mohan T

    Vijay,
    1. Do you expect a single record to be returned by your source query?
    No. My source query returns with multiple records.
    2. What is the signature of your procedure? Does it accept a list of Id's or a single number.
    My procedure accepts only one id at a time. After that is processed, the next id will be passed to the procedure.
    Vijay, one thing i am confused is when I use a insert statement after the procedure its working fine (insert into success1 values(:empid,ab)).
    When i use the update stmt without where condition after the procedure also working fine (update success1 set empid1 = :empid).
    But when i use the where condition, update success1 set empid1 = ab where empid1=:empid its not working fine. Error is "Missing Parameter empid"
    Thanks in Advance,
    Ram Mohan T

  • Passing parameters into ODI procedure step which has an OS command

    Folks,
    I have an ODI procedure step which does a directory listing for a specific directory. The command I am using is
    cmd /C dir d:\local_dir /b > D:\dir_list.txt
    I have put on the 'Command on Target' tab. This works fine
    I want to remove the hardcoding for the directory references. I have tried the command
    cmd /C dir '#src_dir' /b > D:\dir_list.txt
    but when this executes it generates an ODI error 'Wrong process return code'
    any suggestions?

    I've figured it out. The issue was with using quotes in the value being passed into the variable. Once removed, it worked fine. Thanks for the assistance.
    Regards.
    Edited by: user810644 on 17-May-2010 01:59

  • How to assign a value to ODI Variable using ODI Procedure

    Hi ,
    Is it possible to assign a value to a ODI Variable using ODI Procedure ?
    If it is possible how we can do that.
    BEGIN
    IF #Counter=1
    Then
    #Next_Increment:=#Counter+1;
    End if;
    END;
    In my example I have 2 ODI Variables #counter and #Next_increment.
    I am trying to assign VALUE TO A ODI VARIABLE #next_increment from another ODI Variable #counter.
    thanks
    prasanna

    Prasanna,
    I have a similar requirement where I need to assign values to ODI variables within a procedure. How do we make use of an ODI package to accomplish this ?
    Actually, I have a sequence of ODI steps, and there is a call to a procedure 'LOG ERROR' from every step which gets called in case error occurs in any step. I just need to identify from which step the error came.
    Please help.

Maybe you are looking for

  • After upgrading to ios 5 I can not read mail on my iPad, am I the only one?

    After I have upgraded my iPad 2 to ios5 I get mail but can't read it. Is any anyone experiencing the same problem?

  • Newbie ? – QT slideshow for a consumer TV monitor?

    Hi. Tried a search but I'm unsure of terminology, also tried QT FAQ... I usually do design for web and print, but am bidding on a project that includes a single slideshow display on the client premises. Small scale, microscopic budget... passive (not

  • Enabling a Windows user to Only Run One Package

    I am completely new to SSIS. I made a package in SQL Server 2005. I need to import it to another SQL instance, also 2005. I think I can get that done. My question is, how can I set it up so that a different Windows user can execute this package and o

  • Help for nokia 6125

    hi if some one can tell me why i can't add my sms saved message from my pc to my mobile... i have update my nokia 6125 but before update i have saved my sms message copy from my phone and paste to pc but now i can't copy and paste to the phone some h

  • Error message in WebService

    Hi I get the message Cannot create instance of model class for model model class name 'GetUserBranchesMerhav' as this model class name does not exist in runtime metadata. Probably runtime WSDL and design-time WSDL 'http://biztalksrv01:2380/applinx/wr