Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
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

Nagaraju_KCS
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