Forum Discussion

Alex_Ooi's avatar
Alex_Ooi
Helper IV
6 years ago
Solved

PostgreSQL Timeout Error

Hi,   I need your expert advice and possible workarounds that are not too manual for the timeout error I encounter every time I query my dB in PostgreSQL. This is the same type of error appearing i...
  • v-xuding-msft's avatar
    v-xuding-msft
    6 years ago

    Hi Alex_Ooi ,

    Maybe you could reference the ways to change timeout parameters to check if you could connect the data source without an error. 

     

    1. Add timeout parameter to connection string:

    • Connect Timeout=xx  (xx = seconds)

    2. Otherwise, you could add  timeout parameter to Query argument within M Code / Advanced Editor:

    • let
      Source =
      Odbc.DataSource(
      xxxxxxxxxxxxxxxxx,
      [Query = "xxxxxxxxx",CommandTimeout =#duration(0,1,0,0)]
      )
      in
      Source 

     

    Reference:

    https://docs.microsoft.com/en-us/powerquery-m/odbc-datasource

     

    Best Regards,

    Xue Ding

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