ifx_createMart() function

The ifx_createMart() function creates a data mart in an accelerator.

There are two types of ifx_createMart() functions and each type takes different parameters.
  • A type that creates a data mart that is based on a data mart definition that is in XML format. You create the data mart definition by using workload analysis. The ifx_createMart() function retrieves the data mart definition as a CLOB data type.
  • A type that creates a data mart that is based on the schema of the database tables that you create with the ifx_probe2Mart() procedure.

Syntax

  • Here is the syntax that is used to create a data mart that is based on a data mart definition.
    
    1  ifx_createMart ( ' accelerator_name ' , data_mart_definition )
    accelerator_name
    The name of the accelerator where you want to create the data mart.
    data_mart_definition
    The data mart definition. The name of the data mart is retrieved from mart name attribute of the data mart definition. Valid data mart names have a maximum of 128 characters. Data marts names must be unique in an accelerator.
  • Here is the syntax that is used to create the data mart definition and create the data mart. The data mart definition is based on the database tables that you create with the ifx_probe2Mart() procedure.
    
    1  ifx_createMart ( ' accelerator_name ' , ' data_mart_name ' , ' probe_database ' )
    accelerator_name
    The name of the accelerator where you want to create the data mart.
    data_mart_name
    The name of the data mart. Valid data mart names have a maximum of 128 characters. Data marts names must be unique in an accelerator.
    probe_database
    The name of the database that contains the data mart schema tables. If you omit the probe_database parameter, the data mart schema tables must be in the current database.

Usage

You must create an accelerator before you can run the ifx_createMart() function.

Return value

The ifx_createMart() function returns the text string "The operation was completed successfully." or an error message.

Examples

This example shows how to create a data mart that is based on a data mart definition.

EXECUTE FUNCTION ifx_createMart('MyAccelerator', filetoclob
('orders_customer_mart.xml', 'client'));

This example shows how to create the data mart definition and create the data mart that is based on the database tables that you create with the ifx_probe2Mart() procedure.

EXECUTE FUNCTION ifx_createMart('MyAccelerator', 'customermart1', 'stores_marts');