Henrique Dias · Dec 16, 2020

Fact Table 1 x SQL Select 100k

Hi everyone, 

I'm creating something to test the Analytics capabilities. 

I have a table with 100k records. Consulting the data using ^%G or SELECT, everything is working fine. 

But, when I create a Cube using this same class as Source, the Build results in only 1 fact.

I would like to know if anyone else faces the same situation before and have some guidance. 

Some details:

Class Extends %Persistent

Property customerID As;

Property orderStatus As %String;

Property purchaseTimeStamp As %TimeStamp;

Property approvedTimeStamp As %TimeStamp;

Property deliveredCarrierDate As %TimeStamp;

Property deliveredCustomerDate As %TimeStamp;

Property estimatedDelivery As %TimeStamp;

Index OrderStatusIndex On orderStatus;

Index customerIndex On customerID;

Index purchaseIndex On purchaseTimeStamp;

Storage Default
<Data name="orderDefaultData">
<Value name="1">
<Value name="2">
<Value name="3">
<Value name="4">
<Value name="5">
<Value name="6">
<Value name="7">
<Value name="8">

IRISAPP>d ##class(%DeepSee.Utils).%PrintBuildErrors("OrderCube")                                          
0 build error(s) for 'OrderCube'

IRISAPP>Do ##class(%DeepSee.Utils).%BuildCube("OrderCube")                                                

Building cube [OrderCube]
Existing cube deleted.
Fact table built:                 1 fact(s) (1 worker(s) used)
Fact indices built:               1 fact(s) (1 worker(s) used)

Elapsed time:                  0.209013s
Source expression time:        0.000003s



Product version: IRIS 2020.4
$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2020.4 (Build 524U) Thu Oct 22 2020 13:04:25 EDT
1 0 6 137
Log in or sign up to continue

I have tried, but the results still the same.

I found my dataset on, and as the dataset provided the IDs, I tried to use it.

After reading your comment, I tried to import one class using csvgen, and the Cube created was Compiled and Built successfully with all facts.

This is something unexpected but makes sense. 

I'll try and workaround to use those IDs and relationships between those tables.

Thanks @Eduard Lebedyuk 

Cubes rely heavily on bitmap indexes for them to run fast.

Primarily each fact in fact table must be accessible via bitmap index.

In the past Bitmap indices worked only with positive integers, but now there seems to be a %BID approach - a surrogate key essentially.

I think InterSystems BI should throw an error or generate a %BID or offer to generate a %BID if the fact class id is not a positive integer