Data Loading
The procedures in this section load fact data into a cube and migrate existing application tables when a health check or upgrade requires a newer table format.
LOAD_DATA
Section titled “LOAD_DATA”Minimum role: CUBE_ADMIN
LOAD_DATA( P_CUBE_NAME, P_SOURCE_TABLE, P_AMT_COLUMN, P_MODE) -> VARCHARLoads fact data into a cube from a source table.
The source table must contain one column for each cube dimension plus a numeric amount column.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
req | Target cube. |
P_SOURCE_TABLE |
VARCHAR |
req | Source table containing the fact data. |
P_AMT_COLUMN |
VARCHAR |
req | Column containing the numeric values. |
P_MODE |
VARCHAR |
opt | Load mode, such as REPLACE or APPEND. |
Returns
Section titled “Returns”Returns a status message that includes row counts.
A dimension rebuild is not required after loading data. Newly loaded data is immediately queryable.
Example
Section titled “Example”CALL CUBE.LOAD_DATA( 'FINANCE', 'SOURCE_DB.FINANCE.GL_FACT', 'AMOUNT', 'REPLACE');MIGRATE_DATA_TABLE
Section titled “MIGRATE_DATA_TABLE”Minimum role: CUBE_ADMIN
MIGRATE_DATA_TABLE(P_CUBE_NAME) -> VARCHARMigrates a cube’s fact table to the current expected format.
Run this procedure when a health check or an upgrade note indicates that the cube’s fact table requires migration.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
req | Cube name. |
Example
Section titled “Example”CALL CUBE.MIGRATE_DATA_TABLE('FINANCE');MIGRATE_DIMENSION_SOURCES
Section titled “MIGRATE_DIMENSION_SOURCES”Minimum role: CUBE_ADMIN
MIGRATE_DIMENSION_SOURCES(P_CUBE_NAME) -> VARCHARMigrates a cube’s dimension source tables to the current expected format.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
req | Cube name. |
Example
Section titled “Example”CALL CUBE.MIGRATE_DIMENSION_SOURCES('FINANCE');