OWB 11gR2 – JDBC Helper Utility

Posted by David Allan on Oracle Blogs See other posts from Oracle Blogs or by David Allan
Published on Thu, 03 Mar 2011 21:04:10 -0800 Indexed on 2011/03/04 7:29 UTC
Read the original article Hit count: 325

Filed under:
|

One of the common queries when importing the tables via JDBC with 11gR2 is determining why the import wizard doesn’t display the tables that you think it should. I often just use the script below to dump out the schemas, tables and columns that the JDBC driver is returning. This is useful in a few areas;

  • to figure out what the schema name is returned to double check with the schema name you have used in the location (this is used in the DatabaseMetaData.getTables API call within the basic JDBC metadata import.
  • to figure out the data types returned from the JDBC driver when you see columns skipped because of no datatype supported messages.
  • also…I can do it via scripting and don’t need to recompile classes and stuff :-)

Edit the tcl script and set the JDBC driver, the connection URL and the username and password (they are at the bottom of the script), the script then calls a basic tcl procedure which writes to standard out the schemas, tables and columns with various properties. For example I executed it using the XML JDBC driver from ODI over a simple customers XML file and it writes the following metadata;

image

You can add more details as you need and execute from the OMBPlus panel within OWB.

Download the sample tcl jdbc script here

There is a bunch of really useful stuff on OTN documenting this area (start with the white paper here) that is worth checking out all related to the OWB SDK covering everything from platform definitions, custom metadata importers, application adapters, code templates etc. You can find a bunch of goodies on the OWB SDK here.

© Oracle Blogs or respective owner

Related posts about etl

Related posts about metadata