Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am new to QLIK Sense. I need help in getting this JSON Data loaded into a table.
Data loaded from QLIK Sense generated SQL is incorrect. The first 4 columns have correct data and rest don't.
Sample Data:
[{"name":"Dept1","Issues":[{"apps":54,"CRITICAL":37609},{"apps":59,"SEVERE":241422},{"apps":56,"MODERATE":476982},{"apps":17,"LOW":20835},{"apps":15,"NEGLIGIBLE":22572}]},
{"name":"Dept2","Issues":[{"apps":114,"CRITICAL":57275},{"apps":114,"SEVERE":148314},{"apps":103,"MODERATE":158047},{"apps":14,"LOW":6173},{"apps":14,"NEGLIGIBLE":4138}]}]
QLIK Sense generated SQL:
RestConnectorMasterTable:
SQL SELECT
"name",
"__KEY_root",
(SELECT
"apps",
"CRITICAL",
"SEVERE",
"MODERATE",
"LOW",
"NEGLIGIBLE",
"__FK_Issues"
FROM "Issues" FK "__FK_Issues")
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(Url "https://sampleServerRESTURL/");;
[Issues]:
LOAD [apps],
[CRITICAL],
[SEVERE],
[MODERATE],
[LOW],
[NEGLIGIBLE],
[__FK_Issues] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_Issues]);
[root]:
LOAD [name],
[__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__KEY_root]);
DROP TABLE RestConnectorMasterTable;
Hi,
What did you get from that script? This is mine and I think it is correct
Quy,
Thanks for validating it. I am a newbie to QLIK Sense JSON world. I did import the data to table and it is working as expected. QLIK Sense "collapses" values into single row if they have same value.
Understood and all good for now. Thanks for your help and time.
Appreciated.