Gurcan Orhan's Oracle Data Integrator Blog

18.02.13

Adding Variabled HINTS in ODI

As in my previous post I have described how to implement HINTS per interface. It is a little bit tricky because HINTS are stored in development “ODI interfaces” and scenario of the interface must be regenerated when a HINT is changed and completely in developers’ hands.

I have thought about it and found a way to let dba’s change HINTS by updating a parameter table for each interfaces’/procedures’ each step. Once your dba updates/inserts the desired row (per SQL statement for each Knowledge Module or ODI Procedure) and commit the record it is been executed in the next execution of that interface or procedure.

My colleague, Fuat, prepared the necessary development to me and after reviewing the code, I want to share it with you. He blogged the same stuff, it is better for you to check his blog post from here.

1. Create a database table to store HINTS in text format;

Adding Variabled HINT #1 - Create HINTs table

  • INTERFACE_NAME : Name of the Interface that will be queried to get the HINT.
  • INTERFACE_KM : Name of the Knowledge Module that Interface is using (IKM or LKM).
  • KM_STEP_NAME : Name of the step in Knowledge Module which will use the HINT.
  • KM_STEP_ORDER : Order of the step of Knowledge Module.
  • STEP_HINT_NAME : Name of the step of the Knowledge Module. This helps dba which step is sent to database.
  • STEP_HINT_ORDER : There might be more than 1 hint per step of Knowledge Module, this column shows the order of HINT.
  • HINT_VALUE : Exact value of HINT to be added into SQL Statement. This value should contain /*+ and */.

2. Now it is time to edit Knowledge Module and selecting HINTS into ODI Variables and use them.

2.1. Add a step for the first line of Knowledge Module. You can name this step as Get Hints.

Adding Variabled HINT #1 - Getting variabled HINTS from db to ODI Variables

Remember that all the HINTS to use in this Knowledge Module would be passed into #Hint_n variables for future use. Technology of “Command on Target” is Java BeanShell and “Command on Source” is Oracle. We already know which KM we are using, Step Names with the variable names and the last filter should be applied is Interface name which can be determined with the function <%= snpRef.getStep(“STEP_NAME”) %>. All the HINTS for this Knowledge Module are in variables now. It is time to use them.

2.2. In the below picture, it is showing how variabled HINTs are used. Syntax should be as “<@=HINT_NAME@>” where HINT_NAME should be same with the variable declared on the Knowledge Module step on the “Command on Target” section.

Adding Var HINT #3 - Using Variable HINTs in KM Steps

3. Here is how this method looks like in the operator (I know it is not so fancy but you need to trust ODI).

Adding Var HINT #4 - Operator Log of GetHints

4. And the last step, adding variabled HINTS into SQL Statements.

Adding Var HINT #5 - HINTS in SQL Statemets

Limitations;

* You cannot view HINTs session values within Operator logs. But you may insert the value of the HINT into a log table for each value per Interface for previous working values. All you have to do is adding a step in your Knowledge Module/ODI Procedure to insert the value of HINTS used.

05.02.13

Adding HINTS in ODI

Filed under: Oracle Data Integrator — gurcanorhan @ 15:55
Tags: , , ,

We all know that Oracle is powerful when you use HINTS and override tables’ physical options and database parameters. There are many tuning and/or performance related blogs on this subject, but what I will share is how to implement HINTS in ODI. (more…)

05.12.12

Archiving ODI logs

Filed under: Oracle Data Integrator — gurcanorhan @ 14:05
Tags: , ,

Have you ever had the problem of lots of logs in ODI listing Operator. What would you think if there is a method to archive logs and you can store them as much as you want and can select anytime you want to? (more…)

Adding Functions to ODI

In most cases we (ETL developers) are stuck into doing something. Sometimes an analytic function helps, sometimes a function in database. But is there a way to use this function in a structured way that ODI can understand? Let’s try to find out. :-)

Languages in Topology Manager help you leverage your languages that you can use in ODI. You can even add a new language (if you know and eager to type all commands). (more…)

30.11.12

ODI Alert Mechanism

Today, I have read an article about recommendation about not using red lines (ko) in ODI packages. I just want to explain how I manage alert mechanism in ODI.
This is a sample package that I use in extraction phase. (more…)

21.11.12

NYOUG (New York Oracle User Group) Long Island SIG Webinar

Filed under: ACE Director,Conferences&Seminars — gurcanorhan @ 16:07
Tags: , , ,

I’m invited to New York Oracle User Group (NYOUG) for the below webinar. To register the event, please use this link.

7 December 2012 Friday, 3:00pm – 4:00pm EST (20:00 – 21:00 GMT+2)

Best practices with Oracle Data Integrator (ODI), do you know how flexible ODI is ? By Gurcan Orhan – Oracle ACE Director
Join us for a Webinar on December 7
Space is limited.
Reserve your Webinar seat now at:
https://www3.gotomeeting.com/register/714573278
  (more…)

14.11.12

ODTUG-Ask the Experts Panel – ODI

Filed under: ACE Director,Conferences&Seminars — gurcanorhan @ 16:22
Tags: , ,

For the first time – ever – ODTUG is organizing a virtual panel session. Thanks for Cameron Lackpour for inviting me for that kind of important job. Here are some facts and how to register to this wonderful virtual event.

If you want to see complete page of Cameron just click here or here.

(more…)

28.02.12

Adding Datatypes to Oracle Data Integrator (ODI)

As I’ve mentioned before ODI is a tool that can learn. And here is one of the proof. :-)
There are many datatypes in various databases and each version may have new datatype, but your ETL tool should learn while talking with database with that datatype. I’ll try to explain how to add “bigint” datatype to Sybase Adaptive Server Enterprise and “SDO_GEOMETRY” to Oracle. (more…)

17.05.11

Changing ODI Repository Name

Filed under: Oracle Data Integrator — gurcanorhan @ 13:52
Tags: , ,

If you receive an error in ODI 10g like;
java.lang.Exception: Error during Session launching
at com.sunopsis.dwg.dbobj.SnpSession.remoteExecute
or
java.lang.NullPointerException
at com.sunopsis.dwg.cmd.DwgCommandBase.prepare(DwgCommandBase.java)

First check whether your agents are working and test connection to repositories. If everything ok, you might have changed your repository name recently. :-)

When you export your work and master repository and import to another schema or database and whether you connect to your imported repository, you change your repository name in your first environment.

Correct order is first rename your Master Repository name, log off / log on and change your Work Repository name and check below fields in both your Master and Work Repositories in both environments.

Master Repository : SNP_REM_REP
Work Repository : SNP_LOC_REPW

REP_NAME column of MASTER_REP.SNP_REM_REP should be equal to REP_NAME column in WORK_REP.SNP_LOC_REPW.

You cannot see WORK_REP.SNP_LOC_REPW value in ODI Topology Manager and if you are changing your repository name you need to update value from database.

07.02.11

Installing ODI to Windows 7

Filed under: Oracle Data Integrator — gurcanorhan @ 11:32
Tags: ,

If you receive a error message saying “this operating system is not supported” follow below operations.

Since Windows 7 is released as version 6.1, previous versions of ODI supports up to 6.0 depending on the version that you want to install. What you have to do to install ODI on Windows 7 platform is so simple.

  1. Find the file named, oraparam.ini in the ODI setup directory (default is \\InstallPath\ODI\setup\Windows\Disk1\install).
  2. Edit oraparam.ini and find the header [Certified Versions] or value named “CERTIFIED_VERSION_FAILURE_MESSAGE”.
  3. Add 6.1 next to 6.0 with comma without any space or other character. It should seem like that;

Windows=4.0,5.0,5.1,5.2,6.0,6.1

You can now run setup without asking version failure and follow on screen instructions.

Next Page »

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 332 other followers

%d bloggers like this: