Skip to content

Commit 295092d

Browse files
authored
control-service: Extending Trino lineage (#3427)
control-service: Extending Trino lineage Add lineage for "CREATE AS SELECT" --------- Signed-off-by: Tonka Zheleva <tonka.zheleva@broadcom.com> Signed-off-by: Tonka Zheleva <tonka.zheleva@broadcom.com>
1 parent 3d97f64 commit 295092d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

projects/vdk-plugins/vdk-trino/src/vdk/plugin/trino/trino_connection.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ def _get_lineage_data(self, query):
196196
"ALTER operation not a RENAME TABLE operation. No lineage will be collected."
197197
)
198198

199-
elif statement.get_type() == "SELECT" or statement.get_type() == "INSERT":
199+
elif (
200+
statement.get_type() == "SELECT"
201+
or statement.get_type() == "INSERT"
202+
or (
203+
statement.get_type() == "CREATE" and "select" in statement.value.lower()
204+
)
205+
):
200206
if lineage_utils.is_heartbeat_query(query):
201207
return None
202208
log.debug("Collecting lineage for SELECT/INSERT query ...")

0 commit comments

Comments
 (0)