0 votes
1 view

Hello, I try to get a chart displaying upon a REST data set, but an error occur, whatever i tried in the chart widget configuration

my data set retrieve a collection of objects with 2 attributes and 1 measure, json elements have this form :

{

"id": "TrafficFlowObserved:06088AA1215_001_1",

"type": "TrafficFlowObserved",

"averageVehicleSpeed": 76

}

data set mapping is as simple as :

I can display results in a Table widget, and map Widget, but no way with chart widget :

the configuration is as followed :

and the structure :

but chart display, and I got this error in knowage.log :

[http-nio-8080-exec-10] 08 Mar 2021 19:08:25,305 ERROR it.eng.spagobi.api.v2.DataSetResource.getDataStorePostWithJsonInBody:744 - Error loading dataset data from Vitesses Traffic API MNCA
it.eng.spagobi.utilities.exceptions.SpagoBIServiceException: An unexpected error occured while executing service
at it.eng.spagobi.api.common.AbstractDataSetResource.getDataStore(AbstractDataSetResource.java:272)
...

[http-nio-8080-exec-10] 08 Mar 2021 19:08:25,317 ERROR it.eng.spagobi.rest.interceptors.RestExceptionMapper.toResponse:59 - Catched service error:
it.eng.spagobi.utilities.exceptions.SpagoBIRestServiceException: generic.error
at it.eng.spagobi.api.v2.DataSetResource.getDataStorePostWithJsonInBody(DataSetResource.java:745)
...

Caused by: it.eng.spagobi.utilities.exceptions.SpagoBIServiceException: An unexpected error occured while executing service
at it.eng.spagobi.api.common.AbstractDataSetResource.getDataStore(AbstractDataSetResource.java:272)
at it.eng.spagobi.api.v2.DataSetResource.getDataStorePostWithJsonInBody(DataSetResource.java:741)
... 61 more
Caused by: java.lang.IllegalArgumentException: Column [averageVehicleSpeed_NONE] not found
at it.eng.spagobi.tools.dataset.utils.DataSetUtilities.getFieldMetaData(DataSetUtilities.java:465)

There is clearly an issue with the REST data set metadata configuration, towards the cache or something like, which provokes the error with chart widget...

I thought may be it's an interface issue, but if I change to 'SUM' instead of 'NONE', the error indicate [averageVehicleSpeed_SUM]

Does someone already faced this kind of issue with REST data set and chart widget, and have a solution to workaround the problem ?

Please note that I'm using Knowage version 7.4, 

Thanks in advance for any help

Environment Knowage version 7.4, with Docker, on macos
asked Mar 8, 2021 in Workspace by alaing (670 points) | 1 view

OK, I understood my mistake...

In the REST data set configuration, if used with json path, you must declare the measure attributes and their types, in the JSON path attributes list, 

else no chance to see data in a table or in a chart widget

1 Answer

+1 vote
Best answer

Thanks alaing for your contribution,

as mentioned in the thread above:

In the REST DataSet configuration, inside the JSON path attributes list, you must declare the measure attributes and their types.

Bye,
Marco

answered Apr 7, 2021 by mbalestri (9,250 points)
selected Jun 14, 2021 by emarchis
1,555 questions
1,017 answers
2,038 comments
2,568 users