ibec_BuildCube
Syntax
function ibec_build_cube(FileName, SelectSQL : string, Dimension, Measures, Params : array of variants);
Example
The following illustrates the construction of an OLAP cube:
execute ibeblock as begin 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); end
See also:
Data Analysis / OLAP
back to top of page
<< ibec_psql_UsedObjects | IBEBlock | ibec_Cast >>