DCM Part 4: DCM Projects for Tasks companion#24
Merged
sfc-gh-yostrinsky merged 6 commits intomainfrom May 5, 2026
Merged
Conversation
DCM project with 15+ task graph (dependencies, return values, conditional execution, retry, streams, finalizer email), quality-gate branch with DMF expectations, procedures, and serverless alert scripts. .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code <noreply@snowflake.com>
…and USING CONFIG - Remove Python UDF, custom UDMF; use 3 system DMFs only - Simplify finalizer to TEXT_PLAIN (no HTML dependency) - TASK_9 now demos retries/failure behavior (calls PROCEDURE_2 only) - Add OVERLAP_POLICY = NO_OVERLAP on root task - Fully qualify INFORMATION_SCHEMA references with database name - Add .gitignore for DCM plan output artifacts - Remove unused alert_schedule template variable - Scrub personal data from manifest and post_deploy script .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code <noreply@snowflake.com>
- 01_pre_deploy: add GRANT EXECUTE MANAGED ALERT (required for serverless alerts) - 02_post_deploy: add EXECUTE ALERT step, Replace comment on email placeholder .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code <noreply@snowflake.com>
- Move failed-task alert into DCM as DEFINE ALERT with STARTED target-state (replaces post-deploy CREATE OR REPLACE ALERT + ALTER ALERT RESUME) - Remove alert block from 02_post_deploy.sql; renumber remaining steps - Replace manual DROP cleanup with EXECUTE DCM PROJECT PURGE - Remove unused dcm_wh warehouse reference Note: DEFINE ALERT ... STARTED requires target-state support for alerts, which is landing post-10.15. The rest of the file is backward-compatible. .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code <noreply@snowflake.com>
| @@ -0,0 +1,33 @@ | |||
| -- Serverless alert that monitors the task graph and emails on failures. | |||
| -- | |||
| -- Defined as a DCM-managed alert with STARTED target-state, so it deploys | |||
Collaborator
There was a problem hiding this comment.
not yet released
sfc-gh-jsommerfeld
approved these changes
May 4, 2026
Collaborator
sfc-gh-jsommerfeld
left a comment
There was a problem hiding this comment.
will set up and run this later this week. but overall the structure looks good. I know this DAG has worked before - so I would not expect to fail now
|
|
||
| DEFINE ALERT DCM_DEMO_4{{env_suffix}}.PIPELINE.FAILED_TASK_ALERT | ||
| SCHEDULE = '60 MINUTE' | ||
| STARTED |
Collaborator
There was a problem hiding this comment.
yes. please remove for now and resume in post-script
| )) AS t1, | ||
| LATERAL FLATTEN(input => PARSE_JSON(t1.REF_ARGUMENTS)) AS REF | ||
| WHERE SCHEDULE_STATUS = 'STARTED' | ||
| $$; |
Collaborator
There was a problem hiding this comment.
I did not run all of those yet. assuming they work - then good stuff :)
| ---------------------------------------------------------------------- | ||
| -- 4. Create a Warehouse (optional — skip if you already have one) | ||
| ---------------------------------------------------------------------- | ||
| CREATE WAREHOUSE IF NOT EXISTS dcm_wh |
Collaborator
There was a problem hiding this comment.
then we don't need this one either, right?
Target-state for alerts is not yet supported. The alert is still fully DCM-managed via DEFINE ALERT, but deploys suspended. scripts/02_post_deploy.sql now runs ALTER ALERT ... RESUME once after deploy. .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code <noreply@snowflake.com>
…_project_dev .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code <noreply@snowflake.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion repo for Part 4 (DCM Projects for Tasks).
Changes
Note: `DEFINE ALERT ... STARTED` requires target-state support for alerts (landing post-10.15). All other definitions are ready to deploy today.
Guide: Snowflake-Labs/sfquickstarts#3210
.... Generated with Cortex Code