Fix Snowflake Import Timeouts in Bloomreach
Bloomreach wraps custom SQL queries with a LIMIT 5 clause during import preview execution and enforces a strict 60-second timeout on all preview operations.

When you click Preview data in the Data & Assets > Imports interface, Bloomreach executes your query against the connected Snowflake warehouse to validate column schemas and return sample rows before you configure attribute mapping.
How mature is your CRM setup?
Find out in minutes with a free CRM maturity check.
This preview execution is separate from scheduled background imports, which do not carry the 60-second constraint.
The timeout exists to prevent long-running queries from blocking the setup workflow. If your preview query exceeds 60 seconds, Bloomreach terminates it and displays a timeout error, even if the query would eventually complete. This timeout applies regardless of whether the query runs successfully in Snowflake’s native interface or through other tools.
How query wrapping with LIMIT 5 impacts performance
Snowflake cannot execute LIMIT pushdown when queries contain GROUP BY, window functions, multi-table joins, repeated CTEs, or outer ORDER BY clauses without inner limits. LIMIT pushdown means Snowflake stops evaluating rows as soon as it reaches the requested row count. Without pushdown, Snowflake must calculate the entire underlying result set before returning the 5 rows Bloomreach requests.
A query with a single GROUP BY or a two-table join forces Snowflake to aggregate or join all rows in the source tables, then extract 5 rows from the result. For large datasets, this evaluation can easily exceed the 60-second preview timeout. The LIMIT 5 wrapper does not reduce the computational cost of these operations; it only limits the final output size.
Window functions and CTEs (common table expressions) trigger the same behavior. Snowflake must fully evaluate the window partition or materialize the CTE before it can apply LIMIT. Outer ORDER BY clauses require Snowflake to sort the entire result set before selecting the first 5 rows, which is computationally expensive on large tables.
Comparing Snowflake SQL Query mode and Table mode
Query mode allows you to write custom SQL and import the result set directly into Bloomreach. Table mode imports data from a native Snowflake table or view without a custom query wrapper. Both modes execute preview queries with the same 60-second timeout and LIMIT 5 wrapping.
The structural difference is that Table mode avoids custom SQL execution overhead. Snowflake can apply LIMIT pushdown to a simple table scan, returning 5 rows almost instantly. If your table has a clustered key or partitioning, Snowflake can read only the required partitions, further reducing preview latency.
Query mode offers flexibility to filter, join, or transform data before import. Table mode offers performance and a critical feature: delta sync support. Scheduled imports in Table mode can detect and sync only new or changed rows if you enable Snowflake CHANGE_TRACKING on the source table. Query mode does not support delta updates; every scheduled import runs the full query and reimports all matching rows.
Enabling delta sync updates for Snowflake imports
Delta updates and change tracking in Bloomreach require Table mode imports and are not supported for custom Query mode imports. To enable delta sync, you must import from a native Snowflake table or view with CHANGE_TRACKING enabled at the table level in Snowflake.
In Snowflake, enable change tracking on your source table with the ALTER TABLE statement. Bloomreach then detects the CHANGE_TRACKING metadata and offers delta sync as an option during import configuration. Once enabled, scheduled imports track which rows changed since the last sync and import only those rows, reducing data transfer volume and Bloomreach processing time.
If you need to import transformed or aggregated data with delta sync, create a Snowflake materialized view or scheduled table that precomputes the transformation, enable CHANGE_TRACKING on that object, and import it in Table mode. This approach combines the flexibility of custom logic with the performance and delta sync benefits of Table mode.
How mature is your CRM setup?
Find out in minutes with a free CRM maturity check.
Creating a Snowflake view to optimize imports
Create a Snowflake view or materialized view to precompute complex query logic and bypass preview timeout failures. A standard view executes the underlying SQL each time it is queried; a materialized view stores the result and refreshes on a schedule you define.
For a materialized view, use the CREATE MATERIALIZED VIEW syntax and refresh it on a schedule that aligns with your Bloomreach import frequency. If you import daily, refresh the materialized view daily before the import runs. Snowflake materialized views support CHANGE_TRACKING, so you can enable delta sync on the materialized view itself.
Example DDL pattern: Create a materialized view that aggregates event data by customer and date, filtering out test records and applying business logic rules. Then import that materialized view in Table mode using CHANGE_TRACKING. The preview executes LIMIT 5 against the precomputed result, completing instantly. Scheduled imports sync only rows that changed since the last run.
If your transformation includes a GROUP BY or window function, embed it in the materialized view definition. The view materializes the aggregation once; subsequent queries read the precomputed result without recalculating. This approach moves the computational cost from preview time (where you have a 60-second budget) to view refresh time (where you can allocate as much time as needed).
Troubleshooting Bloomreach data import timeout errors
Start by running your custom SQL query directly in Snowflake using a SQL editor, with and without the LIMIT 5 wrapper. If the query completes in under 60 seconds in Snowflake, the timeout is likely caused by warehouse sizing or query plan inefficiency. If the query exceeds 60 seconds even in Snowflake, you must optimize the SQL or migrate to a precomputed view.
Check your Snowflake warehouse size and active query load. A small warehouse or a warehouse running other queries concurrently may not allocate enough compute to your preview query. Temporarily increase the warehouse size or run the preview during off-peak hours to isolate whether warehouse capacity is the bottleneck.
Review the query execution plan in Snowflake’s query history. Look for full table scans, hash joins on unindexed columns, or missing partition pruning. If the plan shows a full scan of a large table, add a WHERE clause to filter by date, customer ID, or another partitioned column. If the plan shows a hash join, ensure the join columns are indexed or consider denormalizing the data into a single table.
In implementation workflows, we observe that teams often discover the timeout occurs because the preview query differs from the production query. Verify that your preview query in Bloomreach matches the SQL you tested in Snowflake, including all WHERE clauses and join conditions. If the query is correct but still times out, create a Snowflake view to precompute the result, then switch the import to Table mode.
| Import Mode | Preview Processing Behavior | Delta Sync Support | Recommended Data Architecture |
|---|---|---|---|
| Query mode | Wraps custom SQL with LIMIT 5; 60-second timeout applies | Not supported | Use for filtered or joined data that does not require incremental updates |
| Table mode | Applies LIMIT 5 directly to table; instant preview for simple scans | Supported with CHANGE_TRACKING enabled | Use for large tables, incremental syncs, or data requiring delta updates |
| Materialized view mode | Queries precomputed result; LIMIT 5 executes instantly | Supported with CHANGE_TRACKING enabled | Use for complex transformations, aggregations, or window functions |
FAQ
Bloomreach terminates the preview query execution when the 60-second timeout expires. Whether Snowflake continues processing the cancelled query depends on Snowflake’s internal query lifecycle; from Bloomreach’s perspective, the preview operation has ended and no result is returned.
Warehouse sizing depends on your query complexity and dataset size. A small warehouse may be sufficient for simple table scans or filtered queries; complex joins or aggregations benefit from a medium or larger warehouse. Monitor query execution time in Snowflake for your specific queries and allocate accordingly.
Yes, CTEs are valid SQL syntax in Bloomreach Query mode. However, CTEs do not enable LIMIT pushdown in Snowflake, so a CTE query will evaluate the entire CTE result set before Bloomreach applies LIMIT 5. If your CTE query times out, materialize it as a Snowflake view instead.
Query mode does not support delta sync because Bloomreach cannot reliably track which rows changed between imports when the query logic includes joins, aggregations, or filtering. Delta sync requires importing from a native table with CHANGE_TRACKING enabled. If you need delta updates with transformed data, create a Snowflake materialized view with CHANGE_TRACKING and import it in Table mode.
Resolve Snowflake import timeouts
Review your Snowflake data architecture, query performance, and Bloomreach import setup with your data engineering and CRM teams. Voxwise works with organizations to diagnose timeout failures, optimize query logic for preview execution, and migrate complex transformations to precomputed views or materialized views that enable delta sync.