Couple of bugs with JSONPATH

Hi All,

i’m a frequent user of the Palladian Extensions, and especially the JSONPATH, but i find myself working around some issues on a frequent basis that i believe could be addressed with some bugfixes

i currently have no screenshots and examples as i’m working with sensitive data, but i can provide some simulations later on.

a) the checkbox “skip missing values” in the ungroup node does not work the same way as it does for XPATH. i sometimes find my values across various lists completely scrambled

b) when you change a jsonpath and use “ctrl / OK”, the node runs, but did not take into account the latest config. i have to go into the node again and reconfirm the jsonpath

really looking forward to these minor changes :wink:

cheers,

H

Hi H,

thanks for the feedback – however, the JSON nodes are maintained by KNIME themselves and not by us (Palladian/Selenium). That’s why I suggest to post this into the “General” forum, or to ask an admin to move this post, @Iris ?

Best,
Philipp

Yes that is right, I just moved it and will follow up here :slight_smile:

Apologies! :grinning:

thx!
H

@hermyknime

can you make a example for your a) usecase?
I could not really see the difference what you were describing.

Thank you! Iris

Hi Iris, i recreated with dummy test data.

i’m using knime 3.6.2

1) sparse json data
image

[
{“id”:“1”, “value1”: “foo”, “value3”:“bar”},
{“id”:“2”, “value1”: “foo”, “value2”:“bar”},
{“id”:“3”, “value2”: “foo”, “value2”:“bar”}
]

2) map the data elements in JSONPath node

image


–>sparsitiy clearly visible

3) ungroup list elements → skip missing (or not skip missing)

gives the following result
image

additional information

  • i copy pasted the JSONPath & ungroup nodes from the project in which i have the issue
  • that version was approx 3.5 or 3.6
  • only workaround that i currently have, is first fetch json objects row per row, and then fetch in a second step the corresponding attributes
  • in XPath, such ungrouping works correctly by generating missings for the rows where no data is found in accordance with the path

cheers,

H

3 Likes

@hermyknime

Thank you for this detailed explanation! This was really helpful. I just pushed this into our bugtracking system and we will try to fix this as soon as possible. However, not for tomorrow release of course.

But it is the same behaviour as the Xpath node. There you also always need two steps in this szenario.

Cheers, Iris

2 Likes