Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am working on a new mashup where users build out a custom table based on their selections. I am grabbing a massive table full of show/hide expressions from my app (using getObject) to use as a preview mechanic for their selections. The issue is that some of the selection options include very large datasets which can make the preview run slow and sometimes time out.
I am looking for a way to limit the amount of rows on my straight table in order to make this preview table load faster. The the table is only for preview use so it is not important to show everything within it.
Some things I have tried are:
- Using a new extension. I am using a massive preexisting table and was not able to get it to convert all of the show/hide options over to a new extension when using "convert to". We will be replacing this table with the newest version often so it is important that it converts over easily.
- Using "limitation" option for dimensions. With the way we have the data loading this is not a viable option and it will bypass it.
- I have tried using enigma "applyPatches" to change the hypercubedef initialDataFetch. This went through but did not effect the results shown in the table.
- Finally I tried grabbing the hypercubedef from the existing table, modifying the initialDataFetch, and using the visualization API to create a new table to use. This modified the hypercube properly but when the table shows up it still includes all of the data.
Any help on this topic would be greatly appreciated including anything I may have missed with my previous efforts. Thank you in advance!
Hi @BenjaminGroff it is not clear to me why Dimension limit is not an option. Could you please describe this?
In anycase, you cannot change qInitialDataFetch from an existing chart. Here you can find a list of all properties from a table that you can change (setOptions Capability API method triggers ApplyPatches Engine API method behind the scenes).
I tried to apply a patch to the entire HyperCubeDef changing the limitation of the first dimension to 10 values. This works fine, below the code
app.visualization.get('mGVGsT').then(function(viz) {
//Change qDimension qOtherTotalSpec for limiting dimension values
const vizProps = viz.model.getFullPropertyTree().then(function(props) {
//Save current hyperCubeDef
const hyperCubeDef = props.qProperty.qHyperCubeDef
//Change dimension limit
//You should loop over dimensions here, just select first dim as example
hyperCubeDef.qDimensions[0].qOtherTotalSpec.qOtherMode = 'OTHER_COUNTED'
//Set viz option qHyperCubeDef
const newHypercubeDef = {qHyperCubeDef: hyperCubeDef}
viz.setOptions(newHypercubeDef)
viz.show("QV01")
})
});
Hi @BenjaminGroff it is not clear to me why Dimension limit is not an option. Could you please describe this?
In anycase, you cannot change qInitialDataFetch from an existing chart. Here you can find a list of all properties from a table that you can change (setOptions Capability API method triggers ApplyPatches Engine API method behind the scenes).
I tried to apply a patch to the entire HyperCubeDef changing the limitation of the first dimension to 10 values. This works fine, below the code
app.visualization.get('mGVGsT').then(function(viz) {
//Change qDimension qOtherTotalSpec for limiting dimension values
const vizProps = viz.model.getFullPropertyTree().then(function(props) {
//Save current hyperCubeDef
const hyperCubeDef = props.qProperty.qHyperCubeDef
//Change dimension limit
//You should loop over dimensions here, just select first dim as example
hyperCubeDef.qDimensions[0].qOtherTotalSpec.qOtherMode = 'OTHER_COUNTED'
//Set viz option qHyperCubeDef
const newHypercubeDef = {qHyperCubeDef: hyperCubeDef}
viz.setOptions(newHypercubeDef)
viz.show("QV01")
})
});