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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error when extracting fields from json file - unbound prefix

Hi,

I'm trying to extract the fields "name", "type", "value" and "showvalues" from the json code below:

"categories": [{
	"id": "ident1",
	"properties": {
		"SP:name": {
			"name": "Name",
			"type": "String",
			"value": "value1",
			"showvalues": "showvalue1"
		}
	}]

by using the component tExtractJSONFields. My basic component settings look as follows:

 

0683p000009Lvec.png

When I run the job, I get the error message "Unbound prefix: SP". It works when deleting the "SP:" in the JSON file, but tha is not a permanent solution.

Any ideas how to solve this? Thanks in advance!

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
Before tExtractJsonfield, you can remove "SP:" using java code on tjavaRow. eg:
...tJavaRow--main--tExtractJsonfield....
on tjavaRow:
output_row.columnName=input_row.columnName.replaceAll("SP:","");

Regards
Shong

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi
Before tExtractJsonfield, you can remove "SP:" using java code on tjavaRow. eg:
...tJavaRow--main--tExtractJsonfield....
on tjavaRow:
output_row.columnName=input_row.columnName.replaceAll("SP:","");

Regards
Shong
Anonymous
Not applicable
Author

Hi Shong,

 

thanks for your answer, it worked perfectly.

 

Regards

weeze