Thursday, February 27, 2014

Oracle Data Integrator 11g Essentials (1Z0-482) Certification available

 ODI 11g Certification available from Feb-2014.

Oracle Data Integrator 11g Essentials (1Z0-482)  :



Exam Number:    1Z0-482   

Number of Questions:    71
Passing Score:            70
Duration:           2 hours
       
Exam Price:       US$ 245

This certification covers topics such as:
Introduction to Oracle Data Integrator (ODI),
Architecture Overview,
Models and Datastores,
Project Development,
Managing Execution,
Integration with Oracle GoldenGate (OGG),
ODI Software Development Kit (SDK),
Enterprise Data Quality (EDQ) Profiling & Batch Processing.    

For more details check the below path:

http://www.oracle.com/partners/en/most-popular-resources/dataintegrator-11g-ic-exam-2005763.html



Wednesday, February 26, 2014

How To Retrieve ODI Context Information In A Jython Technology Specific Procedure ?

How is it possible to determine the characteristics of an ODI Context from a Jython Procedure?

The following are records from a Jython script which has been created in a Jython technology specific Procedure

Command on Target tab:
Technology field - Jython
Command field
context = '<%=snpRef.getSession("CONTEXT_NAME")%>'
src_con_name = '<%=snpRef.getInfo("SRC_CON_NAME")%>'
src_java_url = '<%=snpRef.getInfo("SRC_JAVA_URL")%>'
src_encoded_pass = '<%=snpRef.getInfo("SRC_ENCODED_PASS")%>'
Command on Source tab:

Technology field - set the technology on which the Logical Schema was created
Schema field - set the Logical Schema

Displaying ODI Variables Values In ODI Operator Log

Is there any technique whereby it is possible, in the ODI Operator Log, to display the values of ODI Variables which have been initialized from runtime parameters when launching Scenarios?
Such a technique would allow the recording of Variable values during runtime and would be useful for execution audit operations.

Two alternative solutions are possible:

In the case of OdiStartScen (SnpsStartScen) tool, it is possible to specify the name of the Session with the "-SESSION_NAME" parameter. In this case, pass the value of the ODI Variable to this parameter for display in ODI Journal.

A Jython script step such as the following, in a Knowledge Module, will allow the display of the ODI Variable value in the Execution tab of the step :
a = 'Table = '+ '#YOURVARIABLE'
raise(a)

Such a Jython script will require the "Ignore errors" checkbox to be checked in the Knowledge Module step. Do not forget that such an Integration Interface must be called from an ODI Package including steps which Declare and Refresh the ODI Variable.

Variable values cannot be displayed in this case because the Agent records data in ODI Operator Log before the ODI process that substitutes Variables by their values, and before sending the values to the technology be be directly used or bound.

Recuperating Bind Variable Values In ODI Jython Scripts

Is it possible to set up an ODI Specific Procedure and, using the bind mechanism, pass values from the Source tab to the Target tab Jython script? This is possible.
For example:
Command on Source tab (any Database technology):
select first 10 distinct to_char(d_evnm,'%m/%d/%Y') my_date
from <%=snpRef.getObjectName("L","<my_table>","D")%>
order by 1 
Command on Target tab (Jython technology):
s = '#my_date'
print s

This Specific Procedure will the call the Jython script for as many times as the number of values generated from the 'select' request. Each Jython script run will have its uniquely specific "mydate" value.

Using ACTIVE and PASSIVE Exchange Modes With FTP From ODI Using Jython

Is it possible to use both ACTIVE and PASSIVE FTP modes from ODI  ?

As might be expected, ODI is as sensitive to network policy issues as other software tools.

In particular, firewall policies must be taken into consideration, therefore, when implementing ODI and especially when setting up multi-site configurations which use bandwidth overs WANs or extended LANs to communicate and exchange files.

One particular case that must be highlighted is the use of the Jython SnpsFTP method used in ODI Specific Procedures to exchange files over FTP.

To explicitly use ACTIVE mode exchange, the following call must be added to the Procedure:
snpsftp.setpassive(0)

How To Insert Root Level Elements With ODI XML Driver?

Is there any way of inserting ROOT level XML Elements when creating an XML file with the ODI XML Driver ?

For example, is it possible to insert the following XSL declaration :
<?xml-stylesheet type="text/xsl" href="<stylesheet>"?>
into the XML file at the appropriate position ?

In the current version of the XML Driver, there is no way of doing such an operation.

A possible workaround is to use Unix shell scripts or Jython code to manipulate files and add the appropriate lines to the ODI generated XML file.
There is no way of doing such an operation. A possible workaround is to use Unix shell scripts or Jython code to manipulate files and add the appropriate lines to the ODI generated XML file.

Escaping < ? ... ? > Tags in Jython scripts

When developing a Jython script which manipulates strings containing tags similar to those used by ODI such as:

xmlString.append('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')

ODI interprets the <? strings as its own private tags and is unable to continue processing.
Is there any way of "escaping" these strings so that no interpretation errors are signaled ?
When manipulating '<?' and' ?>' tags (in cases where XML files are to be created) in Jython scripts from ODI Specific Procedures based on the Jython technology, ODI treats them as its own specific Java tags and, as a result, cannot compile the program.

Troubleshooting either:
    • prefix each ? with the $ character (ie '<$?' and '$?>').
    • use the Unicode or hexadecimal representations (ie '<\u003F' and '\u003F>'; or <\x3F' and '\x3F>').
    • use an ODI Variable.

'IOError: File not found' Message When Specifying Filepaths With Jython Scripts Launched From ODI Jython Technology Specific Procedures

'IOError: File not found' Message When Specifying Filepaths
With Jython Scripts Launched From ODI Jython Technology Specific Procedures




When accessing a file with Jython in an ODI Specific Procedure, the following message is displayed in the execution tab of ODI Log :
IOError: File not found - <full file name>

However, the file does indeed exist and the filepath has been correctly hardcoded into the Jython script. What is the problem here ?

When specifying extended filepaths for files under Windows operating systems, the use of backslashes in the filepath may be problematical.

It is strongly recommended to use forward slashes ('/') in operating system filepath specifications in Jython scripts launched from ODI Specific Procedures on Jython Technology.

For example :
C:/tmp/myfile.txt
/home/myapplication/myfile.txt

Jython code on the Source tab of an ODI Procedure

Jython code on the Source tab of an ODI Procedure

In an ODI Procedure, is it possible to execute Jython code on the "Command on Source" tab?

Yes this is possible.

javax.mail.MessagingException: Could not connect to SMTP host in ODI sentmail

1. Check if the SMTP server is working by trying to connect from server where the Weblogic Server is running to the server where is the SMTP mail server is installed and send an mail.

Here are steps to check:
bash-2.05$ telnet <your mail server> 25
Trying 127.0.0.1...
Connected to server.
Escape character is '^]'.
220 server ESMTP Exim 3.35 #1 Wed, 07 May 2003 11:27:45 +0100


HELO eMonster
250 server Hello emonster [127.0.0.1]

MAIL From:<Sender email address>
250 <your email address> is syntactically correct

RCPT To:<Receiver email address>
250 <Receiver email address> is syntactically correct

DATA
354 Enter message, ending with "." on a line by itself
This is a test email

From,
Enter some text ....
.
250 OK id=19DMAH-0003tv-00
^]
telnet> quit
Connection to server closed.
bash-2.05$

2. You need to set a host name and IP Address in /etc/hosts.
3. You need to check if a server port  is correct.
4. Current server and port values you can find in oms-config.xml.


Reference: Cannot Send Email: Javax.mail.MessagingException: Could Not Connect To SMTP Host (Doc ID 1280242.1)

Send mail using Jython Script using Procedure in ODI

import smtplib
import string
BODY = string.join((
"From: %s" % 'senderemailaddress@gmail.com',
"To: %s" % 'recipientemailaddress@gmail.com',
"Subject: %s" % 'Test Mail',
"",'This is a test email from ODI'
), "\r\n")
sender = smtplib.SMTP('smtp.gmail.com',587)
sender.set_debuglevel(1)
sender.ehlo()
sender.starttls()
sender.ehlo()
sender.login('senderusername', 'senderpassword')
sender.sendmail('senderemailaddress',['recipientemailaddress'],BODY)
sender.close()