Downstream Lineage for Models
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Feature request
Is your feature request related to a problem?
There is a lack of visibility of what is effected if I change a Model (View).
Describe the solution you'd like
The Lineage feature is amazing. However, it only shows upstream dependencies. It would be amazing to show its downstream dependencies as well. Ideally, this would be everywhere within the app. Off the top of my head, that would be:
- In other Views
- In Insights
- In Notebooks
Also, it would be great if this would optionally show nested downstream dependencies. For example, if a View is used in an Insight and that Insight is used in a Dashboard, the user would be able to see the chain from View -> Insight -> Dashboard. (This would require Lineage being available for Insights as requested in #66075)
Describe alternatives you've considered
I currently use the query below to search through Views, Insights, and Notebooks for the name of a view (but can be any search term).
WITH
'EXAMPLE' AS search_term
-- Views containing the view
SELECT
'View' AS container_type,
name AS container_name,
toString(id) AS container_id
FROM system.data_modeling_views
WHERE deleted = 0
AND toString(query) ILIKE concat('%', search_term, '%')
UNION ALL
-- Insights containing the view
SELECT
'Insight' AS container_type,
name AS container_name,
short_id AS container_id
FROM system.insights
WHERE deleted = 0
AND toString(query) ILIKE concat('%', search_term, '%')
UNION ALL
-- Notebooks containing the view
SELECT
'Notebook' AS container_type,
title AS container_name,
short_id AS container_id
FROM system.notebooks
WHERE deleted = 0
AND toString(content) ILIKE concat('%', search_term, '%')
ORDER BY container_type, container_name
LIMIT 500
Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are identified. Start by tracing the existing upstream Lineage entry point across Views, Insights, and Notebooks, using the referenced system.data_modeling_views, system.insights, and system.notebooks records as context. Done would include downstream dependencies and, where supported, nested chains such as View → Insight → Dashboard.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100