Forum Discussion
Rest API - parameters and custom function to get all the data - very slow loading
Hi all,
I have an API that looks like this: /v1/geodata/fishhealth/vesseltrack/{mmsi}/{year}/{week}
As you can see you need to specify mmsi (ship identifier), year and week. The thing is that I want the data of about a 100 ships for every week the last few years. To do this I have added parameters and a function, then I am running the function through a table with this information.
That should amount to maybe 100k rows of data, and the preview in query is performing well. But when I tried to load it to the report it is very slow and it seems to me like it handles one row at a time of the table I run the function through, which would amount too about 100x52x3 queries.
I have another similar connection that dumps a file to the query which has 500k rows, and that is performing like I am used to, so I am pretty sure invoking custum function has something to do with it.
Any ideas how to make this go quicker or any alternate solutions to fetch all the data, not only one vessel, one week?
Best regards,
Radiator
2 Replies
- lbendlinSuper User
Check the API documentation. Maybe they allow you to call
/v1/geodata/fishhealth/vesseltrack/{mmsi}/{year}
or even
/v1/geodata/fishhealth/vesseltrack/{mmsi}
- radiatorFrequent Visitor
Good Day Ibendlin, Thanks for your reply.
Here is what it is saying:
As you can see, all the fields are required, so I guess one have to use them to get it to work. Did a test now and it unfortunately did not work (datasource.errror, failed to get contents).
Best regards,
Radiator