ifx_xml2Mart() procedure

The ifx_xml2Mart() procedure converts a data mart definition from XML format into data mart schema tables.

Syntax


1  ifx_xml2Mart ( data_mart_definition ,?  ' database_name ' )
data_mart_definition
The data mart definition in XML format (data type CLOB).
database_name
If you include the database name, the procedure checks that all the tables and columns that are contained in the data mart definition XML file are present in the database.

Usage

The ifx_xml2Mart() procedure converts a data mart definition that is in XML format into the data mart schema tables. You must run the ifx_xml2Mart() procedure in a logged database. If the data mart schema tables do not exist, they are created automatically. The following table lists the data mart schema tables.

Table 1. Data marts schema tables
Table Description
'informix'.iwa_marts Names of the data mart definitions
'informix'.iwa_tables All of the tables that are used in any data mart definition
'informix'.iwa_columns All of the columns that are used in any data mart definition
'informix'.iwa_mtabs Tables for a specific data mart definition
'informix'.iwa_mcols Columns for a specific data mart definition
'informix'.iwa_mrefs References (join descriptors) of a specific data mart definition
'informix'.iwa_mrefcols Reference columns (join predicates) of a specific data mart definition

Examples

This example shows how to convert a data mart definition that is stored in a file into data mart schema tables. The procedure checks that the tables and columns that are referenced in the data mart definition exist in database 'database1'.

EXECUTE procedure ifx_xml2Mart(filetoclob('mart.xml', 'client'), 'database1');