SQL compilation errors in Hightouch usually come from your warehouse when Hightouch runs a query to preview a model, compute an audience, evaluate journey logic, or execute a sync.
In most cases, Hightouch is surfacing the warehouse's error message directly.
Where these errors appear
You may see SQL compilation errors in:
- Model preview and model edits
- Customer Studio audience preview or count calculations
- Customer Studio journeys that evaluate audience/event conditions
- Sync run failures
Quick checklist
When you hit a SQL compilation error:
- Copy the full error message and note object names, column names, and line/position details.
- Run the same SQL in your warehouse using the same role/context as Hightouch.
- Classify the error pattern below.
- Fix the issue at the right layer (warehouse object/permissions vs model/filter/mapping config).
- Re-run model preview, then re-run the audience/journey/sync flow.
Common error patterns
Invalid identifier (including _ht_to_filter)
Example patterns:
SQL compilation error: invalid identifier ...invalid identifier '"_ht_to_filter"."COLUMN_NAME"'
What it means:
- A referenced column is missing from the query result Hightouch is filtering or mapping.
Common causes:
- Column renamed or removed in model SQL.
- Audience filter, trait, journey condition, or sync mapping still references old column.
How to fix:
- Confirm the column still exists in model output.
- Update filters/conditions/mappings that reference the old name.
- Preview and re-save the model if metadata is stale.
Unresolved column with suggestions
Example pattern:
[UNRESOLVED_COLUMN.WITH_SUGGESTION] ... cannot be resolved. Did you mean ...
What it means:
- A referenced column name does not exist in the active query output.
Common causes:
- Typo in a field name.
- Renamed/removed model column (for example after changing from
SELECT *to an explicit column list). - Stale audience, trait, journey filter, or suggestion-job configuration.
How to fix:
- Verify the column exists in the parent model/event model output.
- Preview and re-save the model to refresh available columns.
- Update filter logic to use valid column names.
Ambiguous column name
Example pattern:
SQL compilation error: ambiguous column name 'COLUMN_NAME'
What it means:
- The final query references a column name that exists in multiple joined sources, and the warehouse cannot infer which one you intended.
Common causes:
- Multiple tables expose the same column name and the model output does not disambiguate with aliases.
- Downstream filters/mappings reference a shared name after query wrapping.
How to fix:
- Alias ambiguous columns in model SQL (for example,
a.faq_url AS faq_url_from_a,b.faq_url AS faq_url_from_b). - Update filters, traits, journeys, and sync mappings to reference the intended alias.
- Re-run preview and dependent workflows.
Object does not exist or not authorized
Example pattern:
Object 'DB.SCHEMA.OBJECT' does not exist or not authorized
What it means:
- Warehouse object is missing, moved, renamed, or inaccessible to the configured role.
How to fix:
- Verify object path (database/schema/object) is correct.
- Confirm the Hightouch role has required
USAGE/SELECTprivileges. - Update model SQL or restore the object.
View definition column mismatch
Example pattern:
View definition ... declared N column(s), but view query produces M column(s)
What it means:
- The warehouse view definition is out of sync with the underlying query.
How to fix:
- Recreate or repair the view in the warehouse.
- Prefer explicit column lists over
SELECT *in long-lived views. - Re-test the view in warehouse SQL before re-running in Hightouch.
Invalid data type for predicate / row comparison
Example pattern:
Invalid data type ... for predicate [ROW(...)]
What it means:
- Filter predicates compare incompatible data types.
How to fix:
- Inspect predicate/filter logic for mixed types.
- Align types with explicit
CAST(...)where needed. - Re-test in warehouse, then in Hightouch.
Works in warehouse UI but fails in Hightouch
What to check:
- Role differences between your user and Hightouch connection.
- Different default database/schema/warehouse context.
- Model points to a different object/version than expected.
- SQL succeeds in UI context but fails under Hightouch role with a standard pattern above.
How to fix:
- Re-run under the same role/context as Hightouch.
- Use fully qualified names (
DATABASE.SCHEMA.OBJECT) in SQL. - Confirm Hightouch model references the intended object.
When to contact support
Contact support with:
- Link to model/audience/journey/sync run
- Full SQL compilation error text
- Whether the error reproduces in warehouse SQL with the same role/context