Forum Discussion
Refresh error
Hello community,
I have a Power BI repport which gets data from a website. I can oppdatere data from the Repport ( desktop). When I publish it to the service and try to refresh the data I get error.:
--
DataSource.Error: The underlying connection was closed: An unexpected error occurred on a send.. https://... . The exception was raised by the IDbCommand interface. Table: ....
---
I wonder anyone can help me with this?
Thank you !
Hi HaiVN ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you ibarrau for the prompt response. Refreshing a report from the service with data directly from the web versus using a dataflow can have different implications due to the way data is handled and processed.
- When you refresh a report that gets data directly from the web, the service needs to connect to the web source each time to fetch the latest data. This can be challenging due to various factors such as network latency, data source availability, and the complexity of the data transformations required. If the web source is slow or unreliable, it can cause the refresh process to fail or take a long time.
- Dataflows are designed to handle data extraction, transformation, and loading (ETL) processes efficiently. When you use a dataflow, the heavy lifting of data transformations is done upstream, and the data is stored in a structured format that is optimized for quick retrieval. This means that when you refresh a report that uses data from a dataflow, the service can quickly access the pre-processed data, making the refresh process more reliable and faster.
Here are some general steps to solve the issue :
- When you connect directly to a web data source using Web.Contents(),ensure that the data source credentials are correctly configured in the Power BI Service. Navigate to the dataset settings and look for Data Source Credentials. Edit and update them if necessary.If there are any issues with the credentials, the refresh might fail.
- If you are using direct web connections, consider installing and configuring an on-premises data gateway. This will act as a bridge between Power BI Service and the web data source.
- Since dataflows are working well for refreshing data in the service, consider using dataflows for all web data sources. This approach can help manage and transform the data before it reaches the Power BI report, ensuring reliable refreshes.
- Check for any network restrictions or security settings that might be blocking the connection from Power BI Service to the web data source. Ensure that the website is accessible from the Power BI Service environment.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Rama U.
- When you refresh a report that gets data directly from the web, the service needs to connect to the web source each time to fetch the latest data. This can be challenging due to various factors such as network latency, data source availability, and the complexity of the data transformations required. If the web source is slow or unreliable, it can cause the refresh process to fail or take a long time.
10 Replies
- ibarrauSuper User
Hi. Depending on how you are connecting with Power Query you should do different things.
- If you are getting data like an API using web.contents() only, then you should just open the semantic model settings, find data source credentials, expand and configure the source with warning sign.
- If you are scrapping the web like using web.pages(), then it requires to install an onpremise data gateway in a VM/PC in order to work as a bridge between power bi cloud and the transformations to get the data from the web.
I hope that helps,
- ibarrauSuper User
Hi. As you can see at the code, inside csv.document you have a web.contents. You can just go to the semantic model settings, look for Data Source Credentials and expand de menu to edit them. If you don't have any other source in the model, that would be enough to schedule a refresh without a gateway. If you have more sources it will depend on them too.
I hope that make sense
- v-venuppuCommunity Support
Hi HaiVN ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
- v-venuppuCommunity Support
Hi HaiVN ,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.
Thank you.