Question
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 diashenrique.olist.data.order Extends %Persistent
{

Property customerID As diashenrique.olist.data.customer;

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>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>customerID</Value>
</Value>
<Value name="3">
<Value>orderStatus</Value>
</Value>
<Value name="4">
<Value>purchaseTimeStamp</Value>
</Value>
<Value name="5">
<Value>approvedTimeStamp</Value>
</Value>
<Value name="6">
<Value>deliveredCarrierDate</Value>
</Value>
<Value name="7">
<Value>deliveredCustomerDate</Value>
</Value>
<Value name="8">
<Value>estimatedDelivery</Value>
</Value>
</Data>
<DataLocation>^orderD</DataLocation>
<DefaultData>orderDefaultData</DefaultData>
<IdLocation>^orderD</IdLocation>
<IndexLocation>^orderI</IndexLocation>
<StreamLocation>^orderS</StreamLocation>
<Type>%Storage.Persistent</Type>
}

}
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)

Complete
Elapsed time:                  0.209013s
Source expression time:        0.000003s

   

Thanks,
Henrique

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
10
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 Kaggle.com, 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