Forum Discussion

tecumseh's avatar
tecumseh
Resolver III
1 year ago
Solved

Export Dataset to Excel File On Schedule

Hi all, How can I export a dataset to Excel. Currently 88,600 rows in the dataset I added a Python Script as last step in Power Query but when I publish I cannot figure out how to setup Gatway fo...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi tecumseh ,

     

    You are correct, while the Power BI REST API doesn't impose a strict row limit, it does have a payload limit of approximately 1 MB per response, which can lead to truncated results for large or wide datasets, like what you experienced with Power Automate. You can find the official documentation for the API here: Execute Queries in Group – Power BI REST API.

     

    To work around this, consider reducing the number of columns returned and implement pagination logic in your DAX queries (e.g., filtering on row numbers or date ranges) to retrieve data in smaller chunks. However, for greater control and scalability, the most reliable method would be extracting data directly from Snowflake using Python (via the Snowflake Python Connector) and then exporting to Excel using libraries like pandas or openpyxl. This approach avoids API and gateway constraints and can be fully automated using Windows Task Scheduler or Azure Automation.

     

    If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

     

    Thankyou.