Thank’s for the help.
I want to have data from Tags and alarm in PowerBI.
I want the less transition possible between my Flexy, and Power BI (final destination of my data).
If possible, Tags retrieved periodically and alarm retrieved when value of alarm changes.
What do you propose ?
- 1st solution - 0 transition between flexy and powerbi, quick to implement (best option) :
sending HTTP request from the Flexy to implement data set in powerBI. The same way Simon did it in the techforum.post you send me. The difference is that I made one Json for Alarms (ONALARM or ONCHANGE), and one Json for Tags (ONTIMER)
I created 2 different streaming Datasets because I didn’t find an other way to follow my conditions. Maybe there is an other way, without creating this type of dataset?
- 2nd solution - 1 transition (still good option because DataMailBox is automaticaly filled) :
Using Power Query to retrieve data from DatamailBox (directly).
Picture from 1st query (and response on the right) :
Picture from 2nd query (and response on the right)
I made up a function to get data from DMBox. Function has one parameter : “transactionId”
I get :
_“DATA”: my data, as a list
_NEXT : the transaction ID I have to put in next url to have the next page of data from DMBox, and so on (this is explained in the document you posted).
_ISMORE : my “condition”. If ISMORE = TRUE, I still have more data to retrieve.
Now, I need a loop that makes a new request until ISMORE is not equals TRUE. This desired loop would use NEXT as parameter for the next request function. Finally, the desired loop will only keep the DATA of every function call. This is where I’m stuck.
There is not a real loop function in PowerQuery (like do while in other languages). So I found a function that should do a loop : List.Generate(). I put the code I made in PowerQuery in last post.
I explained everything, if you have any suggestion, I would be thankfull.