Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Digvijay_Singh

Restricting no of rows to be fetched in mashup - app.visualization.create('table',

Hi,

Need help to find standard methods of restricting no of rows in app.visualization.create('table', its causing 100% memory and CPU utilization for one of the customer when fact table rows are > 30 M.

One way is to use calculation condition to limit rows for visualization, its not desirable to force user to limit the data and export also causing the same issue when app.createTable is used along with  table.exportData. We want to define a limit, could be any hardcoed no lets say 500K for viewing and export.

Any kind of help is much appreciated. Thanks in advance.

4 Replies
ErikWetterberg

Hi,

you could try using qInitialDataFetch:

qInitialDataFetch: [{

                    qWidth: 10,

                    qHeight: 1000

                }]

I haven't tried this, but it might work.

Hope this helps

Erik Wetterberg

Digvijay_Singh
Author

Thanks Erik for the suggestion, will give it a try today.!

s29124141
Partner - Creator II
Partner - Creator II

Hi erik.wetterberg‌ Thanks for your reply. We tried specifying qInitialDataFetch. It looks like the hypercube response has only specified number of rows, but we see subsequent GetHyperCubeData calls, which fetches all the rows and columns irrespective of qInitialDataFetch. Any thoughts/suggestions on this is highly appreciated? Below are few snapshots.

var objHyperCube = {};

objHyperCube.qHyperCubeDef = {};

objHyperCube.title = "Sales Transaction Table";

objHyperCube.totals = {};

objHyperCube.totals.show = false;

objHyperCube.qHyperCubeDef.qInitialDataFetch = [{ qHeight: 10, qWidth: 5 }];

objHyperCube.qHyperCubeDef.customErrorMessage = {};

objHyperCube.qHyperCubeDef.customErrorMessage.calcCond = 'Please reduce data through futher selections so that total transactions are below 50K.';

app.visualization.create('table', transactionDimensions, objHyperCube).then(function (vis) {

    vis.show("transactionTable");

});

Websocket Request

createTable.png

Websocket Response

createTable_Response.png

GetHyperCubeData Response

gethypercubedata.JPG

Straight table with all rows and columns (Irrespective of qInitialDataFetch)

tabledata.JPG

ErikWetterberg

Hi,

Sorry it didn't work. I think you might need to try an extension instead.

Hope this helps

Erik Wetterberg