MetricSign
EN|NLRequest Access
High severitydbt

Power BI Refresh Error:
Runtime Error: Failed to connect

What does this error mean?

Dbt could not establish a connection to the data warehouse. Credentials are invalid, the host is unreachable, or a firewall is blocking the connection.

Common causes

  • 1Invalid warehouse credentials (username, password, account identifier)
  • 2The warehouse host or port is incorrect in profiles.yml
  • 3A network firewall or security group is blocking outbound connections to the warehouse

How to fix it

  1. 1Run `dbt debug` to test the connection — it reports the specific connection error from the warehouse driver.
  2. 2Verify the host, port, database, schema, user, and password in profiles.yml are correct for the target environment.
  3. 3Confirm the warehouse is accessible from the machine running dbt — for Snowflake, try connecting via SnowSQL; for BigQuery, try `bq ls`; for Redshift/Postgres, use psql.
  4. 4Check whether the warehouse has an IP allowlist and add the IP of the machine running dbt. For dbt Cloud, add the published dbt Cloud IP ranges.
  5. 5Ensure the service account or user has been granted CONNECT (or equivalent) privileges on the target database and schema.

Frequently asked questions

How does a dbt connection failure affect Power BI?

If dbt fails to connect, no models are built. Power BI datasets reading from dbt-managed tables will refresh successfully but serve data from the last successful dbt run — potentially hours or days old.

What causes intermittent dbt connection failures?

Common causes: warehouse auto-suspend (Snowflake, Synapse serverless), transient network issues, or credential validation failures during high load. Add retry logic to the dbt Cloud job or CI/CD step if failures are intermittent.

Does this error mean my warehouse credentials are wrong?

Not necessarily — network issues, a paused warehouse, or bad credentials can all cause this. Run the connection test in dbt Cloud: if it passes, the issue is transient; if it fails, fix credentials or host configuration.

Official documentation: https://docs.getdbt.com/guides/debug-errors

Other dbt errors