Qlik Community

Qlik Connectors Discussions

Discussion Board for collaboration regarding Qlik Connectors.

Vaati
New Contributor

Rest Connector - looping through urls , different json schemas

Hello ,

I have this issue with my qlik script. I've created a loop which changes a variable of the Url im getting by values in a certain list. All works fine, except for the problem of data returned. 

Not all Url's have data returned, and that is expected, however this is the only way i can fetch the url's with actual data.

The problem is that when i run the script, after fetching both json field types(for urls with data & for urls without), it gives an error for "field not found".

I do understand that the loader is trying to find a specific field for each table, but these fields don't exist for all tables that are returned.

Is there a way i can bypass this, concatenate the tables that return data, and discard or at least autogenerate nulls for the ones that dont?

Thank you 

Labels (3)
3 Replies
Partner
Partner

Re: Rest Connector - looping through urls , different json schemas

How about setting errormode to 0?

 

If that doesn't work insert IF condition into the loop to skip if the field doesn't exists (use either NoOfFields or FieldName functions)

gal_polak
New Contributor III

Re: Rest Connector - looping through urls , different json schemas

I don't have answer for you, sorry,
but i have a question,
how do you look through the URL? 🙂
Vaati
New Contributor

Re: Rest Connector - looping through urls , different json schemas

Hey David,

 

I've tried already the error mode, and it works after a long while...However, judging by the loading time data manager needs afterwards ( esentially forever since i never managed to get after the buffering), i think the tables get recognized as separate ( and i have in the thousands of them).

I'll try the If in For loop and let you know if it solves the issue.

Thanks