Skip to content

September 23, 2009
by kdevendr
16 Comments

Categories: Architecture , Logic , ODI , Tips and Tricks

Tags: ,

Single Post View


AUTOMIZE ODI REPOSITORY EXPORTS

This Post defines the simple process on how to setup automatic  daily backup of ODI Master and Work Repository. This process is especially important where there is no backup or improper schedule backup is carried out by DBAs.

Steps

Export Master Repository using ODIEXPORTMASTER
Export Work Repository using ODIEXPORTWORK
Refresh the Variable SYSDATE
Delete the Required day files using ODIDELETEFILE
Finally Send Mail for notification ( optional)

ODIEXPORTMASTER

Provide your target directory and give the zip file_name as

MASTER_REP_BACKUP_<%=odiRef.getSysDate(“dd-MM-yyyy”)%>.zip

This way Exported Master Repository is saved with Meaningful Filename and Date of the backup.

ODIEXPORTWORK

Repeat the above process for ODIEXPORTWORK

Provide your target directory and give the zip file_name as

WORK_REP_BACKUP_<%=odiRef.getSysDate(“dd-MM-yyyy”)%>.zip

Sample output of the above files.

Creating daily such Exports of  Repository won’t be an ideal solution,  so its good to delete the old archive and keep just two days of archive .

To do so , Please follow these simple steps.

Create a variable named ‘SYSDATE’ and write a following query

Here iam using -2 as i want to keep just two days of files and delete all the previous day files.Change this value according to your need.

ODIFILEDELETE

Call ‘ ODIFILEDELETE ‘ to delete the required files.

The Filename ‘ *_#SYSDATE.zip ‘ will delete the required day file. so if the sysdate is 23-09-2009 , the above command will delete 21-09-2009 files.

This simple procedure would enable you to have a simple backup of the Master and Work Repository especially in condition where there is no proper backup of Development database or backup is not being carried out at proper interval.

Schedule the Package using ODI Scheduler and schedule it accordingly and add odisendmail for any success or failure notification.

[ Note : No write permission should be given any ODI developer in the Archived Folder so that no one deletes the above file accidentally or corrupt them with improper handling. Only ODI should be have write access to this Folder]

If any error occurred and you are not being able to recover the Database or Repository ,these backup files can come into handy and using the right Import procedure the whole Development box can be brought back to action. Please keep looking into future post  of  ‘ odiexperts.com ‘ for how to do a proper Import without affecting objects Internal Id .

September 23, 2009
by kdevendr
1 Comment

Categories: ODI

Tags: ,

Single Post View


Informix Connection

To download the Latest driver for Informix, please visit here

http://www14.software.ibm.com/webapp/download/search.jsp?go=y&rs=ifxjdbc

There is also a driver present for Informix in ODI

Driver Name – IBM Informix JDBC Driver
JDBC Driver – com.informix.jdbc.IfxDriver
JDBC URL -jdbc:informix-sqli://165.202.560. 369:1576:informixserver=infxdw;database=ftp

URL Parameters:

<host>: server network name or IP address. < 165.202.560.369 >
<port>: server port number. < 1576 >
<server name>: name of the Informix server < infxdw >
<dbname>: Informix database name <ftp>
<property>=<value>: Connection properties. Refer to the driver’s documentation for a list of available properties.

September 23, 2009
by kdevendr
6 Comments

Categories: ODI , Technology

Tags: , , ,

Single Post View


SQL Server connection

Connecting Oracle Data Integrator and MS SQL Server

1. Refer to this Download link for Microsoft SQL Server 2005 JDBC Driver 1.2

http://www.microsoft.com/downloads/details.aspx?FamilyId=C47053EB-3B64-4794-950D-81E1EC91C1BA&displaylang=en

and for Microsoft SQL Server JDBC Driver 2.0 here

http://www.microsoft.com/downloads/details.aspx?familyid=99B21B65-E98F-4A61-B811-19912601FDC9&displaylang=en

JDBC Driver 1.2

Extract the downloaded .exe or .gz and copy jar file ” sqljdbc.jar” into the $ODI_HOMEDRIVERS folder

Now go to the topology and Under the Physical architecture of Microsoft SQL Server. Define a New Data Server with the required Name , User connection.

Go the Next JDBC tab , enter the JDBC Driver and JDBC Url

JDBC Driver : com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC Url : jdbc:sqlserver://<Server address> :<Default port=1433 >selectMethod=cursor
JDBC Url : jdbc:sqlserver://<Server address> :<Default port=1433 >selectMethod=cursor;responseBuffering=adaptive

The above command works great with both SQL Server 2005 and for SQLServer 2000 try this

JDBC Driver : com.microsoft.jdbc.sqlserver.SQLServerDriver
JDBC Url : jdbc:microsoft:sqlserver://<Server address> :<Default port=1433 >selectMethod=cursor

Learn more about option like selectMethod=cursor and responseBuffering=adaptive here http://msdn.microsoft.com/en-us/library/bb879937.aspx and other connection strings here http://msdn.microsoft.com/en-us/library/ms378428.aspx.

To learn more about the Url Option check the ” Release ” document available with extracted .exe or . gz

Click Test to test the connection and Select the appropriate database and owner for Physical Schema and define the appropriate Logical Schema.

Note for ‘ Owner ( Schema )‘ Select the right owner of the database , mostly ” dbo ” . check with your SQL Server DBA for right schema owner

For the Work schema owner , the right user who have permission to access the schema has to be selected.

JDBC Driver 2.0

JDBC Driver ver 2.0 works only with JDK or JRE 1.5 or greater and as ODI is shipped with 1.4 so you would surely encounter the error.

To Resolve this issue download Jdk or Jre 1.5 or greater and change the ODI_JAVA_HOME accordingly and point to the new JAVA_HOME,

Sql Server JDBC Driver is shipped with both ‘sqljdbc‘ and ‘sqljdbc4‘ .To use JDBC Type 4 driver copy only ‘ sqljdbc4‘ in the ‘ oracledi/drivers ‘ folders .

[ Note : Please refer to the release document – point number 1 under Known Issues ]

Copy the ‘ sqljdbc4 ‘driver and test the connection. Restart the agent and try the same Driver and URL as shown above and refer to its ‘ Release ‘ document for more details.

Learn more about  SQL JDBC driver from your extracted driver folder at  ‘ enuhelpindex.html ‘ or access all these information online http://msdn.microsoft.com/en-us/library/ee229547%28SQL.10%29.aspx

September 23, 2009
by Cezar Santos
2 Comments

Categories: Architecture , ODI

Tags: , , , , ,

Single Post View


Repository Architecture – Two or more Masters – Part 3

Hi Friends,

I got some emails and comments asking for publish about how to work with more then one Master Repository and, you will see, it isn’t so complicated.

I will use, as base, the post  Repository Architecture – Just one Master – Part 2 to show to have a multiple Master Repositories environment.

First:

Question: Why to have 2 or more Masters Repositories?

Answer: When there is any restriction, physical or by policy, about contacting between environments, i.e. Development Environment has no physical connection with Production. Very common architecture to financial institutions like banks.

Take a look in the following image, we will discuss it: 

Three environmnets with no connection between them

Three environments with no connection between them

Here is how it will work:

  1. Development
    • One Master Repository (MR)
    • One Development Work Repository (DWR)
    • ODI modules – Designer and Operator – are used to developing, tests and log view
    • Topology has only connections to development database (source and target)
    • CENTRAL POINT OF ARCHITECTURE: ALL LOGICAL SCHEMAS AND LOGICAL AGENTS NEED TO BE DEFINED EXACTLY AS WILL BE DEFINED IN THE OTHERS ENVIRONMENTS
  2. Test
    • One Master Repository (MR)
    • One Execution Work Repository (EWR)
    • Operator will be used to import and export scenario and to create scheduling process
    • Metadata Navigator will be used to test (manual execution from Business Analysts)
    • Topology has only connections to test database (source and target)
    • CENTRAL POINT OF ARCHITECTURE: ALL LOGICAL SCHEMAS AND LOGICAL AGENTS NEED TO BE DEFINED EXACTLY AS WILL BE DEFINED IN THE OTHERS ENVIRONMENTS
  3. Production
    • One Master Repository (MR)
    • One Execution Work Repository (EWR)
    • Operator will be used to import and export scenario and to create scheduling process
    • Metadata Navigator will be used to log view and manual execution from Final Users (when necessary)
    • Topology has only connections to test database (source and target)
    • CENTRAL POINT OF ARCHITECTURE: ALL LOGICAL SCHEMAS AND LOGICAL AGENTS NEED TO BE DEFINED EXACTLY AS WAS DEFINED IN THE OTHERS ENVIRONMENTS

 

About the “CENTRAL POINT OF ARCHITECTURE”

ODI works with Logical Objects (Schemes and Agents) to separate the developing from “physical ” changes, I mean, changes of IP, User, Password, hardware, etc.

Using this concept, once exactly the same Logical objects are declared (created) in the three environments, it is absolutely possible to migrate scenarios from Development to Test to Production.

The connection and agents (physical objects) created at Topology can be, with no problem, created each one in its respective environment with its own parameters once they will be different once each one go to distinct hardware. I mean, no ODI import/export is necessary for physical objects.

An other possible question is “Why there is just one Development Work Repository?” but this one I will answer in my next post. 😉

I hope to have helped you to obtain more knowledge about ODI Repositories.

See you soon!

Cezar Santos

September 21, 2009
by kdevendr
3 Comments

Categories: Knowledge Modules , ODI , Reports , Tips and Tricks

Single Post View


Report of list of KMs in each Interface

This query lists all the KMs used in each Interfaces under a particular Folder or Project with Interface  Name , Interface Type ie. Permanent_Interface (Blue) or Temporary_Interface (Yellow) ,LKM , IKM , CKM and Source Set Number since there can be multiple Sources feeding a single target in an Interface.

SELECT SP.pop_name AS INTERFACE_NAME ,
CASE WHEN SP.WSTAGE=’E’ THEN ‘TEMP_INTERFACE’
ELSE ‘PERM_INTERFACE’
END AS INTERFACE_TYPE,
NVL(STL.trt_name,’None’) AS LKM_USED ,
NVL(STI.trt_name,’None’) AS IKM_USED ,
NVL(SSS.src_set_name,’None’) AS INPUT_SET_NAME ,
NVL(STC.TRT_NAME,’NONE’) AS CKM_USED
FROM snp_pop SP
LEFT OUTER JOIN snp_src_set SSS
ON SP.i_pop = SSS.i_pop
LEFT OUTER JOIN snp_trt STL
ON SSS.i_trt_klm = STL.i_trt
LEFT OUTER JOIN snp_folder SF
ON SP.i_folder = SF.i_folder
LEFT OUTER JOIN snp_trt STI
ON STI.i_trt = SP.i_trt_kim
LEFT OUTER JOIN SNP_TRT STC
ON stc.i_trt = SP.I_TRT_KCM
LEFT OUTER JOIN snp_project SPJ
ON SPJ.i_project = SF.i_project
WHERE SF.folder_name = ‘<FOLDER_NAME>’
AND spj.project_name = ‘<PROJECT_NAME>’
ORDER BY SP.pop_name, SSS.src_set_name;

Sample Output

image

September 21, 2009
by kdevendr
9 Comments

Categories: ODI , Technology

Single Post View


Connecting openLDAP

In Hyperion EPM 11 , authentication information is stored in openLDAP .

To get more information for the Hostname , port name , log into your Hyperion Shared Service console and under ‘ Administration ‘ click on ‘ Configure User Directories ‘

Configure User Directories

Provider Configuration

Click ‘ Edit ‘ on the ‘ Provider Configuration‘ and check for the other details required for setting up the connection for openLDAP in ODI

Right click on LDAP Technology and ‘ Insert Data Server ‘ and for User -enter the above ‘user DN – ‘ cn=root,dc=css,dc=hyperion,dc=com ‘

Here cn=root , the main root user who have all privilege to read all the data from OpenLDAP .

Select the Sunopsis JDBC Driver for LDAP

JDBC URL –

jdbc:snps:ldap?ldap_url=ldap://<host>:<port>/&ldap_basedn=<base_dn>[&<property>=<value>…]

jdbc:snps:ldap?ldap_url=ldap://localhost:28089/&ldap_password=KLLEJMNLKFLBKLKODDGPGPDB&ldap_basedn=dc=css,dc=hyperion,dc=com

<host>: LDAP server network name or IP address. – < localhost >

<port>: port number the LDAP server is listening on. < 28089 >

<base_dn>: base DN to connect to. < dc=css,dc=hyperion,dc=com >

Encode the password using this command

The Default Password for OpenLDAP is ” security “

To encode the password , run this command

java -cp E:OraHome_1oracledidriverssnpsldapo.jar com.sunopsis.ldap.jdbc.driver.SnpsLdapEncoder <enter password here>

If your password is not changed and also the User DN is same then you can use this JDBC url ,just change the localhost to your hostname

jdbc:snps:ldap?ldap_url=ldap://localhost:28089/&ldap_password=KLLEJMNLKFLBKLKODDGPGPDB&ldap_basedn=dc=css,dc=hyperion,dc=com

September 20, 2009
by Cezar Santos
9 Comments

Categories: Architecture , Logic , ODI , Tips and Tricks

Tags: , , , ,

Single Post View


How to call a Web Service that start an ODI Scenario and waits its complete execution

Hi friends,

I just created this technique because I was in a POC (Prove of Concept) and needed to call a WS (Web Service) but the WS must wait the scenario execution until the end and, too, receives a return (OK or Not OK).

As is from common knowledge , calls the ODI web service for scenario execution only starts a scenario but doesn’t “wait” the scenario execution. The response just indicates that the process was started, not if it finish with or without error.

This behavior is absolutely normal once a scenario could take hours to finish and WS aren’t done for that.

However, as a programmer, it ‘s always good to break the rules!

What I’m about to show is very simple and easy. The technique was designed to work with Oracle.

Recipe:

Ingredients
 
1 ODI scenario (from any developed process)
1 Oracle Database with the following packages compiled :
 http://www.oracle.com/technology/tech/java/jsp/pdf/calling_shell_commands_from_plsql_1.1.pdf
1 “Temporary” table created just for be called for a WS . This table should have the same number of columns as the ODI scenario parameters or at least one column of any datatype if the scenario doesn’t receive parameters.
1 Trigger in the temporary table

 

How to do:
1º) Publish a web service to insert data into this temporary table (Called  Temp_Table from now forward)
You can do that from ODI using a SKM (Service knowledge Module)
2º) Be sure about to have followed all instructions from Oracle document (link at ingredients)
3º) Create a trigger on Temp_Table like:

 

create or replace TRIGGER Staging_Area.TG_WS
BEFORE INSERT ON ODISA.TEMP_TABLE
FOR EACH ROW
DECLARE
  
   v_Ret varchar2(500);
BEGIN
      v_Ret := os_command.exec(‘startscen ANY_SCENARIO 001 MY_CONTEXT -v=3 -NAME=Agent_Windows MY_PROJECT.vParameter1=’||:new.MY_TEMP_TABLE_COLUMN1 ||’ MY_PROJECT.vParameter2=’||:new.MY_TEMP_TABLE_COLUMN2;
 
      if v_Ret<> ‘0’ then  /* zero is the return code for OK */
         RAISE_APPLICATION_ERROR(‘-20001’, ‘ ODI Error : ‘||v_Ret, FALSE);
      end if;
      
END;
4º )  MIX EVERYTHING and call the WS.
The PL/SQL code at trigger will execute the scenario and waits for a response if the ODI scenario finish with or without error.

Well my friends, here we have a way to start a scenario from WS and got a OK or KO return. Keep in mind that it is a trick to add a characteristic doesn’t present at ODI in the current version.

See you around!

Cezar Santos

September 13, 2009
by kdevendr
2 Comments

Categories: Logic , ODI , Tips and Tricks

Single Post View


Processing multiple Interface through single Package

The Steps are as follows

1. Get the File list into the  ODI Procedure ( ‘ GENERATING LIST OF SCENARIO ’)
2. Assign the Loop to Zero ( LOOP=0)
3. Get the Next Scenario of the Interface  to be processed
4. Process the Scenarios using  ‘ ODISTARTSCENARIO ‘  by passing the value from #GET_SCENARIO  variable
5.  Refresh the Variable ‘ Check ‘
6. Check if there are still  scenarios of the Interfaces  to be processed or not. If so Next step , else Exit .
7. Increment the Loop by 1.

The Package Flow is shows below in this Image.
image

ODI Procedure to get list of scenarios.

image

DROP TABLE <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.SCENARIOS

CREATE TABLE <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.SCENARIOS
(S_NO NUMBER(3),SCEN_NAME VARCHAR2(50))

INSERT ALL
INTO  <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.SCENARIOS  VALUES (1,’AGE_GROUP’)
INTO  <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.SCENARIOS  VALUES (2,’FILE_FLOW’)
INTO  <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.SCENARIOS  VALUES (3,’FILE_LIST’)
SELECT * FROM DUAL

Variable  #GET_SCENARIO

image

For Scenario Name i have used the  #GET_SCENARIO  so i get the value of the next scenario to be processed

GET _SCENARIO VARIABLE QUERY

Here iam getting the values of the scen_name from the temp table created using ODI_procedure as mentioned above.

SELECT SCEN_NAME FROM <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.SCENARIOS
WHERE S_NO=#LOOP

CHECK VARIABLE QUERY

Here iam checking at every step if there is any other Scenario left out to be processed or not.

SELECT COUNT(*)-#LOOP  FROM  <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.SCENARIOS

[ Note – Please see my post – Multiple File – single Interface on variable usage and options ,and my Post Generating Multiple Scenarios on how to generate multiple scenarios for Interfaces ]

September 13, 2009
by kdevendr
9 Comments

Categories: Logic , ODI , Tips and Tricks

Single Post View


Multiple Files – Single Interface

Some time you want to update a single table from different Flat File Sources.

This post shows how to carry out such logic with the assumption all the file are stored in a single directory and they all have the same structure and file formatting.

I have implemented this using two option

1. Using a Temp Data store

2. Using Procedure.

Variable Used

LOOP USED TO ASSIGN AND INCREMENT  NO OF TIME FLOW HAS TO BE PROCESSED
GET_INTERFACE SOURCE FILE TO BE PROCESSED BY INTERFACE
CHECK USED TO CHECK WHETHER ALL FILES ARE PROCESSED OR NOT AT EVERY LOOP

All the variable are Alphanumeric and Historize property.

Using Temp Data store

Temporary Interface – FILE_LIST

Get the list of files in the Temporary Datastore  in Work schema, so that we can process Interface sequentially based on the list of files.

image

Next Step is to Assign the variable  ‘ LOOP ‘ = 0 (Zero )

image

image

Next Step is to get the File Name to be processed the Interface . Refresh the Variable.

image

image

image

Apply the required query so it fetches the next record in the loop.

Here iam getting the ‘ File name ‘ to be processed based on the Loop Number so the First loop will fetch the First file , second loop next file and  keep doing so for others.

SELECT  FILE_NAME FROM <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.FILE_LIST
WHERE S_NO=#LOOP

The Next step is to use that File and process the Interface. Here in the Model i have used the  ‘ Resource Name – #GET_INTEFACE ‘ as i want to get  the right file for processing.

image

image

image

Next Step is to Refresh the Variable ‘ Check ‘ ,which checks if all the interface is been processed or not.

image

image

In this Step iam checking whether all the interface is been processed or not.

image

image

The logic is pretty simple to subtract the Loop value from the Total count , so if i have  10 files  in the first loop i would have

Count(*) = 10

Loop        = 1 so remaining interface 10-1 =9 to be process and when its Zero i stop the Flow .

SELECT COUNT(*)-#LOOP  FROM  <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.FILE_LIST

Next Step is to increment the Value of  ‘ LOOP’  as there are still interface to be processed.

image

image

This is summary of  the overall flow.

1. Get the File list into the Temporpary Datastore ( ‘FILE_LIST’)
2. Assign the Loop to Zero
3. Get the Next File to processed.
4. Process the Interface by passing the value from #GET_INTERFACE  variable
5.  Refresh the Variable Check
6. Check if there are still  Files to be processed or not. If so Next step , else Exit .
7. Increment the Loop by 1.

image

Using ODI Procedure

You can perform the above logic , using an ODI Procedure , instead of a temporary datastore.

I personally would prefer this method as its easy to maintain and modify when required.

The steps are very simple and as follows.

1. Drop the Temporary Table.
2. Create the Temporary table in the Work Schema.
3. Insert the Required File and Values.

image

image

image

DROP TABLE <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.FILE_LIST

image

CREATE TABLE <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.FILE_LIST
(S_NO NUMBER(3),
FILE_NAME VARCHAR2(50))

image

INSERT ALL
INTO  <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.FILE_LIST VALUES (1,’FILE1.TXT’)
INTO  <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.FILE_LIST VALUES (2,’FILE2.TXT’)
INTO  <%=odiRef.getInfo(“DEST_WORK_SCHEMA”)%>.FILE_LIST VALUES (3,’FILE3.TXT’)
SELECT * FROM dual

image

[ Note : Please note its a best practise to use a  unique work_schema and use in all the Physical schema defination . I have used a common work_schema called ‘ WORK_SCHEMA’  , so when i create all the temporary data store or procedure they are all in the Temporary work schema ‘ WORK_SCHEMA’ . The other good point will be that if any error occurs during the Interface  and due to some reason the temporary objects like C$_,I$_ etc dont get dropped and they will be seen in the main table.]