Forum Discussion
DataView Array maximum 100?
- 6 years ago
Hi BrentonC, and thanks for confirming 🙂
From reviewing your capabilities, there are two issues and have pasted a working version underneath.
- You have three different dataViewMappings defined.
- The SDK only supports one.
- As your're referencing table in your visual's update method in the OP, I have removed the others.
- Note that with issue #2 resolved, this still causes the 100 row limit (presumably due to conflicting mappings in the dataView allocating more data points than actually needed).
- The table dataViewMapping is referencing a non-existent dataRole named Rows (the matrix was similarly set up).
- This was somehow getting the right data field but caps the generated dataView at 100 records.
- For the data to be mapped correctly into the dataView you need to reference the defined dataRoles.
- Based on your dataRoles, the rows object should map to category1.
Here's a working version of your capabilities - this works for the default maximum of 1,000 data points:
{ "dataRoles": [ { "displayName": "CCFV", "name": "category1", "kind": "Grouping" } ], "dataViewMappings": [ { "conditions": [ { "category1": { "max": 1 } } ], "table": { "rows": { "for": { "in": "category1" } } } } ] }Confirming output from my console (last value is 999, as for loop is indexed from 0):
Hopefully that's all you need to get moving. Good luck!
Daniel
- You have three different dataViewMappings defined.
Hi BrentonC,
WIthout seeing your capabilites.json I'd first suggest checking the data reduction algorithm. The doc says that there's a limit of 1,000 data points by default but if you have 10 categories x 100 rows then this will likely be your issue. Setting this limit appropriately should get you to where you need to be.
If not, would you be able to share your capabilites.json file contents here, so we can see how your dataView is being built? This can help with the next stage of diagnosis if we need to go further.
Thanks,
Daniel
- BrentonC6 years agoHelper I
Thank you for the reply,
I did originally have 10+ columns, although I changed the format fo the data and now there are just 3 columns.
{ "dataRoles":[ { "displayName": "CCFV", "name": "category1", "kind": "Grouping" } ], "dataViewMappings": [ { "conditions": [ { "category1": { "max": 1 }} ], "table": { "rows": { "for": { "in": "Rows" }} }, "matrix": { "rows": { "for": { "in": "Rows" } }, "columns": { "for": { "in": "Columns" } }, "values": { "for": { "in": "Values" } } }, "categorical": { "values": { "select": [ { "bind": { "to": "category1" } } ] } } } ]}Before and after adding in the data reduction algorithm I am still receiving the same result.
Structure to the dataset
Thank You
Brenton
- dm-p6 years agoSuper User
Hi BrentonC, and thanks for confirming 🙂
From reviewing your capabilities, there are two issues and have pasted a working version underneath.
- You have three different dataViewMappings defined.
- The SDK only supports one.
- As your're referencing table in your visual's update method in the OP, I have removed the others.
- Note that with issue #2 resolved, this still causes the 100 row limit (presumably due to conflicting mappings in the dataView allocating more data points than actually needed).
- The table dataViewMapping is referencing a non-existent dataRole named Rows (the matrix was similarly set up).
- This was somehow getting the right data field but caps the generated dataView at 100 records.
- For the data to be mapped correctly into the dataView you need to reference the defined dataRoles.
- Based on your dataRoles, the rows object should map to category1.
Here's a working version of your capabilities - this works for the default maximum of 1,000 data points:
{ "dataRoles": [ { "displayName": "CCFV", "name": "category1", "kind": "Grouping" } ], "dataViewMappings": [ { "conditions": [ { "category1": { "max": 1 } } ], "table": { "rows": { "for": { "in": "category1" } } } } ] }Confirming output from my console (last value is 999, as for loop is indexed from 0):
Hopefully that's all you need to get moving. Good luck!
Daniel
- BrentonC6 years agoHelper I
Thank you very much for the detailed explanation, I messed around so much with it I think I got lost in where I was at. Understanding the fundamental reasons it was broken is a big help!
Thank You
Brenton
- You have three different dataViewMappings defined.