-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with PowerBI service #16
Comments
Testing LibPQ with PowerBI service
|
I have made some changes in the main LibPQ module. Now it uses static base URLs for web modules. If PBI service performs its checks at runtime, that should be enough. If it runs checks only once at import, we will need to define some hacky no-ops in the LibPQPath. @spythan, please test both old and new LibPQ with the PowerBI service. Thank you very much! |
Mate I just saw these updates, I will review and answer in a couple of days! |
I tested both master and pbi-service versions as requested, both are working! I also published a test project report online, connecting to external sources, and it works just fine. When I first asked I wasn't even thinking about that Regarding Scheduled Refresh though, this message appears: Currently I have some ground to cover in my project before needing to solve this problem, but will probably come back to it when I need it. Any of your suggestions are very welcome. For future reference, this resource will probably come in handy. |
Thank you very much! The fact that local paths still work surprises me, but I'm not familiar with caching mechanisms PBI service uses. Could it be that by default it just publishes the results you've calculated locally unless you "force" the refresh in some way? I'm pretty busy this week but I'll try to look more into this next week. |
I have much more information on PBI Service. Because Refresh button isn't deactivated , nor any visual feedback if no refresh is actually ran, in PBI Service, I didn't realize that in my case the queries weren't running again at all, I only had the original data. That happened because refresh wasn't really enabled at all. I set up both personal and enterprise gateways - a gateway is required if you want to refresh a on-premises source, like database, in PBI Service. I found more info in the Refresh History pane after failed manual refresh attempts: |
Well... I'm stuck. I've signed up for the free tier of Power BI service and have gotten the same results as you. Looks like PBI service needs to be able to statically analyze the destination of each Here is the smallest demo of failing query: let
Choices = {"https://google.com", "https://github.com"},
Random = Number.Round(Number.RandomBetween(0,1), 0),
Address = Choices{Random},
Lines = Lines.FromBinary(Web.Contents(Address))
in
Lines Same as with LibPQ it is not possible to detect which address will be fetched without executing the code. So PBI service plain out forbids executing it. I hoped that there would be a way to mark all possible destinations as allowed but PBI service does not seem to execute any of its checks at runtime. Currently I see the following options:
I will think about this issue some more and will come back here next week. |
I have made another attempt at this and have failed again. Turns out PBI service does not allow some functions/expressions in refreshable queries period, no matter the clever hacks and conditional no-ops. Smallest demo of non-working query: if false then Record.FieldNames(#shared) else "hello world" This line will make the whole dataset non-refreshable in PBI service. Same as with At this point I'm out of ideas on how to reconcile the service's restrictions with current LibPQ loader. I believe it is still technically possible to load LibPQ modules into PBI service, but the loader for the service may not be the same as for standalone workbooks and will have less functionality than the main loader. As I'm not seeing much demand for this feature, I'm putting this issue on hold. Everyone is welcome to contribute the alternative loader though. If there are volunteers I can offer my expertise and try to answer any encountered questions. |
I believe that |
I'm not sure if how many things in this library prevent it from running in the Power BI Service, but at least I have a solution for
Then, when clients wants to use this function they have to define
The obvious drawback is that this is more complicated than a simple call to a function, but the unquestionable advantage is that it passes all the checks and works everywhere. I used this approach successfully in my PQ library for interacting with Azure DevOps. |
Oh, that's clever! Thank you for sharing with us!
Unfortunately, as @hohlick has pointed out, Web.Contents is not the only
problem with using LibPQ in PBI service - #shared is also essential. So the
overall issue remains unsolved.
You've got us one step closer though! That's cool! :-)
|
I don't think that #shared will be enabled in PowerBI service. It would allow you to enumerate over all the functions including functions from non-public modules. You will need to find a different way :( |
Looks like LibPQ can not be used in PowerBI service because of providing dynamic arguments to
Web.Content()
. This page is the place to discuss, develop and test possible workarounds.Important
I have no account with PowerBI service, so I will need outside help to do the tests
Roadmap
The text was updated successfully, but these errors were encountered: