Forum Discussion
abhi9255
8 years agoAdvocate II
How to set command timeout option
My query is taking more time to refresh and when i refresh im getting command timeout error . So i need to set command timeout option in Power BI desktop but it is disabled at the moment how to enab...
- 8 years ago
Hi abhi9255,
For SQL database, we can change the command timeout in Advanced options of Data source settings directly.
And here is the M code for your reference.
let Source = Sql.Databases("Servername", [CommandTimeout=#duration(0, 0, 35, 0)]), TestGatewayDocs = Source{[Name="databasename"]}[Data], dbo_Product3 = databasename{[Schema="dbo",Item="Product3"]}[Data] in dbo_Product3Regards,
Frank
v-frfei-msft
8 years agoCommunity Support
Hi abhi9255,
For SQL database, we can change the command timeout in Advanced options of Data source settings directly.
And here is the M code for your reference.
let
Source = Sql.Databases("Servername", [CommandTimeout=#duration(0, 0, 35, 0)]),
TestGatewayDocs = Source{[Name="databasename"]}[Data],
dbo_Product3 = databasename{[Schema="dbo",Item="Product3"]}[Data]
in
dbo_Product3
Regards,
Frank
Anonymous
4 years agoNot applicable
This does not necessarily help! We are running queries against an MSSQL DB and no matter where these values are set, the flows can fail after around 15 minutes due to timeout issues. You may need to contact the DB or Gateway admin to adjust the settings on their side.