Substring in ODI

Hi,
In my Oracle database I have Year in four digit format and i need to change it to FYXX format.
Column name in source is called ROK.
In my mapping (executed on staging table - sunopsis memory engine) I have:
'FY' || substr(XX_TKW_DANE_O_PROD.rok,3,2)
When executing interface I get following error:
org.apache.bsf.BSFException: exception from Jython:
Traceback (most recent call last):
File "<string>", line 30, in <module>
     at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
     at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
     at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source)
     at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
java.sql.SQLException: java.sql.SQLException: incompatible data type in operation
     at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
     at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
     at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
     at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
     at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
     at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
     at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
     at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
     at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
     at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
     at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
     at java.lang.Thread.run(Thread.java:722)
Caused by: Traceback (most recent call last):
File "<string>", line 30, in <module>
     at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
     at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
     at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source)
     at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
java.sql.SQLException: java.sql.SQLException: incompatible data type in operation
     at org.python.core.Py.JavaError(Py.java:455)
     at org.python.core.Py.JavaError(Py.java:448)
     at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:177)
     at org.python.core.PyObject.__call__(PyObject.java:355)
     at org.python.core.PyMethod.__call__(PyMethod.java:215)
     at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:221)
     at org.python.core.PyMethod.__call__(PyMethod.java:206)
     at org.python.core.PyObject.__call__(PyObject.java:397)
     at org.python.core.PyObject.__call__(PyObject.java:401)
     at org.python.pycode._pyx46.f$0(<string>:39)
     at org.python.pycode._pyx46.call_function(<string>)
     at org.python.core.PyTableCode.call(PyTableCode.java:165)
     at org.python.core.PyCode.call(PyCode.java:18)
     at org.python.core.Py.runCode(Py.java:1204)
     at org.python.core.Py.exec(Py.java:1248)
     at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
     at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
     ... 19 more
Caused by: java.sql.SQLException: incompatible data type in operation
     at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
     at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
     at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source)
     at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:175)
     ... 33 more
Caused by: org.hsqldb.HsqlException: incompatible data type in operation
     at org.hsqldb.error.Error.error(Unknown Source)
     at org.hsqldb.error.Error.error(Unknown Source)
     at org.hsqldb.FunctionSQL.resolveTypes(Unknown Source)
     at org.hsqldb.ExpressionArithmetic.resolveTypes(Unknown Source)
     at org.hsqldb.QuerySpecification.resolveExpressionTypes(Unknown Source)
     at org.hsqldb.QuerySpecification.resolveTypesPartOne(Unknown Source)
     at org.hsqldb.QuerySpecification.resolveTypes(Unknown Source)
     at org.hsqldb.QueryExpression.resolve(Unknown Source)
     at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)
     at org.hsqldb.ParserCommand.compilePart(Unknown Source)
     at org.hsqldb.ParserCommand.compileStatements(Unknown Source)
     at org.hsqldb.Session.executeDirectStatement(Unknown Source)
     at org.hsqldb.Session.execute(Unknown Source)
     ... 39 more
Can someone tell me what am I doing wrong?
Best regards,
Greg

Hi John,
I am just learning. You are right that it is easier to be done in oracle.
I have one more question.
I am loading data always to the same account: 'Ilość produkcji (j. podstawowa)'.
I can only map this on SME (source and target gives error). I have "Unicode in data" option in IKM set to true.
However it reject all my rows with:
Unknown Member [IloϾ produkcji (j. podstawowa)]
Do you know why this ban be happening?
Best regards,
Greg

Similar Messages

  • ODI Error while using substring function in odiref.getTable function

    Hi,
    I am trying to strip the interface table name in the IKM code.Below is the code
    create unique index      <%=odiRef.getTable("L","INT_NAME","W").substring(0,20)%>
    *on          <%=odiRef.getTable("L","INT_NAME","W")%>(<%=odiRef.getColList("", "[COL_NAME]", ", ", "", "UK")%>)*
    *<%=odiRef.getUserExit("FLOW_TABLE_OPTIONS")%>*
    But i get the below error, can some one please help ?
    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Error during task interpretation
    Task:8
    java.lang.Exception: BeanShell script error: Parse error at line 2, column 10. Encountered: ( BSF info: Create Unique Index on flow table at line: 0 column: columnNo
         at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:635)
         at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:671)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:441)
         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:662)
    Caused by: org.apache.bsf.BSFException: BeanShell script error: Parse error at line 2, column 10. Encountered: ( BSF info: Create Unique Index on flow table at line: 0 column: columnNo
         at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
         at bsh.util.BeanShellBSFEngine.exec(Unknown Source)
         at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:621)
         ... 11 more
    Text:create unique index      <?=snpRef.getObjectN
    on          <?=snpRef.getObjectName("L", "%INT_PRFL1_PROC_SHR_APRC_AMTZ_RQST", "W") ?>(WKFL_ACTV_ID)
    NOLOGGING
         at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:692)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:441)
         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:662)
    Thanks,
    Babu.

    Hi Ram,
    please check, if the note 1396300 is implemented in your system?
    If so,  check the table T777F.
    It should have the following entries:
    MANDT ISTAT INFTY  FCODE
    002   1     ****   AEND
    002   1     ****   COP
    002   1     ****   CUTI
    002   1     ****   DEL
    002   1     ****   DISP
    002   1     ****   INSE
    002   1     ****   LISD
    002   1     ****   PLVO
    In case these entries are missing, please do an adjustment with your 000-client.
    Hope this help
    Sarah

  • Getting a substring of an ODI Variable

    Hello Gurus
    I am trying to get a substring of an ODI variable so that I can load the substring into the target datastore eg:
    client_name = substr(#project.file_name,0,5).
    By the way this variable is a a dynamic file name
    Is this possible?
    Please help.
    Thanks

    Try putting single quote like below
    client_name = substr('#project.file_name',0,5)
    Thanks.

  • Assigning a Jython variable value to an ODI variable

    I have to implement database cursor functionality in ODI.
    For storing the returned values from database, I am using a Jython list.
    The next functionality that I have to implement is as follows:
    (i) For each value in the Jython list, I have to pass that value as a variable to an interface and then execute the interface
    (ii) Return back to the Jython list to get the next value in it
    (iii) Execute the interface for the new value from Jython list
    (iv) Have to execute the interface for as many values as in the list and stop when list is over.

    Hi,
    Thanks for your replies.
    I tried your method of using source as a query in procedure and using ODI startScen in the Target of the same procedure. But the scenario runs only once, and then stops even though the Source query returns 4 rows.
    Do we have to write Source and Target in separate steps of the procedure?
    Does ODI store the many records returned into some internal variables?
    I need to implement a cursor functionality so what is the best approach?
    Can i pass array variable value to some odi variables and do a loop?
    I used a workaround....it works but dont know if that's a good way of doing things:
    I retrieved all the different values that I need in a string by appending the values(this was done using Java loop).
    In my next step in the procedure I call a scenario(package which has some variables and my interface), which passes this long variable from Java as <@...@>
    Then in the package I use an iteration variable which is used to find out the SubString position so that I can extract the correct string to use for my Interface in the next step of the Package.
    It is working fine as of now.....but things could be made simpler if I could call the scenario in the Java loop, then I wouldn't need the iteration variable etc.

  • Help using oracle syntax "SUM(col1) over (order by col2)" using ODI

    Hi all
    I want to load data from oracle to ESSBASE using ODI, and I know oracle have such syntax sum(col1) over (order by col2,col3) which can get the accumulation data, e.g
    Oracle data table
    col1, col2, value
    A 2009-1 10
    A 2009-2 10
    A 2009-3 10
    And the essbase need
    col1 col2 value
    A 2009-1 10
    A 2009-2 20
    A 2009-3 30
    However after i try this in ODI, error occur:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 32, in ?
    java.sql.SQLException: ORA-00979: not a GROUP BY expression
    and the original generated SQl by ODI :
    select 'HSP_InputValue' "HSP_Rates",MAP_KMDZ_TABLE.BUD_DYKM "Account",MAP_MONTH.ESS_MONTH "Period",MAP_YEAR.ESS_YEAR "Year",'Actual' "Scenario",'Draft' "Version",TEMP_LIRUN.CURRENCY "Currency",MAP_COMPANYCODE.ESS_COMPCODE "Entity",substr(MAP_KMDZ_TABLE.BUD_BUSINESSOBJECT,1,80) "BusinessObject",'Route_NoRoute' "Route",MAP_TRANSPORT.ESS_TRANSPORT "Transport",substr(MAP_KMDZ_TABLE.BUD_BUSINESSACTIVITY,1,80) "BusinessActivity",substr(MAP_KMDZ_TABLE.BUD_CHANNEL,1,80) "Source",'NoCounterparty' "Counterparty",sum(TEMP_LIRUN.DATAVALUE) over (order by MAP_KMDZ_TABLE.BUD_DYKM,MAP_YEAR.ESS_YEAR,MAP_MONTH.ESS_MONTH,TEMP_LIRUN.CURRENCY,MAP_COMPANYCODE.ESS_COMPCODE,MAP_TRANSPORT.ESS_TRANSPORT,MAP_KMDZ_TABLE.BUD_BUSINESSACTIVITY,MAP_KMDZ_TABLE.BUD_BUSINESSOBJECT,MAP_KMDZ_TABLE.BUD_CHANNEL) "Data" from ETL_DEV.TEMP_LIRUN TEMP_LIRUN, ETL_DEV.MAP_KMDZ_TABLE MAP_KMDZ_TABLE, ETL_DEV.MAP_MONTH MAP_MONTH, ETL_DEV.MAP_YEAR MAP_YEAR, ETL_DEV.MAP_COMPANYCODE MAP_COMPANYCODE, ETL_DEV.MAP_TRANSPORT MAP_TRANSPORT where      (1=1) And (TEMP_LIRUN.COSTELMNT=MAP_KMDZ_TABLE.SAP_ZZKM)
    AND (TEMP_LIRUN.FISCYEAR=MAP_YEAR.SAP_YEAR)
    AND (TEMP_LIRUN.FISCPER3=MAP_MONTH.SAP_MONTH)
    AND (TEMP_LIRUN.COMP_CODE=MAP_COMPANYCODE.SAP_COMPCODE)
    AND (TEMP_LIRUN.WWHC=MAP_TRANSPORT.SAP_WWHC) Group By MAP_KMDZ_TABLE.BUD_DYKM,
    MAP_MONTH.ESS_MONTH,
    MAP_YEAR.ESS_YEAR,
    TEMP_LIRUN.CURRENCY,
    MAP_COMPANYCODE.ESS_COMPCODE,
    substr(MAP_KMDZ_TABLE.BUD_BUSINESSOBJECT,1,80),
    MAP_TRANSPORT.ESS_TRANSPORT,
    substr(MAP_KMDZ_TABLE.BUD_BUSINESSACTIVITY,1,80),
    substr(MAP_KMDZ_TABLE.BUD_CHANNEL,1,80)
    I know ODI think sum.. over must append group by , however it's not! How to solve this problem.
    Thank All for your attention
    SOS!
    Ethan

    Hi Ethan,
    In my exeprnc I faced a similar kind of situation.
    Two work arounds.
    1. Write one procedure and execute the same using ODI procedure.
    2. Customize a Km and use that KM in your interface.
    I guess in your query Group by function is not needed. (if this is the case you can achive this by a smple customization step in KM)
    for example : your current KM will generate a query like this:-
    select x,y, sum(x) over (order by y) as sumx FROM TestTable group by x, y
    and you need a query like this
    select x,y, sum(x) over (order by y) as sumx FROM TestTable
    go to your KM (duplicate the KM which you are using and rename _withoutGroup )
    remove the group by function from select query
    (remove the API function <%=snpRef.getGrpBy()%> from insert into i$ table step)
    please let me know if you need more help on this
    regards,
    Rathish

  • IllegalArgumentException  while executing a scenario in ODI

    Hi All,
    We are executing a scenario in ODI. This loads the data from source table to target table . During this execution, we are facing the issue in the insert step(Error msg given below):
    “java.lang.IllegalArgumentException: Bytes are too big for array”. The attachment shows the screenshot of the error.
    The code that is generated during execution is
    select     
         SUBSTR(SIF_AR_TL.REC_TYPE,1,1) RECORD_TYPE,
         TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))),' ') BUSINESS_UNIT,
         TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))),' ') BUSINESS_UNIT_FROM,
         RPAD(' ',5,' ') AFFILIATE,
         RPAD(' ',8,' ') C_REG_ACCT,
         RPAD(' ',10,' ') DEPTID,
         RPAD(' ',10,' ') DEPTID_FROM,
         RPAD(' ',6,' ') PRODUCT,
         RPAD(' ',8,' ') PROJECT_ID,
         RPAD(' ',5,' ') PROJECT_TYPE,
         RPAD(' ',8,' ') ACTIVITY_ID,
         RPAD(' ',5,' ') ACTIVITY_TYPE,
         RPAD(' ',4,' ') C_VINTAGE,
         RPAD(' ',1,' ') COST_TYPE,
         RPAD(' ',5,' ') COST_STUDY,
         '+'||RPAD('0',14,'0') SALETX_AMT,
         '+'||RPAD('0',14,'0') USETAX_AMT,
         TRIM(TO_CHAR(SIF_AR_TL.C_GL_LOC))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.C_GL_LOC))),' ') C_GL_LOC,
         TRIM(TO_CHAR(SIF_AR_TL.LEDGER))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.LEDGER))),' ') LEDGER,
         TRIM(TO_CHAR(SIF_AR_TL.LEDGER_GRP))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.LEDGER_GRP))),' ') LEDGER_GROUP,
         RPAD(' ',10,' ') JOURNAL_ID,
         RPAD(' ',10,' ') SAP_DOC_NUM,
         RPAD(' ',2,' ') UNPOST_SEQ_NUM,
         RPAD(' ',9,' ') FILLER,
         TRIM(TO_CHAR(SIF_AR_TL.CURRENCY_CD))||RPAD(' ',3-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.CURRENCY_CD))),' ') CURRENCY_CD,
         RPAD(' ',8,' ') FILLER1,
         RPAD(' ',1,' ') CONDITION_CODE,
         RPAD(' ',5,' ') C_ACCT_ISSUE,
         RPAD(' ',5,' ') RESOURCE_CATEGORY,
         RPAD(' ',4,' ') C_PC_ORIGIN_COP,
         RPAD(' ',10,' ') TREE_NODE_NUM,
         RPAD(' ',10,' ') TREE_NODE_NUM_FROM,
         RPAD(' ',10,' ') C_TAX_DISTRICT,
         TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))),' ') BUSINESS_UNIT_GL,
         TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))|| RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.BUS_UNIT_FROM))),' ') BUS_UNIT_GL_FROM,
         TRIM(TO_CHAR(SIF_AR_TL.C_GL_LOC))||RPAD(' ',5-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.C_GL_LOC))),' ') C_GL_LOC_ORIG,
         RPAD(' ',7,' ') FILLER2,
         TRIM(TO_CHAR(SIF_AR_TL.JOURNAL_SRC))||RPAD(' ',7-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.JOURNAL_SRC))),' ') JOURNAL_SOURCE,
         TRIM(TO_CHAR(SIF_AR_TL.C_LEGACY_SRC))||RPAD(' ',4-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.C_LEGACY_SRC))),' ') C_LEGACY_SRC,
         TRIM(TO_CHAR(SIF_AR_TL.TRAN_DATE))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.TRAN_DATE))),' ') TRAN_DATE,
         TRIM(TO_CHAR(SIF_AR_TL.REFERENCE_ID))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.REFERENCE_ID))),' ') REFERENCE_ID,
         'SAP' SYSTEM_SOURCE,
         RPAD(' ',10,' ') C_MIC,
         RPAD(' ',5,' ') FILLER3,
         RPAD(' ',6,' ') C_FUNC_CODE,
         RPAD(' ',1,' ') C_ENVIRONMENT,
         RPAD(' ',13,' ') VOUCHER_ID,
         RPAD(' ',6,' ') JFCI,
         RPAD(' ',10,' ') PO_ID,
         RPAD(' ',7,' ') C_ALLOC_CODE,
         TRIM(TO_CHAR(SIF_AR_TL.ACCOUNTING_DT))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.ACCOUNTING_DT))),' ') ACCOUNTING_DT,
         RPAD('0',3-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.ACCOUNTING_PRD))),'0')||TRIM(TO_CHAR(SIF_AR_TL.ACCOUNTING_PRD)) ACCOUNTING_PERIOD,
         RPAD(' ',5,' ') CATEGORY,
         TRIM(TO_CHAR(SIF_AR_TL.LOCATION))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.LOCATION))),' ') LOCATION,
         RPAD(' ',2,' ') C_KOW,
         RPAD(' ',12,' ') TAG_NUMBER,
         RPAD(' ',20,' ') B_EQP_SER,
         TRIM(TO_CHAR(SIF_AR_TL.FISCAL_YEAR))||RPAD(' ',4-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.FISCAL_YEAR))),' ') FISCAL_YEAR,
         RPAD(' ',1,' ') C_HIGHWAY_PRIVATE,
         RPAD(' 0',3,'0 ') EQUITY,
         RPAD(' ',1,' ') C_GEO_AREA,
         RPAD(' ',8,' ') OPRID,
         CASE WHEN CAST(SIF_AR_TL.HOURS AS NUMBER)>= 0 THEN '+'||RPAD('0',14-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.HOURS)),'.','')),'0')||TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.HOURS)),'.','') ELSE'-'||RPAD('0',15-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.HOURS)),'.','')),'0')||TRIM(SUBSTR(TRANSLATE(TO_CHAR(SIF_AR_TL.HOURS),'.',''),2,LENGTH(TRANSLATE(TO_CHAR(SIF_AR_TL.HOURS),'.',''))))
    END QUANTITY,
         '+'||RPAD('0',14,'0') HOURS,
         CASE WHEN SUBSTR(SIF_AR_TL.SAP_GL_ACCT,1,1) = '5' THEN
         'R'||RPAD(' ',5,' ')||
         TRIM(TO_CHAR(SIF_AR_TL.REVENUE_CATEGORY))||
              RPAD(' ',5-length(TRIM(TO_CHAR(SIF_AR_TL.REVENUE_CATEGORY))),' ')||
         RPAD(' ',19,' ')||
         TRIM(TO_CHAR(SIF_AR_TL.REVENUE_UNIT))||
              RPAD(' ',3-length(TRIM(TO_CHAR(SIF_AR_TL.REVENUE_UNIT))),' ')||
         TRIM(SIF_AR_TL.REVENUE_COMPONENT)||
              RPAD(' ',3-length(TRIM(TO_CHAR(SIF_AR_TL.REVENUE_COMPONENT))),' ')||
         RPAD(' ',5,' ')||
         TRIM(TO_CHAR(SIF_AR_TL.MARKET))||
              RPAD(' ',4-length(TRIM(TO_CHAR(SIF_AR_TL.MARKET))),' ')||
         RPAD(' ',13,' ')
    ELSE
         'F'||RPAD(' ',10,' ')||RPAD(' ',7,' ')||RPAD(' ',7,' ')||
         TRIM(TO_CHAR(SIF_AR_TL.SAP_ORG_OPRID))||
              RPAD(' ',7-length(TRIM(TO_CHAR(SIF_AR_TL.SAP_ORG_OPRID))),' ')||
         TRIM(TO_CHAR(SIF_AR_TL.SAP_HDR_DESC))||
              RPAD(' ',25-length(TRIM(TO_CHAR(SIF_AR_TL.SAP_HDR_DESC))),' ')||
         RPAD(' ',1,' ')
         END C_WORK_AREA,
         TRIM(TO_CHAR(SIF_AR_TL.FCC_ACCOUNT))||RPAD(' ',6-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.FCC_ACCOUNT))),' ') C_LEGACY_TYPE,
         RPAD(' ',1,' ') FCC_ACCOUNT,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_GL_ACCT))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_GL_ACCT))),' ') FILLER5,
         CASE
    WHEN SIF_AR_TL.VENDOR ='' THEN SIF_AR_TL.POSTING_KEY||TRIM(TO_CHAR(SIF_AR_TL.CUSTOMER))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.CUSTOMER))),' ')||RPAD(' ',6,' ')
    WHEN SIF_AR_TL.CUSTOMER ='' THEN SIF_AR_TL.POSTING_KEY||TRIM(TO_CHAR(SIF_AR_TL.VENDOR))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.VENDOR))),' ')||RPAD(' ',6,' ')
    WHEN (SIF_AR_TL.VENDOR ='' AND SIF_AR_TL.CUSTOMER = '') THEN SIF_AR_TL.POSTING_KEY||RPAD(' ',16,' ') END SAP_GL_ACCOUNT,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_CMPNY_CD))||RPAD(' ',4-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_CMPNY_CD))),' ') SAP_ALLOCATION_NBR,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_COST_CNTR))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_COST_CNTR))),' ') SAP_COMPANY_CODE,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_COST_CNTR))||RPAD(' ',10-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_COST_CNTR))),' ') SAP_COST_CENTER,
         SIF_AR_TL.SAP_JURISDICTION SAP_JURISDICTION,
         RPAD(' ',10,' ') MATERIAL_ID,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_TRD_PARTNER))||RPAD(' ',6-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_TRD_PARTNER))),' ') SAP_TRADING_PARTNER,
         RPAD(' ',9,' ') LEG_VENDOR_CODE,
         TRIM(TO_CHAR(SIF_AR_TL.SAP_WBS))||RPAD(' ',24-LENGTH(TRIM(TO_CHAR(SIF_AR_TL.SAP_WBS))),' ') SAP_WBS,
         RPAD(' ',3,' ') LABOR_GROUP,
         RPAD(' ',7,' ') WORK_ORDER_NBR,
         RPAD(' ',3,' ') LEG_TRANS_TYPE,
         RPAD(' ',4,' ') SAP_COMPANY_CODE_CHRG,
         RPAD(' ',2,' ') MATERIAL_TYPE,
         RPAD(' ',6,' ') FILLER6,
         CASE WHEN SIF_AR_TL.TRAN_TOT_AMT>= 0 THEN '+'||RPAD('0',14-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT)),'.','')),'0')||TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT)),'.','') ELSE'-'||RPAD('0',15-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT)),'.','')),'0')||TRIM(SUBSTR(TRANSLATE(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT),'.',''),2,LENGTH(TRANSLATE(TO_CHAR(SIF_AR_TL.TRAN_TOT_AMT),'.',''))))
    END TRANS_TOT_AMOUNT,
         '01' EXTC_RESRC_OCCURS,
         RPAD(' ',5,' ') EXTC_CD_1,
         RPAD(' ',5,' ') RESOURCE_TYPE_1,
         RPAD(' ',8,' ') ACCOUNT_1,
         CASE WHEN SIF_AR_TL.AMOUNT_1>= 0 THEN '+'||RPAD('0',14-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.AMOUNT_1)),'.','')),'0')||RPAD(TRIM(TO_CHAR(SIF_AR_TL.AMOUNT_1)),'.','') ELSE'-'||RPAD('0',15-LENGTH(TRANSLATE(TRIM(TO_CHAR(SIF_AR_TL.AMOUNT_1)),'.','')))||TRIM(SUBSTR(TRANSLATE(TO_CHAR(SIF_AR_TL.AMOUNT_1),'.',''),2,LENGTH(TRANSLATE(TO_CHAR(SIF_AR_TL.AMOUNT_1),'.',''))))
    END AMOUNT_1,
         RPAD(' ',5,' ') EXTC_CD_2,
         RPAD(' ',5,' ') RESOURCE_TYPE_2,
         RPAD(' ',8,' ') ACCOUNT_2,
         RPAD(' ',15,' ') AMOUNT_2,
         RPAD(' ',5,' ') EXTC_CD_3,
         RPAD(' ',5,' ') RESOURCE_TYPE_3,
         RPAD(' ',8,' ') ACCOUNT_3,
         RPAD(' ',15,' ') AMOUNT_3,
         RPAD(' ',5,' ') EXTC_CD_4,
         RPAD(' ',5,' ') RESOURCE_TYPE_4,
         RPAD(' ',8,' ') ACCOUNT_4,
         RPAD(' ',15,' ') AMOUNT_4,
         RPAD(' ',5,' ') EXTC_CD_5,
         RPAD(' ',5,' ') RESOURCE_TYPE_5,
         RPAD(' ',8,' ') ACCOUNT_5,
         RPAD(' ',15,' ') AMOUNT_5,
         RPAD(' ',5,' ') EXTC_CD_6,
         RPAD(' ',5,' ') RESOURCE_TYPE_6,
         RPAD(' ',8,' ') ACCOUNT_6,
         RPAD(' ',15,' ') AMOUNT_6,
         RPAD(' ',5,' ') EXTC_CD_7,
         RPAD(' ',5,' ') RESOURCE_TYPE_7,
         RPAD(' ',8,' ') ACCOUNT_7,
         RPAD(' ',15,' ') AMOUNT_7,
         RPAD(' ',5,' ') EXTC_CD_8,
         RPAD(' ',5,' ') RESOURCE_TYPE_8,
         RPAD(' ',8,' ') ACCOUNT_8,
         RPAD(' ',15,' ') AMOUNT_8,
         RPAD(' ',5,' ') EXTC_CD_9,
         RPAD(' ',5,' ') RESOURCE_TYPE_9,
         RPAD(' ',8,' ') ACCOUNT_9,
         RPAD(' ',15,' ') AMOUNT_9,
         RPAD(' ',5,' ') EXTC_CD_10,
         RPAD(' ',5,' ') RESOURCE_TYPE_10,
         RPAD(' ',8,' ') ACCOUNT_10,
         RPAD(' ',15,' ') AMOUNT_10,
         RPAD(' ',5,' ') EXTC_CD_11,
         RPAD(' ',5,' ') RESOURCE_TYPE_11,
         RPAD(' ',8,' ') ACCOUNT_11,
         RPAD(' ',15,' ') AMOUNT_11,
         RPAD(' ',5,' ') EXTC_CD_12,
         RPAD(' ',5,' ') RESOURCE_TYPE_12,
         RPAD(' ',8,' ') ACCOUNT_12,
         RPAD(' ',15,' ') AMOUNT_12,
         RPAD(' ',5,' ') EXTC_CD_13,
         RPAD(' ',5,' ') RESOURCE_TYPE_13,
         RPAD(' ',8,' ') ACCOUNT_13,
         RPAD(' ',15,' ') AMOUNT_13,
         RPAD(' ',5,' ') EXTC_CD_14,
         RPAD(' ',5,' ') RESOURCE_TYPE_14,
         RPAD(' ',8,' ') ACCOUNT_14,
         RPAD(' ',15,' ') AMOUNT_14,
         RPAD(' ',5,' ') EXTC_CD_15,
         RPAD(' ',5,' ') RESOURCE_TYPE_15,
         RPAD(' ',8,' ') ACCOUNT_15,
         RPAD(' ',15,' ') AMOUNT_15,
         RPAD(' ',5,' ') EXTC_CD_16,
         RPAD(' ',5,' ') RESOURCE_TYPE_16,
         RPAD(' ',8,' ') ACCOUNT_16,
         RPAD(' ',15,' ') AMOUNT_16,
         RPAD(' ',5,' ') EXTC_CD_17,
         RPAD(' ',5,' ') RESOURCE_TYPE_17,
         RPAD(' ',8,' ') ACCOUNT_17,
         RPAD(' ',15,' ') AMOUNT_17,
         RPAD(' ',5,' ') EXTC_CD_18,
         RPAD(' ',5,' ') RESOURCE_TYPE_18,
         RPAD(' ',8,' ') ACCOUNT_18,
         RPAD(' ',15,' ') AMOUNT_18,
         RPAD(' ',5,' ') EXTC_CD_19,
         RPAD(' ',5,' ') RESOURCE_TYPE_19,
         RPAD(' ',8,' ') ACCOUNT_19,
         RPAD(' ',15,' ') AMOUNT_19,
         RPAD(' ',5,' ') EXTC_CD_20,
         RPAD(' ',5,' ') RESOURCE_TYPE_20,
         RPAD(' ',5,' ') ACCOUNT_20,
         RPAD(' ',8,' ') AMOUNT_20,
         RPAD(' ',15,' ') EXTC_CD_21,
         RPAD(' ',5,' ') RESOURCE_TYPE_21,
         RPAD(' ',5,' ') ACCOUNT_21,
         RPAD(' ',8,' ') AMOUNT_21,
         RPAD(' ',15,' ') EXTC_CD_22,
         RPAD(' ',5,' ') RESOURCE_TYPE_22,
         RPAD(' ',8,' ') ACCOUNT_22,
         RPAD(' ',15,' ') AMOUNT_22,
         TO_NUMBER(SIF_AR_TL.HDR_ID_OUT) REC_GRP
    from     FSDV1ODI.PS_O_FS_SIF_AR_TL SIF_AR_TL LEFT OUTER JOIN FSDV1ODI.PS_O_FS_SIF_AR_HDR PS_O_FS_SIF_AR_HDR ON PS_O_FS_SIF_AR_HDR.HDR_ID=SIF_AR_TL.HDR_ID_OUT
    where      (1=1)
    If anybody has faced the above issue, kindly revert back on the same.
    Thanking in Advance.
    Regards,
    Raghav

    i hope you have resolved the question.
    However there is the note on metalink
    "Bytes are too big for array" Error When Inserting Data To A File In ODI [ID 554792.1]
    in which you can read
    Solution
    Run the select SQL startement that extracts data directly on the database and examine the data returned to make sure the data is valid and correct.
    Check source and target Datastores in both environments to make sure the columns' size and datatype are the same and the target File Datastore's columns size are big enough for the source data.
    In Topology, check the File JDBC Driver name and URL in both environments to make sure driver used is the same and the driver property ENCODING is set to the correct value if it is used. The default encoding value is ISO8859_1 which might not be appropriate if the source data is stored in
    a UTF8 database.
    Check the Locale values and Encodings used on the different servers.
    For example, for Oracle, check the NLS_CHARACTERSET setting in both environments. Take a look at Note 453080.1 for an example on the Locale.
    Finally, the ODI File Driver has the following property that can be used to truncate the long data to fit the fields size of the File Datastore if needed:
    TRUNC_FIXED_STRINGS=TRUE|FALSE: Truncates the strings from the fixed files to the field size. Default value is FALSE.
    TRUNC_DEL_STRINGS=TRUE|FALSE: Truncates the strings from the delimited files to the field size. Default value is FALSE.
    For example, if your target file is delimited, you can try:
    jdbc:snps:dbfile&TRUNC_DEL_STRINGS=TRUE
    Basically you are mapping a source column longer than tarhet.
    DecaXD

  • Assigning long text values to ODI variable

    Hi all,
    I want to store the error message of the previous step in a variable: _<%=odiRef.getPrevStepLog("MESSAGE")%>_ (using ODI 10.1.3.5 on Oracle 9i).
    If I refresh the variable using a statement like Select '<%=odiRef.getPrevStepLog("MESSAGE")%>' From dual , it errors out if the message has more than 4K characters.
    I tried to use _<%=odiRef.getPrevStepLog("MESSAGE").substring(0,3999)%>_ , but this creates an indexoutofbounds exception if the message has less than 4K characters.
    I tried to use assign instead of refresh, but it only prints the jython code instead of retrieving the variable. How can I assign the message to a variable?
    Thanks,
    Matt

    Cezar,
    Here's the operator information. Oracle DB version is 10g EE, Rel. 10.2.0.4.0 - 64bit
    Operator - Description
    select substr('org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 23, in ?
    com.hyperion.odi.essbase.ODIEssbaseException: Cannot build dimension. Analytic Server Error(1090004): Unable To Open File [hypxx/product/essbase/AnalyticServices/app/xxx_PL/xxx_PL/ActCalce.rul]
         at com.hyperion.odi.essbase.ODIEssbaseMetaWriter.loadData(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
         at org.python.core.PyMethod.__call__(PyMethod.java)
         at org.python.core.PyObject.__call__(PyObject.java)
         at org.python.core.PyInstance.invoke(PyInstance.java)
         at org.python.pycode._pyx9.f$0(<string>:23)
         at org.python.pycode._pyx9.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java)
         at org.python.core.PyCode.call(PyCode.java)
         at org.python.core.Py.runCode(Py.java)
         at org.python.core.Py.exec(Py.java)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.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.DwgCommandSession.treatCommand(DwgCommandSession.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)
    Caused by: com.essbase.api.base.EssException: Cannot build dimension. Analytic Server Error(1090004): Unable To Open File [hypxx/product/essbase/AnalyticServices/app/xxx_PL/xxx_PL/ActCalce.rul]
         at com.essbase.server.framework.EssOrbPluginDirect.ex_olap(Unknown Source)
         at com.essbase.server.framework.EssOrbPluginDirect.essMainBuildDimension(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMainMethod(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMethod2(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin._invokeMethod(Unknown Source)
         at com.essbase.server.framework.EssOrbPluginDirect._invokeProtected(Unknown Source)
         at com.essbase.api.session.EssOrbPluginEmbedded.invokeMethod(Unknown Source)
         at com.essbase.api.session.EssOrbPluginEmbedded.invokeMethod(Unknown Source)
         at com.essbase.api.session.EssOrbPlugin.essMainBuildDimension(Unknown Source)
         at com.essbase.api.datasource.EssCube.buildDimension(Unknown Source)
         at com.hyperion.odi.essbase.wrapper.EssbaseApplication.buildDimension(Unknown Source)
         ... 32 more
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Cannot build dimension. Analytic Server Error(1090004): Unable To Open File [hypxx/product/essbase/AnalyticServices/app/xxx_PL/xxx_PL/ActCalce.rul]
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.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.DwgCommandSession.treatCommand(DwgCommandSession.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)
    ', 1, 4000) from dual
    Operator - Execution:
    1704 : 42000 : java.sql.SQLException: ORA-01704: string literal too long
    java.sql.SQLException: ORA-01704: string literal too long
         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_describe(T4CPreparedStatement.java:503)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.execStdOrders(SnpSessTaskSqlV.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTaskTrt(SnpSessTaskSqlV.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTask(SnpSessTaskSqlV.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.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-17517: Error during task interpretation. Task: 6 java.lang.Exception

    Hi,
    Can some one provide a resolution for below error:
    I have created an interface which load data from csv file which has 320 columns, to a Synonym which has 320 columns in it
    using LKM File to SQL, IKM Sql Control Append.
    I am getting below error when executing the interface :
    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: Error during task interpretation. Task: 6 java.lang.Exception: BeanShell script error: Sourced file: inline evaluation of: ``out.print("The application script threw an exception: java.lang.StringIndexOutOf . . . '' Token Parsing Error: Lexical error at line 2, column 42. Encountered: "
    " (92), after : "": <at unknown location> BSF info: Create external table at line: 0 column: columnNo
    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:485)
    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:711)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:461)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: ``out.print("The application script threw an exception: java.lang.StringIndexOutOf . . . '' Token Parsing Error: Lexical error at line 2, column 42. Encountered: "
    " (92), after : "": <at unknown location>
    BSF info: Create external table at line: 0 column: columnNo
    at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
    at bsh.util.BeanShellBSFEngine.exec(Unknown Source)
    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:471)
    ... 11 more
    Text: The application script threw an exception: java.lang.StringIndexOutOfBoundsException: String index out of range: 2 BSF info: Create external table at line: 0 column: columnNo
    out.print("createTblCmd = r\"\"\"\ncreate table ") ;
    out.print(odiRef.getTable("L", "COLL_NAME", "W")) ;
    out.print("<?=(extTabColFormat.getUseView())?\"_ET\":\"\"?>\n(\n\t") ;
    out.print(odiRef.getColList("", "[CX_COL_NAME]
    t"+
    "<?=extTabColFormat.getExtTabDataType(\\u0022[CX_COL_NAME]\\u0022,\\u0022[SOURCE_DT]
    u0022, \\u0022[DEST_WRI_DT]
    u0022, \\u0022[COL_FORMAT]
    u0022, \\u0022[BYTES]
    u0022, \\u0022[LONGC]
    u0022, \\u0022[SCALE]
    u0022)?>"
    , ",\\n
    t", "","")) ;
    out.print("\n)\nORGANIZATION EXTERNAL\n(\n\tTYPE ORACLE_LOADER\n\tDEFAULT DIRECTORY dat_dir\n\tACCESS PARAMETERS\n\t(\n\t\tRECORDS DELIMITED BY 0x'") ;
    out.print(odiRef.getSrcTablesList("[XFILE_SEP_ROW]","")) ;
    out.print("'\n\t\t") ;
    out.print(odiRef.getUserExit("EXT_CHARACTERSET")) ;
    out.print("\n\t\t") ;
    out.print(odiRef.getUserExit("EXT_STRING_SIZE")) ;
    out.print("\n\t\tBADFILE\t\t'") ;
    out.print(odiRef.getSrcTablesList("", "[RES_NAME]", "", "")) ;
    out.print("_%a.bad'\n\t\tLOGFILE\t\t'") ;
    out.print(odiRef.getSrcTablesList("", "[RES_NAME]", "", "")) ;
    out.print("_%a.log'\n\t\tDISCARDFILE\t'") ;
    out.print(odiRef.getSrcTablesList("", "[RES_NAME]", "", "")) ;
    out.print("_%a.dsc'\n\t\tSKIP \t\t") ;
    out.print(odiRef.getSrcTablesList("", "[FILE_FIRST_ROW]", "", "")) ;
    out.print("\n") ;
    if (odiRef.getSrcTablesList("", "[FILE_FORMAT]", "", "").equals("F")) {out.print("\n\t\tFIELDS\n\t\t") ;
    out.print(odiRef.getUserExit("EXT_MISSING_FIELD")) ;
    out.print("\n\t\t(\n\t\t\t") ;
    out.print(odiRef.getColList("", "[CX_COL_NAME]\\tPOSITION([FILE_POS]:[FILE_END_POS])
    t"+
    "<?=extTabColFormat.getExtTabFormat(\\u0022[CX_COL_NAME]\\u0022,\\u0022[SOURCE_DT]
    u0022, \\u0022DEST_WRI_DT
    u0022, \\u0022[COL_FORMAT]
    u0022, \\u0022[BYTES]
    u0022, \\u0022[LONGC]
    u0022, \\u0022[SCALE]
    u0022)?>"
    , ",\\n\\t\\t
    t", "","")) ;
    out.print("\t\t\n\t\t)\n\t)\n") ;
    } else {out.print("\n\t\tFIELDS TERMINATED BY x'") ;
    out.print(odiRef.getSrcTablesList("", "[XFILE_SEP_FIELD]", "", "")) ;
    out.print("'\n\t\t") ;
    if(odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").equals("")){out.print("\n\t\t") ;
    } else {out.print("OPTIONALLY ENCLOSED BY '") ;
    out.print(odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").substring(0,1)) ;
    out.print("' AND '") ;
    out.print(odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").substring(1,2)) ;
    out.print("' ") ;
    }out.print("\n\t\t") ;
    out.print(odiRef.getUserExit("EXT_MISSING_FIELD")) ;
    out.print("\n\t\t(\n\t\t\t") ;
    out.print(odiRef.getColList("", "[CX_COL_NAME]
    t"+
    "<?=extTabColFormat.getExtTabFormat(\\u0022[CX_COL_NAME]\\u0022,\\u0022[SOURCE_DT]
    u0022, \\u0022DEST_WRI_DT
    u0022, \\u0022[COL_FORMAT]
    u0022, \\u0022[BYTES]
    u0022, \\u0022[LONGC]
    u0022, \\u0022[SCALE]
    u0022)?>"
    , ",\\n\\t\\t
    t", "","")) ;
    out.print("\t\t\n\t\t)\n\t)\n") ;
    }out.print("\tLOCATION (") ;
    out.print(odiRef.getSrcTablesList("", "'[RES_NAME]'", "", "")) ;
    out.print(")\n)\n") ;
    out.print(odiRef.getUserExit("EXT_PARALLEL")) ;
    out.print("\nREJECT LIMIT ") ;
    out.print(odiRef.getUserExit("EXT_REJECT_LIMIT")) ;
    out.print("\n\"\"\"\n \n# Create the statement\nmyStmt = myCon.createStatement()\n \n# Execute the trigger creation\nmyStmt.execute(createTblCmd)\n \nmyStmt.close()\nmyStmt = None\n \n# Commit, just in case\nmyCon.commit()") ;
    ****** ORIGINAL TEXT ******
    createTblCmd = r"""
    create table <%=odiRef.getTable("L", "COLL_NAME", "W")%><?=(extTabColFormat.getUseView())?"_ET":""?>
    <%=odiRef.getColList("", "[CX_COL_NAME]\t"+
    "<?=extTabColFormat.getExtTabDataType(\u0022[CX_COL_NAME]\u0022,\u0022[SOURCE_DT]\u0022, \u0022[DEST_WRI_DT]\u0022, \u0022[COL_FORMAT]\u0022, \u0022[BYTES]\u0022, \u0022[LONGC]\u0022, \u0022[SCALE]\u0022)?>"
    , ",\n\t", "","")%>
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY dat_dir
    ACCESS PARAMETERS
    RECORDS DELIMITED BY 0x'<%=odiRef.getSrcTablesList("[XFILE_SEP_ROW]","")%>'
    <%=odiRef.getUserExit("EXT_CHARACTERSET")%>
    <%=odiRef.getUserExit("EXT_STRING_SIZE")%>
    BADFILE '<%=odiRef.getSrcTablesList("", "[RES_NAME]", "", "")%>_%a.bad'
    LOGFILE '<%=odiRef.getSrcTablesList("", "[RES_NAME]", "", "")%>_%a.log'
    DISCARDFILE '<%=odiRef.getSrcTablesList("", "[RES_NAME]", "", "")%>_%a.dsc'
    SKIP <%=odiRef.getSrcTablesList("", "[FILE_FIRST_ROW]", "", "")%>
    <% if (odiRef.getSrcTablesList("", "[FILE_FORMAT]", "", "").equals("F")) {%>
    FIELDS
    <%=odiRef.getUserExit("EXT_MISSING_FIELD")%>
    <%=odiRef.getColList("", "[CX_COL_NAME]\tPOSITION([FILE_POS]:[FILE_END_POS])\t"+
    "<?=extTabColFormat.getExtTabFormat(\u0022[CX_COL_NAME]\u0022,\u0022[SOURCE_DT]\u0022, \u0022DEST_WRI_DT\u0022, \u0022[COL_FORMAT]\u0022, \u0022[BYTES]\u0022, \u0022[LONGC]\u0022, \u0022[SCALE]\u0022)?>"
    , ",\n\t\t\t", "","")%>
    <%} else {%>
    FIELDS TERMINATED BY x'<%=odiRef.getSrcTablesList("", "[XFILE_SEP_FIELD]", "", "")%>'
    <% if(odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").equals("")){%>
    <%} else {%>OPTIONALLY ENCLOSED BY '<%=odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").substring(0,1)%>' AND '<%=odiRef.getSrcTablesList("", "[FILE_ENC_FIELD]", "", "").substring(1,2)%>' <%}%>
    <%=odiRef.getUserExit("EXT_MISSING_FIELD")%>
    <%=odiRef.getColList("", "[CX_COL_NAME]\t"+
    "<?=extTabColFormat.getExtTabFormat(\u0022[CX_COL_NAME]\u0022,\u0022[SOURCE_DT]\u0022, \u0022DEST_WRI_DT\u0022, \u0022[COL_FORMAT]\u0022, \u0022[BYTES]\u0022, \u0022[LONGC]\u0022, \u0022[SCALE]\u0022)?>"
    , ",\n\t\t\t", "","")%>
    <%}%> LOCATION (<%=odiRef.getSrcTablesList("", "'[RES_NAME]'", "", "")%>)
    <%=odiRef.getUserExit("EXT_PARALLEL")%>
    REJECT LIMIT <%=odiRef.getUserExit("EXT_REJECT_LIMIT")%>
    # Create the statement
    myStmt = myCon.createStatement()
    # Execute the trigger creation
    myStmt.execute(createTblCmd)
    myStmt.close()
    myStmt = None
    # Commit, just in case
    myCon.commit().
    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:738)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:461)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)

    Hi
    I saw your issue and found one think that "String index out of range", can you please compare the columns datatype and column size with target table and ODI table.
    ODI Table:
    After Reverse Engine, CSV changed into table format can you please open the table from designer>model>csv table and goto columns tab, it will list out the all column name datatype and size. compare the column size and type with your target table.
    hope this will resolve your issue.
    Regards,
    Phanikanth

  • Error message in ODI

    Hi,
    I am trying to insert error messsage in to the table using a procedure.
    To get the error, i am using API: odiRef.getPrevStepLog("MESSAGE") after the interface that raise the error, in a "KO" red line.
    But,Message will be very huge and it is not necessary for me. I just need to capture one line error information which starts next to ORA-ID. Please help in achiving this...
    Regards
    Pavan
    Edited by: user753041 on Oct 16, 2010 2:54 AM

    If your planning to use the variable then yes the package have to be something like this.
    Interface and other odi objects
    |
    |
    KO
    |
    (e_msg) REFRESH MODE ----- OK ---> ERROR_tab procedure
    Also you would need to call this after each ODI object
    (or)
    change the procedure to call the substr directly by declaring in a oracle variable and calling that in the insert statement.
    Have you looked at the Work repository table SNP_SESSION, SNP_SCEN , SNP_STEP_REPORT , SNP_EXP_TXT , it pretty much maintains all the information you are looking and simple combination can fetch you the required result.
    Hope that help.

  • Call oracle function in ODI

    I am new to ODI. I need to call a function created on the database which return a value. In ODI I created a variable. In the select (of the variable) I don't know how to call the source table value that needs to be passed to the function.
    My oracle function:
    create or replace function return_timeid(trans_date in date)
    return number is
    Result number;
    v_trans_date varchar2(30) := to_char(trans_date, 'dd-mon-rrrr hh24miss');
    v_hour number := 0;
    v_min number := 0;
    begin
    v_hour := substr(v_trans_date, 13, 2);
    v_min := substr(v_trans_date, 15, 2);
    case
    when v_min between 1 and 30 then
    result := (v_hour * 100) + 30;
    when v_min = 0 then
    result := v_hour * 100;
    when v_min > 30 then
    result := (v_hour + 1) * 100;
    end case;
    -- convert 2400 to 0000
    if result = 2400 then
    result := 0;
    elsif result = 2430 then
    result := 30;
    end if;
    return result;
    end return_timeid;
    The result will be a time ID, depending on the source record value in the source table. How do I keep the time ID in the variable that I created.
    This is the select in my variable (Time_ID):
    SELECT BIUSER.return_timeid(GPRS_HOME_CDRS.CALL_DATE_DT) FROM dual
    this is my error:
    904 : 42000 : java.sql.SQLException: ORA-00904: "GPRS_HOME_CDRS"."CALL_DATE_DT": invalid identifier
    Regards

    I tried to call the function in the mapping. My code:
    biuser.return_timeid(GPRS_HOME_CDRS.CALL_DATE_DT)
    but then I get the ORA-00936 (missing expression)
    My code generated in the operator when loading the flow table:
    insert /*+ APPEND */ into BIUSER.I$_FACT_ABIL_GPRS_T
         DIMDATASOURCEID,
         DIMDATARECORDTYPEID,
         DIMDATEID,
         DIMTIMEID,
         DIMAPNID_IC,
         DIMIMSIID,
         DIMCALLLOCATIONID,
         DIMCAUSERECCLOSEID,
         CALLDURATION,
         UPLINK_DATAVOLUME,
         DOWNLINK_DATAVOLUME,
         CALL_CHARGE,
         DIMRATEPLANID,
         TRANS_DATE,
         DIMPEAKID,
         DIMTARIFFCODEID,
         DIMCHARGEID,
         MOBL_NUM,
         ACC_LINK_CODE,
         CHARGED_UNITS,
         CHARGED_DURATION,
         CHARGED_VOLUME,
         DISCOUNTED_VALUE,
         DISCOUNTED_AMOUNT,
         FACT_PROCESS_DATE,
         CHRONO_NUM,
         ORIGINATE_CELL_ID,
         STAGE_PROCESS_DATE,
         IND_UPDATE
    select      
         case
    When length(rtrim(C19_QOS_USED_1_V)) = 7 then 1
    else 2
    end case,
         DIM_DATA_RECORD_TYPE.DIMDATARECORDTYPEID,
         DIM_DATE.DIMDATEID,
         biuser.return_timeid(C12_CALL_DATE_DT),     DIM_APN.DIMAPNID,
         to_number(DIM_IMSI_MSISDN.DIMIMSIMSISDNID),
         to_number(DIM_CALL_LOCATION.DIMCALLLOCATIONID),
         to_number(DIM_TERM_CAUSE.DIMTERMCAUSEID),
         C5_CALL_DURATION_N,
         .DATA_VOLUME_OUTGOING_1_N,
         C17_DATA_VOLUME_INCOMING_1_N,
         C1_CALL_CHARGE,
         DIM_RATEPLAN.DIMRATEPLANID,
         C12_CALL_DATE_DT,
         to_number(DIM_RATEPLAN.DIMRATEPLANID),
         DIM_TARIFF.DIMTARIFFID,
         to_number(DIM_CALLCHARGE_TYPE_TB.DIMCALLCHARGETYPEID),
         C2_MOBL_NUM,
         C21_ACCOUNT_LINK_CODE_N,
         C10_CHARGED_UNITS_N,
         C9_CHARGED_DURATION_N,
         C8_CHARGED_VOLUME_N,
         C16_DISCOUNTED_VALUE_N,
         round(C15_DISCOUNTED_AMOUNT_N/1000,4),
         SYSDATE,
         C13_CHRONO_NUM_N,
         C6_ORGINATE_CELL_ID_V,
         C3_STAGE_PROCESS_DATE,
         'I' IND_UPDATE
    from     BIUSER.DIM_DATA_RECORD_TYPE DIM_DATA_RECORD_TYPE, BIUSER.DIM_DATE DIM_DATE, BIUSER.DIM_CALL_LOCATION DIM_CALL_LOCATION, BIUSER.DIM_APN DIM_APN, BIUSER.DIM_IMSI_MSISDN DIM_IMSI_MSISDN, BIUSER.DIM_TERM_CAUSE DIM_TERM_CAUSE, BIUSER.DIM_CALLCHARGE_TYPE_TB DIM_CALLCHARGE_TYPE_TB, BIUSER.DIM_TARIFF DIM_TARIFF, BIUSER.DIM_RATEPLAN DIM_RATEPLAN, BIUSER.C$_0FACT_ABIL_GPRS_T
    where     (1=1)
    And (nvl(to_number(C14_SWITCH_CALL_TYPE_V),99999)=DIM_DATA_RECORD_TYPE.RECORD_TYPE)
    AND (to_number(to_char(C12_CALL_DATE_DT,'RRRRMMDD'))=DIM_DATE.DIMDATEID)
    AND (nvl(C11_MOBL_ORIGINATE_ZONE_CODE_V,'Undefined')=DIM_CALL_LOCATION.COUNTRY)
    AND (nvl(C4_ACCESS_POINT_NAME_V,'Undefined')=DIM_APN.APN)
    AND (nvl(C23_IMSI_NUM_N,99999999999)=DIM_IMSI_MSISDN.IMSI_NR)
    AND (nvl(C20_CALL_TERMINATION_CAUSE_V,'XX')=DIM_TERM_CAUSE.TERMCAUSE)
    AND (nvl(C18_CALL_CHRG_TYPE_V,'9')=DIM_CALLCHARGE_TYPE_TB.CALL_CHARGE_TYPE)
    AND (nvl(C7_TARIFF_CODE_V,'999999')=DIM_TARIFF.TARIFF_CODE)
    AND (nvl(C22_RATE_PLAN_CODE_N,99999)=DIM_RATEPLAN.RATEPLAN_CODE and
    nvl(C7_TARIFF_CODE_V,'999999')=DIM_RATEPLAN.TARIFF_CODE)
    minus
    select
         DIMDATASOURCEID,
         DIMDATARECORDTYPEID,
         DIMDATEID,
         DIMTIMEID,
         DIMAPNID_IC,
         DIMIMSIID,
         DIMCALLLOCATIONID,
         DIMCAUSERECCLOSEID,
         CALLDURATION,
         UPLINK_DATAVOLUME,
         DOWNLINK_DATAVOLUME,
         CALL_CHARGE,
         DIMRATEPLANID,
         TRANS_DATE,
         DIMPEAKID,
         DIMTARIFFCODEID,
         DIMCHARGEID,
         MOBL_NUM,
         ACC_LINK_CODE,
         CHARGED_UNITS,
         CHARGED_DURATION,
         CHARGED_VOLUME,
         DISCOUNTED_VALUE,
         DISCOUNTED_AMOUNT,
         FACT_PROCESS_DATE,
         CHRONO_NUM,
         ORIGINATE_CELL_ID,
         STAGE_PROCESS_DATE,
         'I'     IND_UPDATE
    from     BIUSER.FACT_ABIL_GPRS_T

  • Java BeanShell expression in ODI

    hi experts,
    i am working on ODI 11 g (11.1.1)
    i have found java beanshell expression in standard ODI KM (IKM "IKM Oracle Slowly Changing Dimension", step 192 "Analyze integration table"):
    <%=odiRef.getTable("L","INT_NAME","A").replaceAll("","").replaceAll("..>",".replaceAll(odiRef.getInfo( \\u0022DEST_WORK_SCHEMA\\u0022 )+\\u0022.\\u0022,\\u0022\\u0022)?>")%>
    It translates, for example, "DWH_ETL.I$_SC_INTERMEDIARY" to "I$_SC_INTERMEDIARY"
    Please explain in detail how it works?
    specifically, i don't understand how works the expression:
    replaceAll("..>",".replaceAll(odiRef.getInfo( \\u0022DEST_WORK_SCHEMA\\u0022 )+\\u0022.\\u0022,\\u0022\\u0022)?>")
    Java function "replaceAll" (http://download.oracle.com/javase/6/docs/api/):
    public String replaceAll(String regex,
    String replacement)
    replaces each substring of this string that matches the given regular expression with the given replacement.
    What does mean the expression "..>" in this calling replaceAll?
    it looks like a nested call to the substitution API (http://www.business-intelligence-quotient.com/?p=812)
    thanks in advance

    HI,
    I have re configured as mentioned in your blog . But still getting same exception . Something I missed in my previous thread is below.
    <Sep 19, 2012 3:34:46 PM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "AgentServlet" failed to preload on startup in Web application: "trellisagent".
    ODI-1400: Agent trellisagent start failure: JDBC connection error occurs while connecting to the master repository.
    Caused by: java.security.AccessControlException: access denied (oracle.security.jps.service.credstore.CredentialAccessPermission context=SYSTEM,mapName=oracle.odi.credmap,keyName=SUPERVISOR read)
    at oracle.odi.runtime.agent.servlet.AgentServlet.startup(AgentServlet.java:318)
    at oracle.odi.runtime.agent.servlet.AgentServlet.init(AgentServlet.java:226)
    at javax.servlet.GenericServlet.init(GenericServlet.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    I am stuck in asituation here :(
    Ashish

  • File_To_RT data truncation ODI error ORA-12899: value too large for colum

    Hi,
    Could you please provide me some idea so that I can truncate the source data grater than max length before inserting into target table.
    Prtoblem details:-
    For my scenario read data from source .txt file and insert the data into target table.suppose source file data length exceeds max col length of the target table.Then How will I truncate the data so that data migration will be successful and also can avoid the ODI error " ORA-12899: value too large for column".
    Thanks
    Anindya

    Bhabani wrote:
    In which step you are getting this error ? If its loading step then try increasing the length for that column from datastore and use substr in the mapping expression.Hi Bhabani,
    You are right.It is for Loading SrcSet0 Load data.I have increased the column length for target table data store
    and then apply the substring function but it results the same.
    If you wanted to say to increase the length for source file data store then please tell me which length ?Physical length or
    logical length?
    Thanks
    Anindya

  • ODI Experts Error Generation File

    Hi ,
    I have created procedure to capture error records using http://odiexperts.com/error-records-log link.
    import string
    import java.sql as sql
    import java.lang as lang
    import re
    sourceConnection = odiRef.getJDBCConnection("SRC")
    output_write=open('C:\ODI\snp_check_tab.txt','w')
    sqlstring = sourceConnection.createStatement()
    output_write.write("The Errored Interface of today's (<%=odiRef.getSysDate( )%>) run are .... \n")
    output_write.write("----------------------------------------------------------- \n\n")
    sqlstmt="SELECT 'Errored Interface \t- '||SUBSTR(ORIGIN,INSTR(ORIGIN,')')+1, LENGTH(ORIGIN))||'\nError Message \t\t- '||ERR_MESS||'\nNo of Errored Records \t- '|| ERR_COUNT AS OUTPUT FROM ODI_temp.SNP_CHECK_TAB WHERE TRUNC(CHECK_DATE)=TRUNC(SYSDATE)"
    result=sqlstring.executeQuery(sqlstmt)
    rs=[]
    while (result.next()):
    rs.append(str(result.getString("output")+'\t'))
    res='\n\n'.join(map(string.strip,rs))
    print >> output_write, res
    **After thje execution i am getting follwoing error.**
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 13, in ?
    java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
         at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
         at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1188)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1379)
         at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
         at org.python.core.PyMethod.__call__(PyMethod.java)
         at org.python.core.PyObject.__call__(PyObject.java)
         at org.python.core.PyInstance.invoke(PyInstance.java)
         at org.python.pycode._pyx9.f$0(<string>:13)
         at org.python.pycode._pyx9.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java)
         at org.python.core.PyCode.call(PyCode.java)
         at org.python.core.Py.runCode(Py.java)
         at org.python.core.Py.exec(Py.java)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         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)
    java.sql.SQLSyntaxErrorException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
         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:2375)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java:1616)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java:1581)
         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:537)
         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:83)
         at java.lang.Thread.run(Thread.java:619)
    Please let me know what could be the problem..
    Regards
    Pavan

    Check two things:
    1. If the schema that hosts your ODI work repository exists in the instance as specified in the JDBC parameters related to "SRC".
    2. If answer to check 1 is yes, then check user name specified in parametrers for "SRC" and see if that user can access the table SNP_CHECK_TAB.
    Regardless of the logical schema specified in the procedure/KM, the way coding is done, connection parameters for logical schema specified in the "source command" would be used. Make sure that the logical schema for ODI work repository schema is mentioned in the source command section.

  • Is this Possible using ODI / ODQ ?

    Hi ALL,
    Is the below requirement possible with ODI / ODQ?
    (right now I am doing it mannually, and its like a monthly/weekly process)
    If we can do the same using ODQ how I need to start and proceed?
    My requirement is some thing like this. I have two columns
    Address1 (street address)
    Address2 (additional Information)
    In some cases the address is not in the proper format. So I need to do some data cleansing (data scrubbing) before loading using ODI
    Use Address2 if Address1 is PO Box, building name, or any info aside from a street address. Only one address column is needed in the output (Address1)
    For example :
    INPUT
    ADDRESS1--------------------------------------------------ADDRESS2
    HIGHWAY # ------------------------------------------------5010944 MARSH RD
    PO BOX 40964---------------------------------------------1100 AA CORP PARKWAY
    DBA VANTAGE PP---------------------------------------11031 PERRY HIGHWAY
    HOME INFUSION THERAPY SERVICES--------11031 PERRY HIGHWAY
    7275 BUFFALO ROAD----------------------------------(WAS 6855 BUFFALO ROAD)
    7601 N FEDERAL HWY---------------------------------#2506
    MCAS ---------------------------------------------------------(MARINE CORPS AIR STATION)
    212 BRADDOCK AVENUE------------------------------
    212 NINTH STREET----------------------------------------
    2138 JONATHON DRIVE---------------------------------
    OUTPUT (Note : we don&rsquo;t need the Address2 column in the output)
    ADDRESS1----------------------------------ADDRESS2
    10944 MARSH RD------------------------10944 MARSH RD
    1100 AA CORP PARKWAY-----------1100 AA CORP PARKWAY
    11031 PERRY HIGHWAY-------------11031 PERRY HIGHWAY
    11031 PERRY HIGHWAY-------------11031 PERRY HIGHWAY
    7275 BUFFALO ROAD------------------(WAS 6855 BUFFALO ROAD)
    7601 N FEDERAL HWY----------------#2506
    MCAS-----------------------------------------(MARINE CORPS AIR STATION)
    212 BRADDOCK AVENUE------------
    212 NINTH STREET----------------------
    2138 JONATHON DRIVE---------------
    I have posted a similar kind of question in DATA Quality (ODQ) forum
    Forum Home &raquo; Master Data Management (MDM) &raquo; Data Quality
    ADDRESS CLEANING(US) USING ODQ
    Thread: ADDRESS CLEANING(US) USING ODQ
    if any body is working on address cleansing using ODQ, Please guide me to start working on it.
    IS there any specific documents for ADDRESS CLEANING which gives more information about the process flows such as
    Transformer, Customer Data Parser, Sort for Postal Matcher, Postal Matcher, Window Key Generator,Sort for Linking, Relationship Linker, Commonizer, and Data Reconstructor.
    Thanks in Advance,
    Rathish

    Hi Rathish,
    I was building the java code but I got other idea to make more simple.
    1) load the values into a temp table with one column for each address (means 2 columns per line) plus 2 other columns to control.
    Something like:
    table temp_data
    columns: add_1 , control_1, add_2, control_2
    You can do that thru an interface. Let the fields "control" with no value when loaded
    2) create a table to storage the values you sent to me (Avenue, street...)
    table street_names
    columns: street_name, country (to your future use)
    3) Create an ODI procedure (or you can customize a KM with the same technique)
    3.1) Step 1 at target Tab, technology javaScript
    code:
    <@String vU=" ";@>
    3.2.1) step 2 - Tab Source - technology "your database" and the Logical Schema where the "street_names" table as created
    select street_name
    from street_names
    where country = 'US'
    3.2.2) step 3 - Tab Target - tecnology javaScript
    <@vU+="or instr(upper(add_1),upper('#street_name'))>0 ";@>
    3.3) step 3 - Target Tab - technology "your database" and the Logical Schema where the "temp_data" table as created
    <@vU=vU.substring(3);@>
    update temp_data
    set control_1 = 'Y'
    where <@=vU@>
    3.4) step 4 step 3 - Target Tab - technology "your database" and the Logical Schema where the "temp_data" table as created
    <@vU=vU.replaceAll("add_1","add_2")@>
    update temp_data
    set control_2 = 'Y'
    where <@=vU@>
    4) Now you have a table (temp_data) with a flag "Y" where there is a street name and "null" where doesn't exist. Just generate your file by a interface or odiSqlUnload Toll.
    Put all together into a package and you will have your process.
    I create in this way to minimize the access to the temp_table, just 2 updates.
    can be used some alternatives to tunning the hole process if the time doesn't match what you need.
    That is a fast solution. Something more elaborated can be done if necessary.
    Does it help you?
    Cezar Santos

  • ODI Datastore Length differs with the DB length -IKM throws value too large

    ODI datastore when reverse engineered shows different length to that of the datalength in the actual db.
    ODI Datastore column details: char(44)
    Target db column : varchar2(11 char)
    The I$ table inserts char44 into varchar2(11char) in the target. As the source column value is empty ODI throws
    "ORA-12899: value too large for column (actual: 44, maximum: 11).

    Yes. I have reverse engineered the target also.
    source datatype     varchar2(11 char)
    After Reverse Engineering
    odi datstore datatype-Source :  char(44)
    target datatype: varchar2(11 char)
    after Reverse Engineering
    odi datstore datatype-Target :  char(44)
    Since the target datastore is char(44) in ODI Datastore and the values in the source column are null/spaces, the IKM inserts them into the target Column which is of 11 Char and the above mentioned value too large error occurs.
    There are no junk values seen on the column and I tried with substr(column,1,7) and
    Trim functions too and it does not help.

Maybe you are looking for

  • IPhone mail app is not pushing Office 365 emails to show in my lock screen

    Hello, I transferred from one college to another last semester and set up my iPhone to receive school emails as I had at my previous school. Both colleges use the same email system, Microsoft Office 365. At my first college, my email functions worked

  • Authorization Control for Setting TECO

    Hi PS Gurus, Would like to ask if there's a standard way of controlling users on the setting of TECO for PS objects? I cant find any setting in T-code PFCG that may limit setting of TECO for selected roles. Suggestions outside standard is also welcom

  • Different Footnote Styles within one document

    I work in InDesign 5.5. Currently I'm working on a project that requires different footnote styles within one document (1, 2, 3, . . . and a, b, c, . . .). How can I set them up as different styles? If I make a change in the Document Footnote Style s

  • Cant download BB app. store! pleaase help!?

    Hi, i cant seem to download the BB apps. storeon my computer nor blackberry and its driving me insaane! im 14 && got the blackberry for my birthday. im on 02 and i pay £15 a month for 100 mins and 3000 texts - is this a data plan or do i need one? wh

  • Vertical Colored Lines on G4

    We installed Leopard on our 800 MHz G4 iMac using the target-mode trick. Everything seems to be working fine, though a bit slow, except for one issue. Whenever the display is reawakened after going to sleep, the screen is full of vertical multi-color