Skip to main content

Scheduled Task: Add Constraint In Data Warehouse

Distributor guide to the background scheduled task that adds table relationship constraints to your Snowflake data warehouse after seed data runs in Encompass; safe to ignore if it fails. Requires v26.07+.

B
Written by Bailey Naas-Thornton

Minimum Version Required: 26.07

Steps

What the Add Constraint In Data Warehouse Task Does

This is a background system task, not something you run or configure yourself. You may see it appear in the scheduler after Encompass refreshes data in your Snowflake data warehouse.
​
​

  1. It runs automatically right after the Data Warehouse Seed Data task rebuilds one or more tables in your Snowflake warehouse.
    ​
    ​

  2. It compares the primary key, foreign key, and unique constraints defined on your Encompass tables to the constraints already present on the matching tables in Snowflake.
    ​
    ​

  3. For any constraint that exists in Encompass but is missing in Snowflake, it adds that constraint to the warehouse table.
    ​
    ​

  4. These are added as informational constraints only — Snowflake does not enforce them the way Encompass does. They simply tell Snowflake's query engine how your tables relate to each other, which lets it skip unnecessary joins ("join elimination") and return report and dashboard results faster.

Best Practices

  • Seeing it in the scheduler is expected and does not need troubleshooting — it just means fresh data was recently pushed to your warehouse and Encompass is optimizing it for faster queries.
    ​
    ​

  • It only adds relationship metadata to tables that already exist in the warehouse — it never changes, moves, or deletes your actual data.
    ​
    ​

  • This is a non-critical scheduled task, if it fails, it can be ignored as it will pick-up where it left-off next time it runs.

Did this answer your question?