Odysseus

This is the official support forum for Odysseus

Working with JSON

User avatar
Marco Grawunder
Posts: 256
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Working with JSON

Postby Marco Grawunder » Fri Sep 19, 2014 7:58 am

I think the problem could be, that the reading of the elements is too fast. We use timestamps to simulate element based windows, but when den elements have the same timestamps there is no way to distinguish them. In your case, timestamps are based on system time and the granularity is milliseconds.

Could you please add in the source definition the option ['scheduler.delay','1'] and test again?

You shoud now get something like:

Code: Select all

1|10|10|10.0 | META | 1411113161849|1411113161866
2|11|10|21.0 | META | 1411113161866|1411113161881
3|12|10|33.0 | META | 1411113161881|1411113161897
4|13|10|46.0 | META | 1411113161897|1411113161913
5|14|10|60.0 | META | 1411113161913|1411113161928
6|15|10|75.0 | META | 1411113161928|1411113161944
7|16|10|91.0 | META | 1411113161944|1411113161960
8|17|10|108.0 | META | 1411113161960|1411113161975
9|18|10|126.0 | META | 1411113161975|1411113161991
10|19|10|145.0 | META | 1411113161991|1411113162006
10|20|11|155.0 | META | 1411113162006|1411113162007


This is because of the sliding window. For each new element the window is moved one position. So in the first window, there is only the first element, then the first and the second and so on. Finally, the last two elements are from a full window of ten elements.

If you want distinct windows, you can use the SLIDE-Parameter, e.g. SLIDE = 10.

If you only want windows with 10 elements you could e.g. use a selection on the count attribute after the aggregation.

harpreet
Posts: 7
Joined: Tue Sep 16, 2014 6:27 pm

Re: Working with JSON

Postby harpreet » Fri Sep 19, 2014 2:13 pm

Thank You so much. It worked.

I'll trouble you guys again if I get stuck again. Hope you don't mind.


Thanks,
Harpreet

User avatar
Marco Grawunder
Posts: 256
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Working with JSON

Postby Marco Grawunder » Fri Sep 19, 2014 2:39 pm

Thank You so much. It worked.


That's fine :-)
I'll trouble you guys again if I get stuck again. Hope you don't mind

Hey, thats whats this forum is for ;-)

daniela_4444
Posts: 1
Joined: Sat Mar 11, 2017 12:34 am

Re: Working with JSON

Postby daniela_4444 » Sat Mar 11, 2017 12:41 am

Hi everyone

I am new here and I would like to create a JSON stream source in Odysseus. Unfortunately I always receive the following error:

'Parsing and Executing Query' has encountered a problem.

Script Execution Error: No such data handler: KeyValueObject
No such data handler: KeyValueObject


Does anyone have an idea why I receive this error?

Thank you in advance.

Best regards,
Daniela

User avatar
Marco Grawunder
Posts: 256
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Working with JSON

Postby Marco Grawunder » Sat Mar 11, 2017 9:20 am

Hi,

how do you use Odysseus? Are you using it as the downloaded product? Then you will need to install the KeyValue Feature

https://wiki.odysseus.informatik.uni-oldenburg.de/display/ODYSSEUS/How+to+install+new+features

When you are using Odysseus from source code, you need to add the feature to the used product and call synchronize.

Greetings,

Marco


phpbb 3.1 style demo

Return to “Adapter/Wrapper/Access Framework”

Who is online

Users browsing this forum: No registered users and 1 guest