Greetings experts! I'm trying to retrieve Power BI Dataflow connected to Gen2 Blob storage location. I can retrieve the list of blobs (Lists blob (V2)) that represent the entities from each Dataflow refresh from the 'model.json.snapshots/ folder. Now I need to select the name of the blob with the most recent data in it, e.g. the third blob in this set:
model.json@snapshot=2021-12-29T13:43:11.8221557Z
model.json@snapshot=2021-12-29T15:42:47.6820754Z
model.json@snapshot=2022-01-02T13:57:44.4572616Z
Then I plan to set that file name to a variable and use as a parameter in a Get Blob Content action.
Being new to Power Automate and finding on-line resources to be very inconsistent, I'm looking for some expert help.
Kind regards,
Jeff
Solved! Go to Solution.
Thanks Wearsky! I could not figure out how to integrate your suggestion into my solution, but it did force me to study JSON and the Workflow Language Definition to better understand your suggestion and ultimately create a solution. Here is what I did:
This is working as desired, although it relies on the last blob in the collection as always being the last one created (i.e. the csv Power BI entity from the most recent refresh). I suppose that there is a way to make this more robust using your method, but I haven't been able to work that out (yet).
Thanks again!!
I should also note that the output from the Lists Blob V2 action is a JSON object, which I then pass to a Create CSV table that generates the lines pasted above. I need to get the JSON member for the most recent datetime, so maybe it is not necessary to make the csv first. How can I extract/query the member with the recent datetime? Here is the JSON output from the List blobs action:
Hi @JeffN ,
I did a test for you.
[
{"blob":"model.json@snapshot=2021-12-29T13:43:11.8221557Z"},
{"blob":"model.json@snapshot=2021-12-29T15:42:47.6820754Z"},
{"blob":"model.json@snapshot=2022-01-02T13:57:44.4572616Z"}
]
{"blob":@{items('Apply_to_each')['blob']},"Date":@{formatDateTime(substring(items('Apply_to_each')['blob'],add(1,indexOf(items('Apply_to_each')['blob'],'='))),'dd-MM-yyyyTHH:mm:ss')},"ticks":@{ticks(formatDateTime(substring(items('Apply_to_each')['blob'],add(1,indexOf(items('Apply_to_each')['blob'],'='))),'yyyy-MM-ddTHH:mm:ss'))}}
Best Regards,
Wearsky
Thanks Wearsky! I could not figure out how to integrate your suggestion into my solution, but it did force me to study JSON and the Workflow Language Definition to better understand your suggestion and ultimately create a solution. Here is what I did:
This is working as desired, although it relies on the last blob in the collection as always being the last one created (i.e. the csv Power BI entity from the most recent refresh). I suppose that there is a way to make this more robust using your method, but I haven't been able to work that out (yet).
Thanks again!!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
29 | |
27 | |
23 | |
17 | |
10 |
User | Count |
---|---|
66 | |
58 | |
29 | |
27 | |
25 |