Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

janihenr
New Contributor

Problem in loading data fields and reading content from a field containing multiple data points in JSON format

Hi there,

I have problem related to loading a field and using JSON "->>" syntax. Example:

LOAD [id],

          [json_data];

SELECT "id",

          [json_data]->>'key1' as field_1,

          [json_data]->>key2' as field_2

FROM TABLE;

My question is that as I have several data fields within a single field  json_data, how can I add those to the available list in Qlik Sense.

In order to do this I would need to use LOAD statement. But because I need to first read the JSON text with SELECT, I cannot normally do this.

Yes, naturally there are some workarounds to create a separate table as part of the ETL process, but it would be nicer just to do this json reading part within Qlik.

1 Reply
janihenr
New Contributor

Re: Problem in loading data fields and reading content from a field containing multiple data points in JSON format

I found solution for this.

It was simply that I had wrong format.

When using [json_data]->>'key1' as field_1 syntax one needs to make sure you use [] in all LOAD statement data fields and load those.

I had some fields without [] and that caused the error.

Community Browser