Forum Discussion
How to disable an api call?
- 9 years ago
Hi Martyn,
this sounds like a request for incremental load - which is not natively implemented, but there are a couple of workarounds for it.
Principle here would be to store the data that you've already retrieved either in a "non-refreshable"-query in the query-editor (http://www.thebiccountant.com/2017/01/11/incremental-load-in-powerbi-using-dax-union/) or in an Excel- or csv-file (http://www.thebiccountant.com/2015/12/28/how-to-export-data-from-power-bi-and-power-query/).
You then merge this with your master-table containg all "Review"-values on Left- or Right-Anti in order to return only those values who haven't been passed to the API yet. Then append both tables to get all results in one again.
Or are you looking for sth different?
Hi Imke,
Many thanks for getting in touch.
I have a table that contains a field called 'Reviews' - this field contains text received from a customer survey. What I'm doing is to call the Azure Sentiment API pushing the 'Review' text via the api - I then get a sentiment score back from the api which I store in another field in the same table called 'Sentiment Score'. I have created a function for the purpose of calling the api. In simple terms that's it - it works really well.
However, my Azure account allows me 10K api calls a month for free - after that I have to pay, so I don't want to use up free api calls to re-score 'Reviews' that have already been scored.
So I'm trying to find a way whereby I only submit new records to the api, new records being those that haven't got a sentiment score, rather than submitting all of the records in the table when there may only have a handful of new records.
I hope this makes things a bit clearer?
Best wishes,
Martyn
When I get a new 'Review' in the database I have to call the api again to get a score for it.
Hi Martyn,
this sounds like a request for incremental load - which is not natively implemented, but there are a couple of workarounds for it.
Principle here would be to store the data that you've already retrieved either in a "non-refreshable"-query in the query-editor (http://www.thebiccountant.com/2017/01/11/incremental-load-in-powerbi-using-dax-union/) or in an Excel- or csv-file (http://www.thebiccountant.com/2015/12/28/how-to-export-data-from-power-bi-and-power-query/).
You then merge this with your master-table containg all "Review"-values on Left- or Right-Anti in order to return only those values who haven't been passed to the API yet. Then append both tables to get all results in one again.
Or are you looking for sth different?
- ImkeF9 years agoCommunity Champion
btw: You can also use Powershell for the export (there you could even schedule the execution) - all hacky of course...
- martynhale9 years agoFrequent Visitor
Many thanks for your feedback, I'll give it a go.
Martyn