Re-creating a data mart

You can re-create a data mart to update the data mart definition. You can add or remove dimension and fact tables to or from the data mart. You drop the data mart and re-create it with the new definition. Query acceleration is temporarily suspended.

About this task

Update the data mart definition when you make the following types of schema modifications to the data warehouse:

  • Rename tables
  • Rename columns
  • Alter tables to add or drop columns
  • Change the data types of the columns
  • Add or drop constraints

You do not need to disable query acceleration. Between the time when you drop and load the data mart, query acceleration is suspended and all queries are run by the Informix® database server.

Procedure

To re-create a data mart:
  1. Optional: Create a data mart definition manually.
  2. If trickle feed is enabled, disable it.
  3. Drop the data mart.
    Query acceleration is suspended.
  4. Create the data mart.
    You can use the same data mart name as the original data mart.
  5. Load the data mart.
    When the load completes, query acceleration resumes.
  6. Enable trickle feed for the data mart.

Example

This example shows how to re-create a data mart after the new data mart definition is stored in the stores_marts database. The following statements disable trickle feed for the data mart, drop the data mart, re-create the data mart using the new data mart definition, load the data mart, and enable trickle feed for the data mart:
EXECUTE FUNCTION ifx_removeTrickleFeed('MyAccelerator', 'customermart1');

EXECUTE FUNCTION ifx_dropMart('MyAccelerator', 'customermart1');

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

EXECUTE FUNCTION ifx_loadMart(('MyAccelerator', 'customermart1', 'MART');

EXECUTE FUNCTION ifx_setupTrickleFeed('MyAccelerator', 'customermart1', 5);