<< ibec_GetIBEVersion | IBEBlock | ibec_Chr >>

ibec_BuildCube: Building an OLAP cube

The following illustrates the construction of an OLAP cube:

  execute ibeblock
    SelectSQL = 'select rf.rdb$relation_name, f.rdb$field_type, f.rdb$field_length, f.rdb$field_precision
                 from rdb$relation_fields rf, rdb$fields f
                 where rf.rdb$field_source = f.rdb$field_name';

    vDimensions[0] = 'FieldName=RDB$RELATION_NAME; Alias="Table Name"';
    vDimensions[1] = 'FieldName=RDB$FIELD_TYPE; Alias="Field Type';

    vMeasures[0] = 'FieldName=RDB$FIELD_TYPE; Alias="Field Count"; CalcType=ctCount; Format=0';
    vMeasures[1] = 'FieldName=RDB$FIELD_LENGTH; Alias="Total Length"; CalcType=ctSum; Format=0';
    vMeasures[2] = 'FieldName=RDB$FIELD_PRECISION; Alias="Avg Precision"; CalcType=ctAverage';

Build and save cube in binary format:

    ibec_BuildCube('C:\test_cub.cub', SelectSQL, vDimensions, vMeasures, null);

Build and save cube in XML format:

    ibec_BuildCube('C:\test_cub.xml', SelectSQL, vDimensions, vMeasures, null);

back to top of page
<< ibec_GetIBEVersion | IBEBlock | ibec_Chr >>