openphacts / OPS-Knime

Project for integration of OPS and the Knime workflow engine
Other
14 stars 8 forks source link

GET Resource node does not return data types consistently #22

Open jmartasek opened 9 years ago

jmartasek commented 9 years ago

When making an API call that might return a property with multiple values the data type for the property will vary based on what is actually returned. If a single value is returned then it is string with multiple values it is JSONArray. This means that the corresponding column data type differs which causes subsequent nodes to fail.

danidi commented 9 years ago

Do you have a specific example for this? Maybe we can find a workaround.

ianwdunlop commented 9 years ago

When it is one of these array or singleton type responses could you always convert the returned values to an array in the workflow? This is what we had to do with our OPS.js library that powers the explorer.

jmartasek commented 9 years ago

Yep - a consistent return type of array would definitely fix it.

ianwdunlop commented 9 years ago

I've asked a few times if this could be changed at the API level rather than the consumer having to deal with it but no luck so far.