schema_index times out on large Snowflake databases
Bug
schema_index times out when indexing a Snowflake database with a large number of schemas/tables, with no progress feedback or ability to scope the operation.
Steps to Reproduce
- Connect to a Snowflake warehouse with many schemas/tables
- Run
schema_index [warehouse=jaffle_shop] - Indexer times out with no useful output
Expected Behavior
- Progress feedback: Show incremental progress (e.g., "Indexed 5/42 schemas...")
- Timeout configuration: Allow users to increase the timeout for large databases
- Partial results: Return whatever was indexed before the timeout rather than failing entirely
- Scoping: Allow indexing a specific schema rather than the entire database (e.g.,
schema_index [warehouse=jaffle_shop, schema=public])
Context
Large production Snowflake databases can have hundreds of schemas and thousands of tables. The current indexer appears to attempt a full catalog scan with a fixed timeout, making it unusable for these environments.
Same here. It effectively keeps me from trying out Altimate Code, as thus past of the discover initialization is failing.
No progress shown, no more Snowflake queries running, no more tokens used, no timeout even after hours of waiting patiently. Just stalled.
My guess is that in our case it's the persisted dbt tests that live in a DB schema of their own and which can be thousands of tables.
I'd love to be able to even try Altimate Code, but without a schema index, I see no added value over other harnesses.
Suggested path forward:
- Scan DB schema iteratively, one DB schema at a time
- Prompt user with a select-multi list for including/excluding specific schemas
- Show progress of the operation
- Bonus: Tell the user what's the lifecycle of a schema scan: when should the scan be repeated in the future