Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Judicael
Partner - Contributor III
Partner - Contributor III

Transform Data

Hello,

I want to transform the data :

Field Title:

{"DATASET":"1"}
{"SOFTWARE":"5"}
{"SOFTWARE":"5,2","DATASET":"2"}
{"VENDOR":"1"}
{"VENDOR":"1,2","JOB_TITLE":"1"}
{"VENDOR":"2"}
NULL

Into 

Title, Value

DATASET, 1
SOFTWARE, 5
SOFTWARE,5

SOFTWARE,2

DATASET, 2
VENDOR,1
VENDOR,1

VENDOR,2

JOB_TITLE,1

NULL

{"VENDOR":"2"}
NULL

Thanks for your help,

 

Regards.

Labels (1)
1 Solution

Accepted Solutions
crusader_
Partner - Specialist
Partner - Specialist

Hi,

First of all you would need to replace some symbols in your values to be able to distinguish "internal" and "external" separators and after that iteratively apply subfield() function to achieve desired result.

PFA example, however perhaps you would need to adjust it to your data.

Hope this helps

//Andrei

View solution in original post

2 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi,

First of all you would need to replace some symbols in your values to be able to distinguish "internal" and "external" separators and after that iteratively apply subfield() function to achieve desired result.

PFA example, however perhaps you would need to adjust it to your data.

Hope this helps

//Andrei

qv_testing
Specialist II
Specialist II

Hi, 

Try this...

Load *, PurgeChar(Subfield(Title, ':', 1), '"') as Feild;
Load *, Subfield(PurgeChar(Subfield(Title, ':', 2), '"'), ',') as Value;
Load * inline [
Title
"DATASET":"1"
"SOFTWARE":"5"
"SOFTWARE":"5,2","DATASET":"2"
"VENDOR":"1"
"VENDOR":"1,2","JOB_TITLE":"1"
"VENDOR":"2"
];

-Raju