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