Hi Guys,
Another really usefull tip about data types!
There are some time it happens we don’t have the required data type in respective Technology in ODI say for example DATETIME YEAR TO DAY ,DATETIME YEAR TO SECOND etc and so when we do a Selective reverse or RKM we don’t get the correct data type listed causing which we get the Null data type or get assigned to String .
The other simple solution if you are particular in getting the data type listed in Model . Here are the steps to Manually add the data type in Topology and create the respective conversation syntax.
Step1 . Go to the Respective data type and right click and Insert Data type or Duplicate an already existing datatype
Step2. Provide the required code and syntax

Step 3 . Provide the required converted To and Converted From detail for the Technology you are going to Work with . Lets say my target will be Oracle in that case , I have assigned to Timestamp .

Easy and Simple solution in dealing with Data types missing.
Any comments???
It’s our pleasure to have you here, at www.odiexperts.com
GD Star Rating
loading...
Posted: August 28th, 2010 |
Author: Kshitiz Devendra |
Filed under: Administration,
Common Errors,
How to,
Logic,
ODI,
Technology,
Tips and Tricks |
Tags: Data Type,
ODI,
ODI Adminstration,
ODI Experts,
Oracle Data Integrator,
Topology |
Comments: No Comments »
Hi Friends,
Right now I’m in São Paulo airport waiting for a flying that is very delayed! With some time free, let me write about something that I want to publish there is a long time….
Surprise! Isn’t an Oracle Data Integrator issue! hehehehehehe……
I really like to work with ORACLE RDBMS but doesn’t exist a “Is Number” function is, in my opnion, a lack of funcionality that I can’t understand.
Every time that is necessary to check if the returned value from a column (or a substring from it ) is number, I created a database (PL/SQL) function that return true or false and then uses it in the query.
In this way works, but if I want to do the same in a Microsoft SQL Server, there is a “native” function to do it.
The big problem is that, sometimes, you don’t have an user that can create PL/SQL procedures and, then, you can’t do this type of validation.
For solve this, I created the following technique:
A single SQL query that can return if a column is number or alphanumeric
select case when trim(TRANSLATE('1234f','0123456789', ' ')) is null
then 'numeric'
else 'alpha'
end
from dual
Where ’1234f’ should be substituted by the column that you wish to validate.
The principle is very simple, if the numbers from a string are removed and the result is different of null then the string isn’t numeric. The Trim funcion eliminates any remained space.
Plus, it is pretty usefull when there some non-visible ASCII char in a column.
Well, I couldn’t let to show a use of this in ODI.
When there is a text file to be loaded and it is necessary to check (CKM) if the columns are with the right data (thru ODI constraint) this single query can send to the error table (E$) any record that has the wrong data.
See you around!
GD Star Rating
loading...
Posted: August 26th, 2010 |
Author: Cezar Santos |
Filed under: How to,
Logic,
ODI,
SQL,
Tips and Tricks |
Tags: ODI,
ODI Constraint,
Oracle Data Integrator,
Oracle Is_Number function,
Sql,
Sunopsis |
Comments: 2 Comments »
Hello all,
OdiSqlUnload is a great utility for unloading but then we need to hardcoded and provide the parameters of the username and password which can change in the Other Environment in ( Testing , UAT or Prod ) . Here is a small trick to handle that situation.
In the Command on Source, Select the Required Technology and Schema name .
Copy the Syntax of the OdiSqlUnload into an ODI procedure into Command on Target with Sunopsis API as the Technology
OdiSqlUnload “-FILE=” “-DRIVER=<%=odiRef.getInfo(“SRC_JAVA_DRIVER”)%>” “-URL=<%=odiRef.getInfo(“SRC_JAVA_URL”)%>” “-USER=<%=odiRef.getInfo(“SRC_USER_NAME”)%>” “-PASS=<%=odiRef.getInfo(“SRC_ENCODED_PASS”)%>” “-FILE_FORMAT=VARIABLE” “-FIELD_SEP=,” “-ROW_SEP=\r\n” “-DATE_FORMAT=yyyy/MM/dd HH:mm:ss” “-CHARSET_ENCODING=ISO8859_1″ “-XML_CHARSET_ENCODING=ISO-8859-1″ “-FETCH_SIZE=5000″ “-QUERY=select * from QUERY”
This way ODI will automatically get the parameters from the topology and also use the Fetch_Size 5000 for good performance .
Also look into this post for generating header in OdiSqlUnload – http://odiexperts.com/?p=1845
Just a small trick . Look for more ideas at odiexperts.com
GD Star Rating
loading...
Posted: August 25th, 2010 |
Author: Kshitiz Devendra and
Cezar Santos |
Filed under: How to,
Logic,
ODI,
Tips and Tricks |
Tags: hardecoded password,
ODI,
ODI connection,
ODI Experts,
odisqlunload,
Oracle Data Integrator,
Sunopsis |
Comments: No Comments »
Hi People,
There is a “bug” in Oracle Data Integrator that doesn’t clean the SNP_EXP_TXT when the “parent” records are deleted.
That happens because, in the repository data model, there is no FK between the SNP_EXP_TXT and its several parents table exactly because they are several.
This situation can bring a huge increase of records and, the most of then, absolutely useless. I already see environments with more than 50 millions of records and with less than 100 k useful…
A consequence of this behavior could be a very slow answer when try to acess objects from Designer and/or Operator. That is very commom.
To solve, all you need is just execute the following DML (NOT TESTED ON 11G, ONLY FOR 10 version):
WARNNIG: THIS IS A DML AGAINST ODI WORK REPOSITORY TABLES. ONLY EXECUTE IT WITH ALL TABLES IN UNION SUB-QUERY. IF NOT, YOU CAN DELETE VALID RECORDS AND SEVERLY DAMAGE YOUR ODI INSTALATION UP TO UNRECOVERY STATE.
delete snp_exp_txt
where not exists
(select 0
from ( select distinct I_TXT_TASK_MESS I_TXT
from SNP_SESS_TASK_LOG
union all
select distinct I_TXT_SCEN I_TXT
from SNP_SCEN
union all
select distinct I_TXT_SESS_MESS I_TXT
from SNP_SCEN_REPORT
union all
select distinct I_TXT_DESCRIPTION I_TXT
from SNP_SCEN_FOLDER
union all
select distinct I_TXT_SESS_MESS I_TXT
from SNP_SESSION
union all
select distinct I_TXT_SESS_PARAMS I_TXT
from SNP_SESSION
union all
select distinct I_TXT_STEP_MESS I_TXT
from SNP_STEP_REPORT
union all
select distinct I_TXT_STEP_MESS I_TXT
from SNP_STEP_LOG
union all
select distinct I_TXT_VAR I_TXT
from SNP_VAR_SESS
union all
select distinct I_TXT_DEF_T I_TXT
from SNP_VAR_SESS
union all
select distinct I_TXT_VAR I_TXT
from SNP_VAR_SCEN
union all
select distinct I_TXT_DEF_T I_TXT
from SNP_VAR_SCEN
union all
select DISTINCT I_TXT as I_TXT
FROM SNP_TXT
union all
select DISTINCT I_TXT_VAR_IN as I_TXT
FROM SNP_VAR
) as UNION_TABLES
where UNION_TABLES.I_TXT = snp_exp_txt.I_TXT )
This is an Oracle DB query, adapt it for you Work Repository technology.
You can, either, create a Topology to Work Repository and use an ODI Procedure to schedule this DML once a month, for instance!
As always, comments are welcome!!
Talk to you soon, friends!
GD Star Rating
loading...
Posted: August 19th, 2010 |
Author: Cezar Santos |
Filed under: Administration,
Architecture,
Common Errors,
ODI,
ODI Bug,
Tips and Tricks |
Tags: ODI,
ODI Adminstration,
ODI Experts,
ODI Procedure,
Oracle Data Integrator,
repositories,
repository,
SNP_EXP_TXT |
Comments: 6 Comments »
Hello Dear Readers
Nothing better to start our analysis that the real first step to start an Oracle Data Integrator 11g environment. It’s means REPOSITORIES!
The visual interface is all new but the functionality is just the same… I liked this new interface to create “ODI things” once it’s just one place to do all.
The big difference from 10g version is that, now, is possible to define a “external user validation” since the Master Repository creation. Pretty good to security protocols!
Let’s show you the screen and process to create the repositories… it will allow all of you to see the new design and learn how to manipulate it:
When you First Login to ODI Studio, you will see an option to connect to Repository.
Creating Master Repository
File – > New -> Master Repository Creation Wizard



For this post we are going with ODI authentication , the default SUPERVISOR password is still SUNOPSIS.

Click Finish for ODI to create the required Master Repository. Once completed Login into Topology.

Click Connect to Repository and furnish the required information,similar to 10g

Creating Work Repository
Once logged in , Go to Repositories and Right click on Work Repositories - > New Work Repository



You can specify the password for ODI Work Repository , as any one trying to open the Work Repository need to enter the password created now.


Provide the ID and Name of the Work Repository and click Finish and once created .

Click Connect to Repository and provide the necessary details and also selec the Work repository and once done Login into Designer.


Well guys, as you can see, it’s not so different from previous version but, in my opinion, looks really better!!!!!
See you all in the “3/11g post”
GD Star Rating
loading...
Posted: August 5th, 2010 |
Author: Cezar Santos |
Filed under: Administration,
Architecture,
How to,
ODI,
Tips and Tricks |
Tags: Create Master Repository,
Create Work Repository,
ODI,
ODI Experts,
ODI repository,
Oracle Data Integrator,
Oracle Data Integrator 11g,
repositories,
repository,
Sunopsis |
Comments: No Comments »