Reviews
Oracle Database Management UtilitiesOracle Utilities - Mapping XML files as External Tables
XML has become a de facto information exchange format, which is why oracle has included the XML Database (XDB) feature from 9.2.0. However, it requires the data to be actually loaded into the database before it can be processed. An External Table allows the user to take a quick look at the contents of the external file prior to performing any further processing.
In this example an External Table is created out of an XML file. This file is read by means of a CLOB field, and some further XDB commands can be issued against the external XML file to extract and view data.
Let's create the external XML file first:
- create table EMPLOYEES_XML (xmlFile CLOB)
- organization external (
- type ORACLE_LOADER
- default directory EXTTABDIR
- access parameters (
- fields (xmllob char terminated by ',')
- column transforms (xmlFile from lobfile(xmllob))
- )
- location('employees.dat')
- )
- reject limit unlimited
The employees.dat file contains the file name of the XML file to load as an external CLOB file. This file, for the purpose of the demo, contains the file name: employees.xml.
Now the file can be queried from the database as if it was a regular table with a single XML column.
Oracle Database Management Utilities
- Oracle 10g/11g Data and Database Management Utilities
- Oracle Utilities - External Tables
- Oracle Utilities - External Tables Environment Setup
- Oracle Utilities - A Basic External Table
- Oracle Utilities - Creating External Table Metadata, The Easy Way
- Oracle Utilities - Unloading data to External Tables
- Oracle Utilities - Inter-Version Compatibility
- Oracle Utilities - Data Transformation with External Tables
- Oracle Utilities - Extending the alert.log Analysis
- Oracle Utilities - Reading the listener.log from the database
- Oracle Utilities - Mapping XML files as External Tables
- Oracle Utilities - Dynamically Changing the External Reference
- Oracle Utilities - Summary








