Skip to content

November 12, 2010
by Cezar Santos
9 Comments

Categories: How to , Logic , ODI , Tips and Tricks

Tags: , , , , , , ,

Single Post View


11g Oracle Data Integrator – Part 6/11g – Union , Minus, Intersect

Hello Friends ,

We have shows you few important features of the new ODI 11g ,today we are going to show you how to implement Union , Minus etc logic in ODI 11g which was lacking in older version and thus maturing ODI in the ETL world.

After the initial step of the Interface name ,Click on the Add/Remove Dataset

clip_image001

Rename the Dataset Name to Source 1, Source 2 for more meaningful or else you can provide the Table name too and in the Second Dataset name select the Operator as Union.

clip_image002

Drag in the Source tables and Target table and map the columns accordingly.

clip_image004

Go the Flow tab and select the Staging Area and select the appropriate LKM and IKM.

[ since my Source are in the Same database so no LKM ) and Execute

clip_image005

ODI 11g provide a new feature called Simulation as that generates all the required codes without running the Interface , useful functionality when you trying carry some complete logic where you want to test in SQL Developer or Toad because carrying out in ODI .

It worked and we got 107 inserts

clip_image007

Lets see the codes and as we see it has carried out the required UNION operation between two tables.

clip_image008

Let’s try the same interface for Minus with truncate table option yes in Target.

To do so, we have just changed the operator for Source 2 to Minus and execute

clip_image009

clip_image010

Similarly it goes for UNION_ALL and INTERSECT

What if we want to do UNION between three tables? Just select the right operator and the ODI will create the logic as defined.

clip_image011

clip_image012

This functionality give an extra edge for ODI on ETL side.

Keep looking odiexperts for more ODI 11g  functionalities .

November 5, 2010
by Cezar Santos
30 Comments

Categories: How to , ODI , Tips and Tricks

Tags: ,

Single Post View


Jython’s Beginner Guide for ODI

Hello Friends,

There are few days that we don’t have new posts around here… We are pretty busy in the business in the past days!!!

But, here we are with a new post that we, personally, think will be really helpful to those who like “deep” programming in ODI.

I hope you all enjoy it!

When it comes to ODI sooner or later we might have to deal with Jython and some one who have used Java would find that easy ,but not for every one . Considering that we thought of writing this post in understanding how to deal with Jython in relation to ODI . We are not going to teach you Jython 🙂

Generally most of the uses of Jython in ODI is either to capture and raise error in the operator, run OS command and do the appropriate if and else condition , reading and processing records for RDBMS , File processing based on different logic and so on.

When we use jython like java we need to import different modules , Example

import os
import re

we can also import java libraries something like you have seen few of the past codes

import java.lang.sql as sql
import java.lang.io as io

Lets look on few codes which we might use more and more.

Reading , Writing , Re-writing the file

There are different format in jython to process files, but we personally like this format
srcfile=open(‘file_name’,’r’)
Here in the above syntax, we can change the parameters of file by

r – only for reading
r+ – re writing into the same file
w – writing to a new file

When we use W (writing) on an existing file the whole file gets flushed or cleared out,so be careful when pointing to any file.

There are again different format to read the lines of the Files either complete or line by line.
We can write codes using the list format to process records into the memory but if we are dealing many millions of records calling and storing into memory and processing it can throw memory error something like  java.lang.memory exception . Keeping that in mind , we  write codes to read line by line and process accordingly.

Reading Line by Line

srcfile=open('file_name','r')
first_line=srcfile.readline() - Reading First Line
second_line=srcfile.readline() - Reading Second Line

This way when we need to read just one line we can use to readline() command . The pointer of the line keeps moving one line to next line.

Lets say if we want to keep reading all the lines

srcfile=open('file_name','r')
line=srcfile.readline()
i=0
while line:
    print line
    i+=1
    line=srcfile.readline()

print 'Total Number of Lines', i
srcfile.close()

This above simple program reads all the line one by and incremented i for each line it read, so that at the last we are also print the value of ‘i ,denoting the number of lines in File.

Let me cover step by step

srcfile=open('file_name','r')
# opening the File in Read only mode
line=srcfile.readline()
# Reading the First Line
i=0
while line:
# while loop started to read the lines one by one
    print line
    # printing the line . Please note that when ever you write codes under while or for loop ,you need to write after a tab space else the codes wont get  executed.
    i+=1
    # increment the value of i by 1
    line=srcfile.readline()
    #reading the next line of the File

print 'Total Number of Lines', i
# print the value of i
srcfile.close()
#Always close the file which you have open for read , write or any other mode else the file is open by memory in jython and unnecessary data is lying in its #memory.

Reading all the Lines at one shot

srcfile=open('file_name','r')
lines=srcfile.readlines()
print lines
srcfile.close()

Here all the lines of the Files are read a list and stored in the memory error, so in case if we have huge record it can throw memory . To solve either go for Record by record processing which can be a little time consuming or increase the Java memory to handle the processing.

Here  readlines() reads all the lines of the source file and stores in the form of array and pass it to variable lines.

Writing the data into File.

There are different ways we can write the records into File .

If you are writing a string , you can use the write(string )  to write into file

output_write=open('<file_name>','w')
str1='This is a sample program'
output_write.write(str1)
output_write.close()

In case you are planning to write multiple lines say array or list, you can use the writelines()

source_file=open('<file_name>','r')
output_write=open('<file_name>','w')
read_lines=source_file.readlines()
output_write.writelines(read_lines)
source_file.close()
output_write.close()

You can also use the java BufferedWriter.

import java.io as io
writer=io.BufferedWriter(io.OutputStreamWriter(io.FileOutputStream('<file_name_to_be_writtne>')))
writer.write('string or content')
writer.flush()
writer.close()

One of the fastest way to write into File is to store data  into Variable and write them once rather than in a while or for loop that way the overall time is reduced . This idea is great when you running your codes in Server and as we have high memory to process  and store larger records

seek

If you ever want to go to the First line of the file use seek(0) command , so in the above program if i want to go to first line it will be

srcfile.seek(0)  #( seek(zero))

t and n

t moves the pointer to include a tab space
n move the pointer to next line

Concatenate strings

str1='abcd'
str2='efgh'
print str1+str2
#output abcdefgh

Using + we can concatenate two strings .

str1='abcd'
str2=25
print str1+str2
#output Error - TypeError: __add__ nor __radd__ defined for these operands

Reason being we can’t concatenate string and a number

solution 1 - define number in the format of string so - str2='25'
(or)
solution 2 - Convert it into string while printing - str(str2) ,so print str1+str(str2)

to convert from anything to string use str()  function .

Replace

to replace any string  or character with another string or character

str1='123'
str2='456'
action='dist;item'
long_string='ds;sfsdf,sfsdf//'
print str1.replace(str1,str2)
# output  456
print str1.replace('1','7')
# output 723
print action.replace(';',',')
# output dist,item
#you can also have multiple replace at the same time
print long_string.replace(';','').replace(',','').replace('/','')
# output dssfsdfsfsdf

Arrays

Arrays are fun way to handle string and number.To declare a null array use this syntax

str1=['action','item','123']
print str1[0]
# arrays always starts with 0 and so on
# output action
print str1[2]
#output 123

To declare any as null array to this  str1=[]

Converting Arrays to string

str1=['action','item','123']
print ''.join(map(string.strip,str1))
# using this syntax we can convert the array to string
#output actionitem123

Converting String to Array

str1='this is a string'
print list(str)
#output ['t', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 's', 't', 'r', 'i', 'n', 'g']

Converting characters into Array

str1='this is a string'
list1=str1.split(' ')
print list1
#output ['this','is','a','string']
print list1[0]
#output -  this
print list1[1]
#output - is

this split command is useful when you wish to split the string into words and fetch the required on as appropriate.

Raise

Raise is a great command to raise an error and we can use raise to publish the required error into the Operator.Example

raise " This is the following Error " , string
raise str1

Capturing position in String

#first step import module
str='12345'
# assigning value to String
print str[:-1]
# print command is used to print in the output
## when we use -1 it means it starts from the end of the string
## output 1234 as end is 5 and so backwards leave 1 character.
print str[:-2]
## so leave 2 position from end , so output 123
print str[0]
# 0 is treated as the first position
print str[0:3]
#expected output 123
print str[2:4]
#expected output 34

String search

There are some great high level search we can do used regex but here i will be showing you here simple search method using string.find

str1=' This is a program '
print string.find(str1,"is")
if string.find(str1,'is')> 0:
    print str1
else:
    print ' Not available '

# output - This is a program

whenever string.find , finds the particular string in it refers to the position and that’s the reason I use > 0 .

Another simple and efficient search is using Regular Expression (re) .

import re
str1='This is a program'
if  re.search("is",str1):
print ' Match found'
else:
print ' Not Found'

Please look into link for more way to handle simple and complete expression methods and functions.

http://www.jython.org/docs/library/re.html

OS.system

os module helps us to do Operating system based activity either in windows or unix.
os.system run an operating system command fetches the error if fails. If the process is successful then 0 else the required error message .
ODI  have the OS Command and OdiOSCommand to do pretty much the same work without writing any jython
codes .

Lets take another example

import os
if os.system ("copy test.py test1.py"  ) == 0 :
     print "success"
else:
     print " failure "

For os.system  the 0 (zero) is always marked by success and rest of the return codes by failure or error.

Look at this documentation link for os  –   http://www.jython.org/docs/library/os.html

AND  and OR condition

For and condition use this & (and symbol)
OR condition use this | (pipe symbol )

For example

str1= 'Example1'
str2='Example2'

if (( str1 =='Example1' ) & (str2 == 'Example2')):
     print  ' And works '
#output And works
if (( str1 =='Example1' ) | (str2 == 'Example1')):
    print ' OR works '
#output OR works
if ((( str1 =='Example1' ) & (str2 == 'Example3')) | (str2 == 'Example1')):
   print  ' AND and OR combination does not works '
else:
   print  ' AND and OR combination works  '
#output - AND and OR combination works

IF condition

General format
if  (condition )
results
elif (condition)
results
else
results

Ex

str1='Examples'
if str1 == 'Example' :
   print ' The String is Example '
elif str1 =='example' :
   print ' The String is example'
else:
   print ' The str1 is neither example (nor) Example '

[ Note – there is always a tab space after if condition ]

While Condition

While condition is great when we need to process something one by one and execute something till the end.

Example

File C:output.txt

abc
dba
dsg

file_open=open('C:output.txt','r')
line =file_open.readline()
while line:
    print line
    line =file_open.readline()

[ Note – there is always a tab space after while condition , till the condition is complete ]

Jython + SQL

We also use Jython to play with SQL and write the result either in File , Operator etc. To use the SQL we use the Java libraries.

import java.lang.* as lang
import java.sql.* as sql

When it comes to Jython+SQL the logic , format is pretty much the same as Java  , so in case you find an example with Java you can modify with few simple syntax change and write the codes for Jython.

The most efficient way is to use the sunopsis API getJDBCConnection for connecting to Source system using Java or Jython. This way we don’t have to worry about providing the driver parameters or hard coding them since they can change from the environment to environment. In case if you ever need to get particular info about driver , url or user you can use API getInfo()

Initially create the connection to the Source System

sourceConnection = odiRef.getJDBCConnection("SRC")

Here in Command on source we select the required technology and associated schema.

sqlstring = sourceConnection.createStatement()

Next step is to create the statement for execution .

sqlstmt="SELECT 'Errored Interface t- '||SUBSTR(ORIGIN,INSTR(ORIGIN,')')+1,
LENGTH(ORIGIN))||'nError Message tt- '||ERR_MESS||'nNo of Errored Records t- '||
ERR_COUNT AS OUTPUT FROM  ODI_TEMP.SNP_CHECK_TAB WHERE TRUNC(CHECK_DATE)=TRUNC(SYSDATE)"

In sqlstmt we define the complete select , insert, update string and pass it to this variable. This way we can call it multiple time and if we have to modify , we can change it at one place.
Here we have used t to have the tab space between the column and the output and n to have the next result in second line this way the result can be more organized. For an output example Please visit this link –http://odiexperts.com/error-records-log

result=sqlstring.executeQuery(sqlstmt)

To execute a select query use executeQuery(sqlstmt) and to insert /update query use executeUpdate(sqlstmt) .

while result.next():

In order for you to read and process the select query we tend read it records using a while loop and finally you can use getInt , getString and fetch the required records . Please look into the Java documentation for other APIs.

Also you can other similar example related to Jython + SQL

http://odiexperts.com/displaying-sql-results-in-operator
http://odiexperts.com/writing-sql-counts-using-jython

Looking for Editor to learn and practise Jython.
1. Eclipse [ Plugins such as Pydev , JyDT ]
2. Jython.bat

Jython Sources and Documentation

If you are looking for Documentation on Jython , the best resource would be to look into official documentation of jython

http://www.jython.org/docs/ , 

http://www.jython.org/docs/library/ [ Very Important Link ]

[ Note : The links are for Jython 2.5 and so you might find functions and methods which might not be still supported as ODI 10g is on 2.1  ]

Also you might not find so many codes or example for Jython , but you can refer to Python documentation and example too , as Jython is Java + Python .

You can find Python documentation here  http://python.org/doc/

also look into the Oracle documentation ( http://download.oracle.com/docs/cd/E15985_01/doc.10136/reference/DIJQR.pdf ) there  are some good example covered .

Jython not recognizing Windows 7 as NT

Please look into this link http://odiexperts.com/jython-os-bug-in-windows-7

Handling  spaces in path

While passing the OS system path especially in windows we have issue with spaces causing the error Path does not exists or File not Found etc . In order to solve that , Please have the spaces between folder name between double parenthesis. Say for example

import os
ospath=(r'C:Program" "FilesMicrosoft" "SQL" "Server\100\Tools\Binn\bcp')
if os.system(ospath)  > 0:
    raise 'BCP Unload Failes'

Program File is – Program” “File ( Program<double_quote><space><double_quote>File).
Microsoft SQL Server is Microsoft” “SQL” “Server

\ in windows path

Its good to use the two slashes in windows path , reason being some time some of the combination yields values which are understood by Jython differently  , say for example

c:numberten

In this example the n and t would be understood by Jython as next line and tab space causing to read the line wrong  and would throw errors like file not found or path does not exists etc ,so the correct way to write is (ie using double slash)

C:\number\ten

Hope this should provide beginners a guide towards the world of Jython+ODI .
We have covered few codes of Jython and  might update this post in future too so that we have consolidated Jython guide  at one place.

[ Note: There are numerous other ways to do the above codes in different way , you can explore more by looking into Jython books and documentation. ]

Keep looking into the odiexperts for more tips and tricks .

“is”,str1

October 19, 2010
by Cezar Santos
11 Comments

Categories: How to , Logic , ODI , Reports , SQL , Technology , Tips and Tricks

Tags: , ,

Single Post View


Send SQL by Email

Hello Friends,

We have shown you in the past how to write SQL using Jython to file , SQL in Operator and Rows counts into File and various other technique but some time we don’t want to send as an attachment but rather as a direct Email.

Here is a very simple Technique ,which can be done in one to two steps.

Step 1.  Java Codes

Command on Source – Database Technology and Schema

Command on Target , Technology- Java Bean Shell.

and paste the following codes and just change the Query  string , if required delimiter.

<@

import java.sql.Connection;
import java.sql.Statement;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;

conn=odiRef.getJDBCConnection("SRC");
Statement stmt=conn.createStatement();
String result="";

char delimiter=(char)44;
// Please change the delimiter here,i.e just change the number
// TAB - 9
// COMMA 44
// GET THE CODING LIST AT http://www.zytrax.com/tech/codes.htm

my_query="SELECT * FROM ODI_TEMP.PERIOD_YR ";

// Either provide the columns or select * from all columns

ResultSet rs=stmt.executeQuery(my_query);
ResultSetMetaData md=rs.getMetaData();
int numColumns =md.getColumnCount();

// Fetch column names
for (int i=1; i<numColumns+1; i++) {
 String columnName = md.getColumnName(i)+ delimiter;
 result+=columnName;
 }

result=result.substring(0,result.length()-1);
result+=(char)13;

int times=result.length();

for (int i=1; i<times ;i++){
 result+="-";
 }

result+=(char)13;

// Fetching Rows

result=result.substring(0,result.length()-1);
result+=(char)13;

while (rs.next()) {
 for (int i=1; i<numColumns+1; i++) {
 String  output=rs.getString(md.getColumnName(i))+ delimiter;
 result+=output;
 }
result=result.substring(0,result.length()-1);   
result+=(char)13;
 }

// Close Connection

stmt.close();
conn.close();
@>

Step 2.  Email using OdiSendMail

Command on Target  – Sunopsis API

and paste the following codes.

OdiSendMail -MAILHOST=<mail_host> -FROM=<from_user> -TO=<address_list>

<@=result@>

(or)

You can also call the OdiOutFile etc in the package too and in the message call <@=result@>, but make sure you call the above java procedure before it.

Simple and Easy .

Sample Output

Look for more tips and tricks from odiexperts.com 🙂 . Also keep looking for more ODI 11g   posts.

October 6, 2010
by kdevendr
2 Comments

Categories: Administration , Architecture , How to , ODI

Tags: , , , , ,

Single Post View


Security Module – Main concepts and use

Hi Friends,

We wrote this article to try to send some light on Security Module (10g for now) once several emails asked us for do it.

I hope that it can be useful!

The creation of users is relatively simple. Just open the Security module, go to the tab “Users” (Users) clicking the right mouse button and choose “Add User”

clip_image002

After opening the window only enough to fill the required information.

IMPORTANT: IF YOU CHECKED THE CHECK BOX OF “SUPERVISOR” CREATED YOU WILL HAVE NO RESTRICTION ON USE OF ENVIRONMENTAL ODI. This option enables the user CALLED “superuser”

At the end of user creation, you must add this to the desired profiles. I will use as an example, a developer can access any object in the repository development.

To do so, simply drag (drag and drop) the desired profiles to the newly created user:

clip_image004

IMPORTANT: THE PROFILE “CONNECT” IS MANDATORY FOR ALL USERS

Completed these steps the user is able to connect the repository with rights that were signed.

Granting privileges on projects and their components.

Granting privileges to a specific project can only be assigned to users have “Supervisor” and also with the profile of the “NG” (not generic).

In our example we will use a user named “Developer” which has only the profiles of “Connect” and “Designer NG

clip_image006

To determine if access should open side by side on screen, both modules, and Security Developer and then drag the desired design for the user who is entitled to access it as:

clip_image008

It will be shown a confirmation window

After confirming opens a window where rights of association have the following concepts:

a. The mark “Checked” means that the user can perform that action in any repository.

clip_image010

  1. The mark of “Denied” means that the user can not use that method:

clip_image012

  1. It is the mark of “Interrogation” means that the user can only use that method in the specified repository:

clip_image014
Established these conditions must then use them in the security window to set the user access to each object of that project:
clip_image016
Note that the methods “Edit Project” and “Duplicate Project” will only be available in the Repository “REPWORK.”
Only the method “Edit in new Window” will be allowed to all repositories
All other methods are denied (this is the default, should be configured as needed.)
We can see that after connecting the User “Developer” he has no rights other than those set:
clip_image018
It is interesting to inform you that the “rights” controlled by the security window can be understood as the options that appear when you right click on an object.
Other relevant information and that in this case example, there were signed on Direct Folders , Packages, Interfaces, etc.. And with that, the project does not bring any of your folders and if there is an attempt to create, an error such as:
clip_image020
The configuration of users without the standards should be made at the level of each method on that object.

These are the main tasks and concepts on Security Module.

Thanks for visit us!

September 29, 2010
by kdevendr
22 Comments

Categories: Administration , Architecture , Drivers , How to , Logic , ODI , Tips and Tricks

Tags: , ,

Single Post View


Drivers Location in ODI 11g

Hi….

A small but very helpful tip!

Initially when I was scrolling  the documentation there were two location where we would need to place the Drivers one in <WINDOWS_USER_HOME>AppDataRoamingodioraclediuserlib

and the other will be the <ODI_HOME>/agent/oracledi/drivers  Folder.

It confused me why two places and this is not feasible architecture , then I turned my attention towards the Global Architecture of  Server  and Client .  So if my ODI Server  is located on a UNIX server then I would be placing all my drivers under the agent/oracledi/drivers   folder,since Agent will be located on my Server . While my Windows Client machine  would be using the  AppDataRoamingodioraclediuserlib folder for drivers ,as I would be using the Local Agent for reversing and if I in case I need to use  respective RKM automatically Server Agent can be used to connect.

Moreover when we install the ODI Studio namely the ODI client the user wont have the agent folder and so they would have no confusion and would have to use AppDataRoamingodioraclediuserlib for drivers .

image

See you in the next post!

September 21, 2010
by Cezar Santos
7 Comments

Categories: Administration , Architecture , How to , ODI , Technology , Tips and Tricks

Tags: , , ,

Single Post View


11g Oracle Data Integrator – Standalone Agent but, and about the Windows Service???

Hi Guys,

Let me start a new discussion that, for sure, some ODI gurus will commnet! (Please, do it! hehehehehe)

In ODI 11g when I was doing the installation , I got a setup screen to setup the agent  and I created the agent called MAIN_AGENT and I initially thought it’s a cool feature and thought that the Agent was created and automatically the ODIPARAMS and other files will get update .

Once the installation is done and the ODI 11g instance is started , I just triggered the agent and I got an Error . Oops I have not started the agent_MAIN_AGENT.bat and when I started it suddenly vanished , I had a feeling that some thing was wrong  and something is not setup properly, so I went inside the agent_MAIN_AGENT.bat script and saw this

D:OracleMiddlewareOracle_ODI1oraclediagentbinagent.bat “-NAME=MAIN_AGENT” “-PORT=20910”

In short its just the file calling the agent.bat with the required parameters populated , so started digging around and looked at the odiparams .

The odiparams file was located where the standalone agent is located namely

<ODI_HOME>/Oracledi/agent/bin

I looked at it and saw that its pretty much the same but rather than the HSQL driver I was able to see the parameters for oracle. I started updating and provided the required parameters, at the ODI_MASTER_ENCODED_PASS I need to supply the encoded password , so I started typing in the command prompt

agent encode <password>

image

and ODI was trying to start the agent <password> ,so I knew some thing is changed again and I looked at the folder and I was able to see the encode.bat . Ah ! new funda . so I tried

encode <password >

image

Voila ! it worked Smile

After updating the required parameters , I was scrolling and looking at the other option , I saw new options  ODI_CONNECTION_RETRY_COUNT , ODI_CONNECTION_RETRY_DELAY

image

and also the ODI_JAVA_HOME is set with the required jdk path  which mean it no more reads from the JAVA_HOME or setting the environment variable ODI_JAVA_HOME. hmm !

Coming back to the above two option I was trying to find out what do they mean and the definition was defined as follows

image

I thought ok , let me play with these option some time later and let me restart the agent.

So I went to topology and created and updated the physical and logical agents as required .

Now I thought let me start the agent_MAIN_AGENT.bat and start again .

image

It  started . Cool ,but then I thought how about if I want to set up again another standalone agent on 20911, so I went to Topology created the Physical and Logical and called it second agent.

After doing so I made the duplicate of the agent_MAIN_AGENT.bat and called it agent_second_agent.bat  and update the required parameters

D:OracleMiddlewareOracle_ODI1oraclediagentbinagent.bat “-NAME=second_agent” “-PORT=20911”

Now I thought let me start that too and slowly the second_agent started too .

image

Now I wanted to make them as service so I was looking for agentservice.bat and I looked into the documentation and search for agent service but in vain .I even tried to bring in the Wrapper codes from ODI 10 g into 11g and make it as a service , i was successful in making the service but the conf files calls few java classes which could not be migrated since that would be complicated process.

Looks like we can only use the agentscheduler mode in windows but I can’t believe it… I will try to find out how to start it as service and publish as soon as I discovery!

See you soon!

September 15, 2010
by Cezar Santos
6 Comments

Categories: Administration , Architecture , How to , Knowledge Modules , Logic , ODI , Technology , Tips and Tricks

Tags: , , , , ,

Single Post View


11g Oracle Data Integrator – Part 5/11g – odiConsole, the new Metada Navigator

Dear Friends,

In ODI 10g we used Metadata Navigator to login which acted as Web portal to Trigger and view the listed Scenarios and also Light weight designer .

In ODI 11g we have odiconsole which can be configured using the Oracle WebLogic.This post shows step by step configuration  and initial setup to login into ODI console and setting up of Standalone agent to trigger scenarios from odiconsole.

[ Note – The Server name , Port No and other configuration used is for demonstration only and Please use the appropriate  for your environment ]

Launch the Initial configuration Wizard of weblogic.

image

Select the Following options as shown below.

image

Give a meaningful domain name.

image

Provide the Administrator User Name and Password ,required to login into domain account.

image

Select the required JDK from the options

image

Provide the details of the MASTER Repository account

image

Provide the details of the WORK Repository account

image

Click Next and test the accounts . If you have error in this step , its means the account information is wrong , Please go back and do the required changes and once the account are correct ,you will get a Test successful message.

image

Click the Following as we need to do few settings changes.

image

If required change the Listener address to the required IPaddress or hostname you want to domain to be and similarly the Port No . For this post the default is used .

image

Configure the Machine Name with Node Manager listener address and  Port

image

Assign the Server , although by default the odi_server1 is assigned but I have assigned Adminserver too so that I can access the odiconsole from 7001 port itself.

image

Make sure you check the option oraclediagent and odiconsole under Application

image

Check the JDBC  Services and odiMasterRepository and odiWorkRepository

image

Confirm all the setting and options are correct and click on Create.

image

Finally ,you will get a Domain created with the Admin Server URL . Check  mark Start Admin Server

image

Go to your Web Browser and type in the following address –http://localhost:7001/console/login/LoginForm.jsp

Change the local host  and port to whatever is listed in the Admin Server URL above .

image

Once logged in , Under Environment – > click on Servers

image

You will able to see all the Server .

image

Click on Adminserver . You will be taken to a page as shown below  , click  Deployments and you will be able to see odiconsole , oraclediagent .

image

Expand odiconsole and you will be able to see odiconsole under Modules . Click that and you will be taken to another page

image

Go to Testing tab and expand odiconsole there .ah! finally we got our url . Click the url on default.  http://localhost:7001/odiconsole

image

Once logged in you will be able to see the Master and Work Repository.

image

Use the required SUPERVISOR account to login

image

Sample Work Repository Console Screen

image

Sample Master Repository Console Screen

image

image

Here I am trying to trigger the Scenario EMPLOYEES  from odiconsole and I get the following error.

image

To Resolve the above error , go your <ODI_HOME>COMMONBIN folder and type in the following command

D:OracleMiddleware_32bitOracle_ODI_32bitcommonbin >wlst.cmd

We need to connect to the above created weblogic connection ,provide the user name , password  and url as shown in the image . [ Please find the scripts below the images  ]

image

image

Once connected , create the credential with the SUPERVISOR user account and password details

image

Finally disconnect

image

The scripts is mentioned here  , Please change accordingly.

connect(‘weblogic’,’odiexperts01′,’t3://localhost:7001′)
createCred(map=”oracle.odi.credmap”, key=”SUPERVISOR”, user=”SUPERVISOR”, password=”SUNOPSIS”, desc=”Key for Supervisor”)
disconnect()

Here the weblogic is the username , odiexperts01 is the password to login into weblogic and localhost:7001 is the  listener address and port number

In the createCred , provide your SUPERVISOR user id and password

Learn more about the above scripts here in this Oracle Link –http://download.oracle.com/docs/cd/E14571_01/core.1111/e16453/install.htm#ODING412

I triggered the same Scenario again and this time the execution was successful.

image

Successfully executed in the Operator

image

Successful execution report in odiconsole.

image

We are trying to bring more post and blog on ODI 11g to make your transition to ODI 11g as smooth as possible. Smile

Keep looking for odiexperts for  more tips , tricks on ODI 11g .

Thank you for visit us!

September 10, 2010
by Cezar Santos
7 Comments

Categories: Architecture , How to , ODI , Tips and Tricks

Tags: , , , , ,

Single Post View


Using one of ODI’s lesser-known secrets: the Common Format Designer (CFD) – by Craig Stewart

Hi Reader,

It’s a great pleasure starts a new “sector” from ODI Experts. It is our “Invited Experts” and we will start with one of the main ODI Guru in the world. Craig Stewart!!!

Thank you Craig!

Please, enjoy his post!

————————————————————————————————————————————————————————–

As I’m essentially in pre-sales, I like tools which I can use to rapidly do tasks which might otherwise take a lot of grind. Things like the Knowledge Modules in Oracle Data Integrator (ODI) are well known to take complex tasks and to make them simple – like integrating slowly changing dimensions: Simple with the IKM. One of the things which was introduced into ODI (actually into Sunopsis, before the acquisition by Oracle, was the Common Format Designer, In the latest release of ODI (11g) it is actually much better documented (even if it has not evolved much!) than in earlier versions – but what I’d like to show you briefly here is how it can be used to rapidly implement a new schema and to generate the interfaces to populate it.

To start with, let’s say I have a set of tables in my source database, in my case I’ll use MySQL. If I want to move that set of tables, with data across to Oracle, I’ll need to have a schema in Oracle where I can put the tables. In ODI’s Topology Navigator (see, I’m already using the new 11g terminology!) I need to define the Data Servers, the physical schemas and associate them with the relevant logical schemas. This is the point at which I’ll begin, I have a data model in ODI which has my “source” data defined in it:

clip_image002

I want to put this into my Oracle schema which I’ll call ORCL_TMP, so in Desgner, I create a new, empty data model in the Oracle technology for this schema:

clip_image004

clip_image006

Now I create a diagram, by using the Right-Mouse-Button on the Diagrams Node:

clip_image008

I must simply give this a name and any description, and naturally, the documentation…

clip_image010

Then, we go to the Diagram tab so we can start doing the business:

clip_image012

Now we drag & drop the datastores from our MySQL model, onto the new ORCL_TMP diagram, ODI will prompt us with a dialog box:

clip_image014

Which of course we know, and accept. The table is then added to the model, automatically using the metadata about datatype translations to construct the target table.

clip_image016

This will then show in the diagram:

clip_image018

We can then drag across additional datastores to make our model:

clip_image020

Note that in 11g, you are able to select multiple datastores and drag them across to the diagram. One drawback to this is that when referential integrity is defined, using this technique won’t get you the referential integrity, whereas if you drag one at a time, you will. It will give you all keys, indexes foreign keys as defined in the source system, and applicable in the target.

Now for some magic: if you right-mouse-button the Data Model, one of the optrions is to “Generate DDL”:

clip_image022

If we select this option, ODI will ask if we want to process tables not in the moidel (i.e. generate deletes to synchronize the two, or just to generate the delta code for the tables we have in the model. I’ll select “No” for this:

clip_image024

This will bring up a dialog where I can choose which of the differences I want synchronized:

clip_image026

If I select all, and press the OK, it will generate an ODI procedure for me in the Default Folder I entered when I defined the model:

clip_image028

I can press the “Play”/”Execute” button to get ODI to execute the generated code, which I can then follow in the Operator Navigator:

clip_image030

Often, you will get errors with the tables which contain DATE/DATETIME/TIMESTAMP fields as ODI is not always clever about translating them. In this instance I just edited the generated code to take out the TIMESTAMP(23) and changed it to TIMESTAMP. So now I have a fully created data model. The next step is to get some data moved in, so I need interfaces. ODI will of course remember where the data stores were dragged from, and to, so will generate for me an interface which just does a one-to-one mapping using the default knowledge modules:

clip_image032

I select the “Generate Interfaces In” and ODI brings up a dialog for the tables:

clip_image034

The required interfaces are then generated in that default directory:

clip_image036

I need to go into each one in order to execute it (If you try to execute without going in and saving it, you will get an error) You have to force a change, so that ODI can go through the process of saving it, which in turn makes it do some internal stuff, enabling execution. Then execute it.

Now you have data in your newly created data structure!

Craig Stewart