Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

bhargavpatel431
New Contributor II

The hypercube results are too large.

I'm currently working on simple extension to fetch data from object. I don't know why i am getting this error: the hypercube results are too large though i googled it but not quite helpful. However, i already set properties of hypercube data (auto sizing). code is mentioned below,

initialProperties: {

     qHyperCubeDef: {

          qDimensions: [],

          qMeasures: [],

          qInitialDataFetch: [

               {

                    qWidth: 10,

                    qHeight: 100000

               }

          ]

     }

},

paint: function ($element,layout) {

     var app = qlik.currApp(this);

     // object_id is id of object on current sheet.

     app.getObject(object_id).then(function(e){

    

          var hc = e.layout.qHyperCube;

          e.getHyperCubeData('/qHyperCubeDef', [{ 

                                    qWidth: hc.qSize.qcx+1,

                                    qHeight: hc.qSize.qcy+1

                                   }]).then(function(e){

                                        //here i am getting error..

                                        // qWidth and qHeight is auto set.

                                        console.log(e);

                                   });

     });

}

Here is my object's qSize  information:

Screenshot (55) (2).png

Engine error message:

Screenshot (98).png

any help will be appreciated.

thanks.

1 Solution

Accepted Solutions
erik_wetterberg
Honored Contributor

Re: The hypercube results are too large.

Hi,

First set qInitialDataFetch to something below the limit (10000 cells). This means you can start the rendering with the data that is in the layout.

Then do not call getObject (or currApp), you have already got the object. You can use backendApi.getData to fetch more rows. This might however not work in snapshot mode, you will need to verify that, or turn snapshots off.

Erik Wetterberg

Please mark as helpful and/or correct if you find this helpful

Erik Wetterberg
https://extendingqlik.upper88.com/
4 Replies

Re: The hypercube results are too large.

The maximum size of a returned hypercube is 10,000 cells.


3 * 22,982 will evaluate to well over 10,000 - hence the error.

bhargavpatel431
New Contributor II

Re: The hypercube results are too large.

So what should i modify there, please provide me corrected code.

erik_wetterberg
Honored Contributor

Re: The hypercube results are too large.

Hi,

First set qInitialDataFetch to something below the limit (10000 cells). This means you can start the rendering with the data that is in the layout.

Then do not call getObject (or currApp), you have already got the object. You can use backendApi.getData to fetch more rows. This might however not work in snapshot mode, you will need to verify that, or turn snapshots off.

Erik Wetterberg

Please mark as helpful and/or correct if you find this helpful

Erik Wetterberg
https://extendingqlik.upper88.com/
billgates
Contributor

Re: The hypercube results are too large.

I had the same problem with my extension.

Next article helped me:

Getting all data cells from app.createCube()

Community Browser