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.sqlAbout this task
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.
- Use the oncheck -pt command to look up the fragment (partition name or number) in the table that has new data in the database.
- Use the dropPartMart() function to drop the data from the corresponding partition in the data mart.
- 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.
- Use the oncheck -pt command to look up the fragment (partition name or number) to be detached from the table in the database.
- Use the dropPartMart() function to drop the data from the corresponding partition in the data mart.
- 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.
- Attach the new fragment to the fragmented table in the database.
- Use the oncheck -pt command to look up the new fragment (partition name or number).
- Use the loadPartMart() function to load the new data in the new partition in the data mart.