Deployment pipelines can be used to deploy Power BI reports that contain R or Python scripts, but there are some restrictions and important factors to take into account.
Important Things to Remember: Support for R/Python Visuals
Reports with embedded R or Python visuals are supported by deployment pipelines in the same way as other reports.
The scripts are included in the PBIX file and are deployed with the report.
Requirements for the Runtime Environment
R and Python scripting must be supported by the Power BI Service workspace, which is the target environment.
The environment may occasionally need to be configured for script execution, and users viewing the report in Power BI Service must have the necessary permissions.
Refreshing Data and Running Scripts
When viewing a report, R/Python visuals are displayed either on the client side or in the Power BI Service sandbox.
For datasets using R/Python scripts for data transformation in Power Query, ensure the Power BI Gateway supports running those scripts during refresh in on-premise scenarios.
Restrictions
Because of sandbox limitations, certain R/Python packages or scripts might not be able to run in Power BI Service.
Resource-intensive or lengthy scripts may slow report performance or result in refresh failures.
R/Python scripts are not given special treatment by deployment pipelines; script validation is done by hand.
Top Techniques
Before moving to production, thoroughly test all R/Python scripts and visuals in the development and test phases.
Keep track of any necessary gateway configurations or environment dependencies.
If scripts are complicated or malfunctioning, take into account other approaches (such as externally pre-processing data).