简体   繁体   中英

Error when scheduling refresh for Python script in Power BI

Hope to get some advice with Power BI schedule refershing Python script.

I can run the Python script in Power BI successfully. I am using Anaconda environment and I do have issue before when running it directly in Power BI Python script. However, after following the artile, How to Get Started Using Python using Anaconda, VS Code, Power BI and SQL Server , which I find oneline, it now works. I can run the script in Power BI Desktop successfully. The problem now is that when I try to automate the Python script using schedule refresh Gateway Personal mode connection, it pops up error again. Please see below for details. I am using personal gateway. I cannot find a solution online. Could anyone let me know what is wrong with it? Thanks!

Failed to update data source credentials: ADO.NET: Python script error. C:\Users\becky.lam\Anaconda3\lib\site-packages\numpy_ init _.py:143: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service from. import distributor_init Traceback (most recent call last): File "C:\Users\becky.lam\PythonScriptWrapper_a418e530-37dc-4b01-9ce1-9ef57887a15a\PythonScriptWrapper.PY", line 2, in import os, pandas, matplotlib File "C:\Users\becky.lam\Anaconda3\lib\site-packages\pandas_ init .py", line 16, in raise ImportError( ImportError: Unable to import required dependencies: numpy: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE. Importing the numpy C-extensions failed, This error can happen for many reasons. often due to issues with your setup or how NumPy was installed: We have compiled some common reasons and troubleshooting tips at: Please note and check the following: * The Python version is. Python3:9 from "C.\Users\becky.lam\Anaconda3\python:exe" * The NumPy version is. "1.20.3" and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help: Original error was: DLL load failed while importing _multiarray_umath. The specified module could not be found. Hide details

I recommend you to unistall anaconda and use only the Python IDLE. Set as path, open cmd then use: py -m pip install 'name of the packges'

Power Bi needs at least those ones: matplotlib numpy pandas os

Then open Power Bi, go to: Options - Python Scripts -> Use the IDLE file (Eg: ./python310.py) as interpreter.

If more libraries are needed the Power Bi Desktop will tell you. Use the previous process to install then.

This should solve the problem.

Firstly, check whether the below steps were followed: Consider a dataset (bring the raw data) into power bi desktop -> get data -> hit web -> paste the URL of the google sheet -> copy the link

A connection will be established between the report in our power bi service to the spreadsheets in google sheets.

Data can be in the form of Google sheet (or) CSV files

Ensure that the link provided on the web should be correct.

So let's bring in the table -> load it -> create a dashboard to determine the data distribution -> save the report -> publish it in my workspace into the service.

Now we have the power bi report that we created for our service and we will be able to see our dashboard in the workspace.

To validate go to data sets -> click the ellipsis icon -> settings -> data sets.

We need to make sure that the data source credentials are okay.

In power bi reports -> open the data set -> hit refresh now -> just refresh the visuals and it should update things automatically.

Schedule Refresh - we wanted to just refresh based on the schedule that we set. Settings menu -> data sets -> settings -> schedule refresh (expand it) now it's off by default and it won't let you turn it on unless you have no issues with the data source credentials. everything needs to be okay there and once that's all okay -> toggle the on so that allows you to refresh your reports based on the scale to reset(Daily or Weekly).

Under the Scheduled Refresh -> Refresh Frequency Here we have a few options to set the refresh frequency to daily or weekly.

Daily - Refresh Frequency within a day can be set up to eight times. we can add up to eight different entries here.

Under send refresh failure notifications we can select the dataset owner or certain people if there are any issues with refreshing your report maybe there are some problems with the google sheet maybe it's been deleted or edited the wrong way and the refresh fails when that happens an email gets sent to the people based on the option we have opted saying that there is a problem and what kind of problem it is.

The automated system is really handy to monitor any issues.

I hope my answer will help you, for any further issues please feel free to reply. Contributors from KLH: 2010030362,2010030550

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM