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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Read jSON with multiple data

Hi there,

 

I´m in trouble in reading data from a jSON-File with the following input:

 

{
"accountid": "AEX6376734",
"exhibitortype": "New Exhibitor",
"street": "Teststreet 1234",
"city": "Test City",
"email": "test@test.com"
"contact": {
"firstname": "Frank",
"lastname": "Master",
"contactphone": "+49 342823873",
"contactfax": null,
"contactmobile": null,
"contactemail": null,
"gender": null,
"salutation": null
}
}
{
"accountid": "AEX734875448",
"exhibitortype": "New Exhibitor",
"street": "Teststreet 5678",
"city": "Test City2",
"email": "test123231@test.com"
"contact": {
"firstname": "Robert",
"lastname": "Master",
"contactphone": "+49 12345",
"contactfax": null,
"contactmobile": null,
"contactemail": null,
"gender": null,
"salutation": null
}
}

 

I tried to create a meta-schema for this jSON but I only get the first data of this jSON. So it seems that it don´t iterate over the rest of the file.

So my result must return two sets of data.

 

AccountID: AEX6376734

AccountID: AEX734875448

 

My solution should be:

 

tFileInputJson -> tIterateToFlow -> tLogRow to test if it works.

 

Is anyone able to show me a solution how to read all the data iterated into tLogRow? How should I define loop element if I don´t have a group element.

 

Thx for your help.

 

 

Labels (4)
2 Replies
iamabhishek
Creator III
Creator III

How about something like this - tFileInputJSON - main - tMap - main - tLogRow

 

Job Layout - 

0683p000009Lz1o.jpg0683p000009Lz1y.jpg0683p000009Ly2S.jpgAlso, your json seems to be wrong and doesn't get validated. It should be something like this - 

		[{
			"accountid": "AEX6376734",
			"exhibitortype": "New Exhibitor",
			"street": "Teststreet 1234",
			"city": "Test City",
			"email": "test@test.com",
			"contact": {
				"firstname": "Frank",
				"lastname": "Master",
				"contactphone": "+49 342823873",
				"contactfax": null,
				"contactmobile": null,
				"contactemail": null,
				"gender": null,
				"salutation": null
			}
		}, {
			"accountid": "AEX734875448",
			"exhibitortype": "New Exhibitor",
			"street": "Teststreet 5678",
			"city": "Test City2",
			"email": "test123231@test.com",
			"contact": {
				"firstname": "Robert",
				"lastname": "Master",
				"contactphone": "+49 12345",
				"contactfax": null,
				"contactmobile": null,
				"contactemail": null,
				"gender": null,
				"salutation": null
			}
		}]
iamabhishek
Creator III
Creator III

How about something in the line of tFileInputJSON - > main - > tMAP -> main -> tLogRow

0683p000009Lyjb.jpg0683p000009Lyzj.jpg0683p000009Lydn.jpg