Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
Engine error message:
any help will be appreciated.
thanks.
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
The maximum size of a returned hypercube is 10,000 cells.
3 * 22,982 will evaluate to well over 10,000 - hence the error.
So what should i modify there, please provide me corrected code.
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
I had the same problem with my extension.
Next article helped me: