mvfc commented on code in PR #50001: URL: https://github.com/apache/airflow/pull/50001#discussion_r2070320989
########## providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/powerbi.py: ########## @@ -167,3 +171,182 @@ def execute_complete(self, context: Context, event: dict[str, str]) -> Any: ) if event["status"] == "error": raise AirflowException(event["message"]) + + +class PowerBIWorkspaceListOperator(BaseOperator): + """ + Gets a list of workspaces where the service principal from the connection is assigned as admin. + + .. seealso:: + For more information on how to use this operator, take a look at the guide: + :ref:`howto/operator:PowerBIWorkspaceListOperator` + + :param conn_id: Airflow Connection ID that contains the connection information for the Power BI account used for authentication. + """ + + def __init__( + self, + *, + conn_id: str = PowerBIHook.default_conn_name, + timeout: float = 60 * 60 * 24 * 7, Review Comment: > I would suggest here keep complete value instead of evaluating here and may be add a docstring how that value added. but what if someone changes the default connection name for some reason? it wont be in sync then, wouldn't it be better to evaluate here rather than hardcode it again? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org