Skip to content

[Clickhouse Linage] Missing downsteam for MATERIALIZED VIEW #26265

@Kreidler-UKFr

Description

@Kreidler-UKFr

Affected module
Linage

Describe the bug
We're having a lot of MATERIALIZED VIEWs in our Clickhouse-Instance, where we transpose it to a new table with the TO <schema>.<table>-Argument[0]. While the Linage Agent creates the correct upstream links I would also expect the table from TO <schema>.<table> as downstream link, but it's not created.

[0] https://clickhouse.com/docs/sql-reference/statements/create/view#materialized-view

To Reproduce
Query:

CREATE MATERIALIZED VIEW <schema-01>.samples_mv TO <schema-02>.samples_e (
    column_01,
    column_02
) FROM <schema-01>.samples

With this Query I get the following Linage:
Image

Expected behavior
Excpected Linage (added Linage by hand):
Image

Version:

  • OS: docker
  • OpenMetadata version: docker.getcollate.io/openmetadata/server:1.12.1
  • OpenMetadata Ingestion package version: docker.getcollate.io/openmetadata/ingestion:1.12.1

Additional context
While writing this up I found a MATERIALIZED VIEW where even the FROM <table> expression did not create a upstream Linage. Generalized Query:

CREATE MATERIALIZED VIEW <schema>.<materialzed-view-name> REFRESH EVERY 3 HOUR TO <schema>.<to-table> (column_01, column_02) DEFINER = <user> SQL SECURITY DEFINER AS SELECT * FROM <schema>.<from-table>

Metadata

Metadata

Assignees

Type

Projects

Status

OpenMetadata Connectors & Ingestion Framework

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions