MetricSign
EN|NLRequest Access
High severityconnection

Power BI Refresh Error:
ProgrammingError: 000630

What does this error mean?

The Snowflake Python connector raised a ProgrammingError with error code 000630, indicating that a SQL statement exceeded the configured STATEMENT_TIMEOUT_IN_SECONDS parameter. The statement was automatically cancelled by Snowflake.

Common causes

  • 1A complex analytical query or large COPY INTO operation ran longer than the session or warehouse-level STATEMENT_TIMEOUT_IN_SECONDS
  • 2A warehouse was suspended mid-query and the resume latency pushed execution past the timeout
  • 3A Python script held a long-running cursor open and the timeout expired before fetching results
  • 4Concurrent queries on a small warehouse caused queuing that pushed total time past the limit
  • 5The timeout was set too low at the user or session level, overriding a more generous warehouse setting

How to fix it

  1. 1Increase the timeout for the specific query: ALTER SESSION SET STATEMENT_TIMEOUT_IN_SECONDS = 3600;
  2. 2Check the effective timeout hierarchy: user > session > warehouse > account — the lowest value wins.
  3. 3Use a larger or dedicated warehouse for long-running operations to reduce queuing time.
  4. 4Break large COPY INTO or analytical queries into smaller batches.
  5. 5Use cursor.execute_async and poll with cursor.is_still_running() for long operations to avoid blocking.

Frequently asked questions

Which STATEMENT_TIMEOUT_IN_SECONDS setting takes precedence?

Snowflake applies the most restrictive (lowest) value across the hierarchy: user-level, session-level, warehouse-level, and account-level. Verify all four with SHOW PARAMETERS LIKE 'STATEMENT_TIMEOUT%'.

Can I set a per-query timeout in Python?

Yes — use cursor.execute(query, timeout=N) in the Python connector to set a per-statement timeout in seconds. This overrides the session-level setting for that specific execute call.

Other connection errors