I'm using Python in Power BI to connect to MySQL database, query and return data within the time range of a month, at the first beginning it works well since the data is less than 200,000 rows, however along with the growth of the data size, the Power BI returns an error of timeout after calculating for a long time.
I'm sure the timeout error is not caused by the Python script, because I verified in 2 ways:
- copied the scripts to VS code and PyCharm, the scripts could finish in a few minutes in both IDE, and the Python executables are the same as in Power BI, which is Python 3.8.2
- in Power BI, I reduced the time range of sql query to a week, it could finish well again.
I checked the document in Microsoft website and found Power BI will return an error if a Python scripts running over 30 minutes, but based on my test, the scripts in both VS code and PyCharm could finish with 3-5 minutes. Then I'm wondering if there is any limitation of data size, e.g. could not import data via Python scripts over 300,000 rows. If this is true, is there any solution since my data is certainly over 300,000 rows.