You can translate the question and the replies:

REST data source returning only text/plain

I am using Denodo 6. I am faced with a REST data source that actually returns text/plain only - application/json or application/xml is not offered. Probably the easiest approach is to create a Delimited File data source with a very uncommon delimiter, something like "---------------------------------------- DUMMY DELIM ----------------------------------------". Alternatively, I could write a custom Java-based data source that reads out the returned text string. Is there something better I can do?
05-04-2018 08:28:46 -0400

2 Answers

Hi, If the REST response is truly unstructured text, then the Delimited Data Source is probably your best bet. Keep in mind that you can use [regular expressions]( to define your tuple instead of a potentially unreliable delimiter, should that fit your data format better. I would be wary of the custom Java data source as you might be adding unnecessary parsing time to your solution which may turn in to a bottleneck depending on the volume involved. One other option you could consider is to create your base view as a single text value and parse it using native Denodo [Text Processing Functions]( in the Derived Views you build on top of it. This might yield better visibility in to your data structures. I'd look specifically at [SPLIT]( to break a string in to an array (which you could then [FLATTEN](, [REGEXP]( to parse the "uncommon delimiters" and replace them with something easier to consume, and the classic [SUBSTR]( and [INSTR]( combo for when reliable patterns just can't be made. Hope this helps!
Denodo Team
06-04-2018 12:22:18 -0400
Ok, thanks for answering, this is helpful.
09-04-2018 02:42:01 -0400
You must sign in to add an answer. If you do not have an account, you can register here