Workflow Query Errors Due to Invalid Column Aliases

Issue

Some workflows may fail during query refreshes with errors similar to the following:

Query execution failed: Column aliases can only contain alphanumeric characters, underscores, 
and must not be only numeric: Email Type

This error typically appears when queries contain column aliases with spaces, special characters, or numeric-only names.

Example:

  • Invalid alias → Email Type

  • Valid alias → Email_Type or EmailType


Root Cause

Previously, queries with spaces in column aliases were allowed and executed without issue.
However, in recent platform updates, new validation rules were introduced to improve stability and prevent unsafe query execution. These rules enforce stricter standards on column alias formatting.

Because of this change, queries that were created years ago and previously worked without issue may now begin failing if they contain invalid column aliases.


Resolution

To resolve the issue:

  1. Identify the query that is failing (error messages will list the query name and alias).

  2. Update the SQL query by replacing invalid column aliases:

    • Remove spaces and special characters.

    • Use only alphanumeric characters and underscores.

    • Ensure the alias is not numeric-only.

  3. Save and re-run the workflow.

Example Fix:

-- Before
SELECT email_type AS "Email Type"  
FROM omeda_emails;  

-- After
SELECT email_type AS Email_Type  
FROM omeda_emails;  

Preventive Guidance

  • Always use alphanumeric characters and underscores in column aliases.

  • Avoid spaces, dashes, or special characters in alias names.

  • Follow SQL-safe naming practices for future queries to prevent validation errors.


Additional Notes

  • The stricter validation rules are part of ongoing improvements to platform stability.

  • Queries that were last edited years ago may start failing now because they were bypassing older, less strict validation.


Example Case:
A customer reported their Omeda Email Product query failing after two years of successful runs. Engineering confirmed that the failure was due to the newly enforced validation rules. Updating the alias "Email Type"Email_Type resolved the issue, and the workflows completed successfully.