-
Notifications
You must be signed in to change notification settings - Fork 15.2k
feat: added request_body
support in the PowerBIDatasetRefreshOperator
(enables support for enhanced dataset refreshes)
#51397
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
Conversation
835b590
to
0ea7ee9
Compare
0ed688c
to
4cb23d3
Compare
request_body
support in the PowerBIDatasetRefreshOperator
request_body
support in the PowerBIDatasetRefreshOperator
(support for enhances refreshes)
request_body
support in the PowerBIDatasetRefreshOperator
(support for enhances refreshes)request_body
support in the PowerBIDatasetRefreshOperator
(support for enhanced dataset refresh)
request_body
support in the PowerBIDatasetRefreshOperator
(support for enhanced dataset refresh)request_body
support in the PowerBIDatasetRefreshOperator
(enables support for enhanced dataset refreshes)
826233d
to
9a0399f
Compare
Some tests are failing |
I have the feeling it is not related to my changes, because they are failing since I rebased this morning. Logs also do not really show failures on unit/system tests, but on a docker image that cannot be found instead:
Just did another rebase, maybe it will solve the issue. |
e0b3c27
to
be641e1
Compare
86f00f6
to
3f3aeff
Compare
3f3aeff
to
d6bf194
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…`PowerBIDatasetRefreshOperator` - not tested yet
d6bf194
to
82bfc6d
Compare
Closes #50529
TL;DR;
Original implementation was done in #40356
PowerBIDatasetRefreshOperator
, in the form of arequest_body
that should map 1:1 with the DatasetRefreshRequest spec.retryCount
,timeout
(on the PBI side),maxParallelism
, ornotifyOption
.Manual testing:
For manual testing I used the breeze set-up which is described in the contribution quick-start guide. Besides that I registered an Azure Application and used option 1 in the Airflow Microsoft Azure connection guide to configure a
power_bi_default
connection within the local Airflow instance. For PowerBI I made use of the 60 days trial, which allows you to have a pro-license for 60 days and makes it possible to test this functionality.For manual testing I used the following sample DAG, and tweaked around with the original parameters group_id, dataset_id, and the newly added parameter request_body:
✅ Test case 1 - invalid dataset_id and group_id should cause 404
input:
logs:
✅ Test case 2 - correct dataset_id and group_id (empty request_body) should refresh dataset as a whole (so all objects within the dataset)
input:
logs:
✅ Test case 3 - correct dataset_id and group_id refreshing a specific table via the new request_body param
input:
logs:
(Shows specifically via

enhanced API
for this request with a body, targeting specific objects):I really tried looking for a place in the PowerBI service app portal where I can show that specifically
crime
andwaste_and_diversion
are refreshed, but I couldn't find this anywhere.✅ Test case 4 - correct dataset_id and group_id with a request_body containing tables that do not exist
input
logs
I also did a test putting entries in the request body that are not supported by the API reference, it seems like the API just ignores these entries (does not throw a 400 bad request for example).
Could improve the PR by adding a pydantic / typeddict / dataclass for the request body, to improve the UX. On the other hand it will also increase the coupling (e.g. requires "client side" changes when the upstream API changes it's spec, for example due to added fields), want to keep this decision up to a reviewer with more provider experience.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in airflow-core/newsfragments.