ClickUp model

Task Dependency Analysis

Performs a task dependency analysis in ClickUp. It retrieves information about task dependencies, including task names, statuses, and dependent task details. It also calculates the total number of dependencies for each task and determines if a task is a potential blocker based on its status and the status of its dependent tasks. The results are sorted by task ID and dependent task ID.

Grain
task x task it depends on
Built from
  1. 2
    Raw tables
  2. 1
    Core
  3. 1
    Analytics
Reads from ClickUp
tasktask_dependencies
Ships as
Weld and dbt SQL, open source on GitHub
core.clickup.task_dependency_analysis
1-- core.clickup.task_dependency_analysis
2-- Task Dependency Analysis. Performs a task dependency analysis in ClickUp. It
3-- retrieves information about task dependencies, including task names, statuses,
4-- and dependent task details. It also calculates the total number of dependencies
5-- for each task and flags dependencies that are still holding a task up. The
6-- results are sorted by task ID and dependent task ID.
7--
8-- Grain: task x task it depends on. In ClickUp's dependency list, task_id is
9-- waiting on depends_on. A dependency is a potential blocker while the waiting
10-- task is still open and the task it waits on is not finished. Finished means
11-- a status of type closed or done, so custom status names work too.
12-- If the task waited on is not in the synced task table (deleted, or in a
13-- space that is not synced), its status is unknown and the row says so.
14--
15-- From the weld.app template library, corrected. Not reconciled against
16-- ClickUp; check the output against the source before relying on it.
17
18with
19    TaskDependencies as (
20        select
21            td.task_id
22          , t.name as task_name
23          , t.status_status as task_status
24          , coalesce(t.status_type in ('closed', 'done'), false) as task_finished
25          , td.depends_on as dependent_task_id
26          , dt.id is not null as dependent_task_found
27          , dt.name as dependent_task_name
28          , dt.status_status as dependent_task_status
29          , coalesce(dt.status_type in ('closed', 'done'), false) as dependent_task_finished
30        from
31            {{raw.clickup.task_dependencies}} td
32            join {{raw.clickup.task}} t on td.task_id = t.id
33            left join {{raw.clickup.task}} dt on td.depends_on = dt.id
34    )
35  , DependencyCounts as (
36        select
37            task_id
38          , count(distinct dependent_task_id) as total_dependencies
39        from
40            TaskDependencies

This model and the 1 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().

Notes

How it counts. And where it stops.

The SQL template named "Task Dependency Analysis" is designed to analyze task dependencies in the ClickUp integration. This SQL model retrieves information about task dependencies, including the task ID, task name, task status, dependent task ID, dependent task name, dependent task status, and the total number of dependencies for each task. By executing this SQL template, you can gain insights into the task dependencies within ClickUp. The output provides a comprehensive view of the relationships between tasks and their dependencies. Additionally, the "blocker_status" column categorizes the relationship between tasks based on their completion status. If a task is marked as "Completed" but its dependent task is not, it is labeled as a "Potential Blocker." Otherwise, it is labeled as "No Blocker." This SQL template can be useful for project managers and teams working with ClickUp to understand the impact of task dependencies on project progress. It helps identify potential blockers and allows for better planning and coordination to ensure smooth task execution and project completion.

Raw tables it reads

  • raw.clickup.task
  • raw.clickup.task_dependencies

Put ClickUp in front
of your agents.

Connect ClickUp, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.