|Oracle® Fusion Middleware Connectivity and Knowledge Modules Guide for Oracle Data Integrator
11g Release 1 (11.1.1)
Part Number E12644-05
|PDF · Mobi · ePub|
This chapter describes how to work with Microsoft Excel in Oracle Data Integrator.
This chapter includes the following sections:
Oracle Data Integrator (ODI) integrates data stored into Microsoft Excel workbooks. It allows reverse-engineering as well as read and write operations on spreadsheets.
Oracle Data Integrator uses Open Database Connectivity (ODBC) to connect to a Microsoft Excel data server. See Section 8.2.3, "Connectivity Requirements" for more details.
A Microsoft Excel data server corresponds to one Microsoft Excel workbook (
.xls file) that is accessible through your local network. A single physical schema is created under this data server.
Within this schema, a spreadsheet or a given named zone of the workbook appears as a datastore in Oracle Data Integrator.
Oracle Data Integrator provides no Knowledge Module (KM) specific to the Microsoft Excel technology. You can use the generic SQL KMs to perform the data integration and transformation operations of Microsoft Excel data. See Chapter 4, "Generic SQL" for more information.
Note:Excel technology cannot be used as the staging area, does not support incremental update or flow/static check. As a consequence, the following KMs will not work with the Excel technology:
RKM SQL (JYTHON)
LKM File to SQL
IKM SQL Incremental Update
IKM SQL Control Append
LKM SQL to SQL (JYTHON)
Make sure you have read the information in this section before you start using the Microsoft Excel Knowledge Module:
Before performing any installation you should read the system requirements and certification documentation to ensure that your environment meets the minimum installation requirements for the products you are installing.
The list of supported platforms and versions is available on Oracle Technical Network (OTN):
There are no technology-specific requirements for using Microsoft Excel files in Oracle Data Integrator.
This section lists the requirements for connecting to a Microsoft Excel workbook.
To be able to access Microsoft Excel data, you need to:
Install the Microsoft Excel ODBC Driver
Microsoft Excel workbooks can only be accessed through ODBC connectivity. The ODBC Driver for Excel must be installed on your system.
Declare a Microsoft Excel ODBC Data Source
An ODBC data source must be defined for each Microsoft Excel workbook (
.xls file) that will be accessed from ODI. ODBC datasources are created with the Microsoft ODBC Data Source Administrator. Refer to your Microsoft Windows operating system documentation for more information on datasource creation.
Setting up the Topology consists in:
A Microsoft Excel data server corresponds to one Microsoft Excel workbook (
.xls file) that is accessible through your local network.
Create a data server for the Microsoft Excel technology using the standard procedure, as described in "Creating a Data Server" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator. This section details only the fields required or specific for defining a Microsoft Excel Data Server:
In the Definition tab:
Array Fetch Size:
Batch Update Size:
In the JDBC tab:
where <odbc_dsn_alias> is the name of your ODBC data source.
To access a Microsoft Excel workbook via ODBC, you must first ensure that this workbook is not currently open in a Microsoft Excel session. This can lead to unexpected results.
Create a Microsoft Excel Physical Schema using the standard procedure, as described in "Creating a Physical Schema" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator.
Note that Oracle Data Integrator needs only one physical schema for each Microsoft Excel data server. If you wish to connect a different workbook, a different data server must be created to connect a ODBC datasource corresponding to this other workbook.
Create for this physical schema a logical schema using the standard procedure, as described in "Creating a Logical Schema" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator and associate it in a given context.
Note:An Excel physical schema only has a data schema, and no work schema. Microsoft Excel cannot be used as the staging area of an interface.
Setting up a Project using the Microsoft Excel follows the standard procedure. See "Creating an Integration Project" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator.
Import the following generic SQL KMs into your project for getting started with Microsoft Excel:
LKM SQL to SQL
IKM SQL to SQL Append
See Chapter 4, "Generic SQL" for more information about these KMs.
This section contains the following topics:
A Microsoft Excel Model is a set of datastores that correspond to the tables contained in a Microsoft Excel workbook.
Create a Microsoft Excel Model using the standard procedure, as described in "Creating a Model" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator.
Microsoft Excel supports only the Standard reverse-engineering, which uses only the abilities of the ODBC driver.
Oracle Data Integrator reverse-engineers:
Spreadsheets: Spreadsheets appear as system tables. Such a table is named after the spreadsheet name, followed with a dollar sign ($). This table's columns are named after the first line of the spreadsheet. Note that new records are added at the end of the spreadsheet.
Named Cell Ranges in a spreadsheet. These will appear as tables named after the cell range name. Depending on the scope of a name, the table name may be prefixed by the name of the spreadsheet (in the following format:
<spreadsheet_name>$<zone_name>). The columns for such a table are named after the first line of the cell range. Note that new records are added automatically below the named cell. It is possible to create a blank named cell range that will be loaded using ODI by naming a cell range that contains only the first header line.
In most Microsoft Excel versions, you can simply select a cell range and use the Name a Range... popup menu to name this range. See the Microsoft Excel documentation for conceptual information about Names and how to define a cell range in a spreadsheet.
To perform a Standard Reverse-Engineering on Microsoft Excel use the usual procedure, as described in "Reverse-engineering a Model" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator.
Note:On the Reverse Engineer tab of your Model, select in the Types of objects to reverse-engineer section Table and System Table to reverse-engineer spreadsheets and named cell ranges.
You can use a Microsoft Excel file as a source or a target of an integration interface, but NOT as the staging area
The KM choice for an interface or a check determines the abilities and performances of this interface or check. The recommendations below help in the selection of the KM for different situations concerning a Microsoft Excel server.
Microsoft Excel can be used as a source or a target of an interface. The LKM choice in the Interface Flow tab to load data between Microsoft Excel and another type of data server is essential for the performance of an interface.
Oracle Data Integrator does not provide specific knowledge modules for Microsoft Excel. Use the Generic SQL KMs or the KMs specific to the technology used as the staging area. The following table lists some generic SQL KMs that can be used for loading data from Microsoft Excel to any staging area.
Table 8-1 KMs to Load from Microsoft Excel
|Target or Staging Area||KM||Notes|
LKM SQL to Oracle
Loads data from any ISO-92 database to an Oracle target database. Uses statistics.
LKM SQL to SQL
Loads data from any ISO-92 database to any ISO-92 compliant target database.
LKM SQL to Sybase (bcp)
Loads data from any ISO-92 compliant database to a Sybase ASE Server database. Uses Bulk Loading.
Microsoft SQL Server
LKM SQL to MSSQL (bulk)
Loads data from any ISO-92 database to a Microsoft SQL Server target database. Uses Bulk Loading.
Because Microsoft Excel cannot be used as staging area you cannot use a LKM to load data into Microsoft Excel. See Section 8.6.2, "Integrating Data in Microsoft Excel" for more information on how to integrate data into Microsoft Excel.
Oracle Data Integrator does not provide specific knowledge modules for Microsoft Excel. Use the Generic SQL KMs or the KMs specific to the technology used as the staging area. For integrating data from a staging area to Microsoft Excel, you can use, for example the IKM SQL to SQL Append.
This section provides information on how to troubleshoot problems that you might encounter when using the Microsoft Excel technology in Oracle Data Integrator. It contains the following topics:
Errors appear often in Oracle Data Integrator in the following way:
java.sql.SQLException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified RC=Oxb at ... ...
the java.sql.SQLException code simply indicates that a query was made through the JDBC-ODBC bridge, which has returned an error. This error is frequently a database or driver error, and must be interpreted in this direction.
Only the part of text in italic must first be taken in account. It must be searched in the ODBC driver or Excel documentation. If its contains a specific error code, like here in bold italic, the error can be immediately identified.
If such an error is identified in the execution log, it is necessary to analyze the SQL code to find the source of the error. The code is displayed in the description tab of the task in error.
The most common errors with Excel are detailed below, with their principal causes.
This section describes common problems and solutions.
The JDBC driver is incorrect. Check the name of the driver.
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified RC=0xb Datasource not found or driver name not specified
The ODBC Datasource specified in the JDBC URL is incorrect.
The Microsoft Jet Database engine could not find the object <object name>
The table you are trying to access does not exist or is not defined in the Excel spreadsheet.
Too few parameters. Expected 1.
You are trying to access an nonexisting column in the Excel spreadsheet.
Operation must use an updateable query.
This error is probably due to the fact that you have not unchecked the "read only" option when defined the Excel DSN. Unselect this option and re-execute your interface.
DBCS or UTF-16 data is corrupted when loaded.
This error is due to the fact that the JDBC-ODBC Bridge of the Java machine does not support UTF-16 data. This is a known issue in the Sun JVM that is solved in the later releases (1.7).