Tuesday 19 September 2017

ODI Configure Email Task.

Hi Guys,

In this post i will give you some tips that we can use while creating an Email task in ODI 12c.

The main thing that we need to take care while creating an Email task is Email Subject and Email Body. In failure email and all we need to make this dynamic so we will get proper failure email with subject.For that you can use the following codes.

Subject:
<%=odiRef.getContext("CTX_CODE")%> - ODI session <%=odiRef.getPrevStepLog("STEP_NAME")%> in package   <%=odiRef.getSession("SESS_NAME")%> FAILED AT <%=odiRef.getPrevStepLog("BEGIN")%>

By using the appropriate odiRef we can customize the subject accordingly.

Message Body:<%=odiRef.getPrevStepLog("MESSAGE")%>

This will give you the failure step description with error codes.


ODI error ORA-02292: integrity constraint (ODI_REPO.FK_MAP_PROP_1) violated - child record found

Error From ODI Error log.

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Exception: ODI-20088: Error while generating the scenario
.
Caused by: java.lang.RuntimeException: java.lang.Exception: ODI-20088: Error while generating the scenario
.
Caused by: java.lang.Exception: ODI-20088: Error while generating the scenario
.
Caused by: oracle.odi.core.repository.UncategorizedRepositoryAccessException: ODI-10182: Uncategorized exception during repository access.
ODI-10143: Error while accessing the ODI repository.
ORA-02292: integrity constraint (ODI_REPO.FK_MAP_PROP_1) violated - child record found
.
Caused by: oracle.odi.core.repository.RepositoryIntegrityViolationException: ODI-10143: Error while accessing the ODI repository.
ORA-02292: integrity constraint (ODI_REPO.FK_MAP_PROP_1) violated - child record found
.
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (ODI_REPO.FK_MAP_PROP_1) violated - child record found


Cause:

Actually i tried to find out if there is any mistakes in the mapping but it is perfectly fine and no other issues.The issue is that we cannot generate the scenario for that.
The reason is some how the code for the mapping is corrupted.

Solution:

I found the solution from the Oracle blog, just updating that here.

The solution is to upgrade the ODI environment to the latest version of ODI 12.2.1.2.6.

There is a workaround involving an export/import of the mapping that can be used until the environment can be patched.

Export the problem mapping.
Open the mapping xml export file for edit.

Locate the lines containing field name IOwnerExecUnit with a number as a value.

For example:
<Field name="IOwnerExecUnit" type="com.sunopsis.sql.DbInt"><![CDATA[40275]]></Field>

You have the option to remove the line completely, or change the line to have a null value.
For example:
<Field name="IOwnerExecUnit" type="com.sunopsis.sql.DbInt"><![CDATA[null]]></Field>

Import this file back into ODI. You should be able to successfully compile it into a scenario.

After doing this step i am able to create the scenario and run it.

Hope this will help you also !.