Refreshing data mart data at the partition level

Use the dropPartMart() and loadPartMart() functions to refresh the data in a specific partition in a fragmented table instead of refreshing all the data in the data mart. If your database table is fragmented, your data mart table follows the same fragmentation scheme. Refreshing data by partition is faster than refreshing an entire data mart.

Before you begin

Prerequisite

Register the dropPartMart() and loadPartMart() functions in the database by using the DB-Access utility:
$ dbaccess database $INFORMIXDIR/etc/boot1170XC5iwa.sql

About this task

You can refresh the partition data by reloading the data in the partition, removing (dropping) the data in the partition, or adding data to the partition.

Procedure

  • Reload: Follow these steps when the data in one of the fragments in a fragmented table in the database has changed. For example, you want to add new data for the current week.
    1. Use the oncheck -pt command to look up the fragment (partition name or number) in the table that has new data in the database.
    2. Use the dropPartMart() function to drop the data from the corresponding partition in the data mart.
    3. Use the loadPartMart() function to load the new data in the partition in the data mart.
  • Remove: Follow these steps when you want to remove the data in the partition. For example, you want to delete data from an earlier week.
    1. Use the oncheck -pt command to look up the fragment (partition name or number) to be detached from the table in the database.
    2. Use the dropPartMart() function to drop the data from the corresponding partition in the data mart.
    3. Detach the fragment from the table in the database.
  • Add: Follow these steps when you want to add data from a table fragment in the database. For example, you want to add data for a different week. The fragment can be a stand-alone table that contains the new data.
    1. Attach the new fragment to the fragmented table in the database.
    2. Use the oncheck -pt command to look up the new fragment (partition name or number).
    3. Use the loadPartMart() function to load the new data in the new partition in the data mart.