Issue
Segment Profiles Sync to Snowflake fails repeatedly with memory or column limit errors (such as Error 300005 or 4096). The sync stalls or runs for extended periods, preventing materialized tables from updating and causing downstream Linked Audiences to compute on stale data.
Product
Segment
Environment
Segment Console
Cause
Segment utilizes Dynamic Schema Evolution, which automatically flattens nested JSON objects into individual columns in your data warehouse. If a source sends dynamic, ever-changing keys within nested JSON payloads (such as searchParams or custom unstructured data), Segment automatically generates a brand new column for every unique key. Over time, this column bloat causes the destination tables (e.g., pages, tracks, identifies) to hit Snowflake's hard limit of 4,096 columns per table, causing the sync to fail.
Resolution
To permanently resolve the column limit error and safely resume data flow, you can stop the column expansion at the source and clear the existing bloat from your database.
- Identify the bloated properties: Review your Snowflake tables to identify which nested JSON objects are causing the column explosion (commonly seen as context_page_search_params_* or similar dynamic tracking keys).
- Update the source code: Instruct your engineering team (or similar) to update the tracking payload. Convert the nested JSON objects into a single Stringified JSON string (or a raw query string) before sending it to Segment. This forces Segment to store the entire payload in a single VARCHAR or TEXT column instead of creating thousands of individual columns.
- Deactivate properties via Support: Contact Segment Support and provide the list of bloated properties. Request that they run a backend deactivation to stop Segment from tracking and staging the existing dynamic properties.
- Clean up your Snowflake warehouse: Because Segment does not delete existing columns in your destination, your Snowflake Database Administrator can manually DROP the thousands of unused, dynamically generated columns in your Snowflake tables to free up capacity.
- Resume the sync: Once the source code is updated and the Snowflake columns are dropped, re-enable the affected tables in your Profiles Sync settings. The sync will process the backlog and update your materialized tables.
Additional Information
If you temporarily uncheck event tables (pages, tracks, identifies, groups) in your Profiles Sync settings to bypass the column limit error as a workaround, your syncs will show as "Success" but will sync 0 rows. This cuts off the raw event feed, meaning materialized tables like USER_TRAITS will stop updating, and your Linked Audiences will continue to compute on stale data until the root cause is fixed and the tables are re-enabled.