Qlik Community

Qlik Sense Data Connectivity

Discussion board where members can learn more about Qlik Sense Data Connectivity.

rai-jmcpheeters
New Contributor III

REST Connector - Return JSON Response without SQL SELECT

Hi,

I have a field mapping stored in ElasticSearch that I'd like to query in order to build my data model. However, with the way the REST connector is implemented, you have to explicitly state each and every field and know the field hierarchy before pulling the data/mapping in order to create the "SQL Select" statement.

Is there a way to simply get the JSON response through the REST Connector (without having to use SQL SELECT)? The reason I ask about this connector specifically is because I haven't seen a way to pass authorization information through the Web File Connector.

Finding a dynamic way to do this would allow me to stay on top of any changes that get made without my knowledge (as it's another team that manages ElasticSearch) by automatically pulling in and flagging new fields in the mapping.

Best regards,

Justin

4 Replies
rai-jmcpheeters
New Contributor III

Re: REST Connector - Return JSON Response without SQL SELECT

Hi Bala,

I've looked at these help pages before and they did help me figure out how to set up the connections, do pagination, etc. However, they have not helped me find a way to get the raw JSON response back using this connector (at least that I can tell). Everything they describe there assumes a static structure for the data and it's pulled into Qlik using SQL SELECT.

I've found a way to "dynamically" script the queries (both JSON and SQL SELECT) using a mapping file that is maintained in Excel. However, this isn't truly dynamic, because the Excel file isn't tied in any way to the ElasticSearch mapping - it's simply a way that I found to get everything working for the time being. What I need is a way to pull in the entire mapping from ElasticSearch so that I can know all of the fields in the database, not just the ones that I've seen before.

Best regards,

Justin

Highlighted
duncanblaine
Contributor

Re: REST Connector - Return JSON Response without SQL SELECT

Hi Justin

Did you ever find a way to get the REST connector to return the raw data?
I'm struggling with this right now. I had been using Qlik Web Connectors (a paid add-on) which does give you access to the raw response data - so might be good for your needs. 
However I am trying to migrate away from the paid connector to the free REST connector and am finding it very frustrating that I can't get a raw response. 

MVP & Luminary
MVP & Luminary

Re: REST Connector - Return JSON Response without SQL SELECT

Hi,

I'm in exactly the same position, wanting to put a * into my REST script, but finding that is not valid syntax.

If QWC can do it it must be possible. My guess is that it is doing one call to read the metadata for the query, building the select statement in a loop (which would be simple in Qlik code) and then executing the second call.

Has anyone come up with a solution they can share?

Steve