Skip to content

Commit

Permalink
fix: load template processor for lineage data
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Sep 30, 2024
1 parent 63451d6 commit 404d974
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import ruamel.yaml
from superset.extensions import db
from superset.models.dashboard import Dashboard
from superset.jinja_context import get_template_processor
import clickhouse_connect


Expand Down Expand Up @@ -125,7 +126,7 @@ def get_slice_tables(slice, dbt_tables):
# only add datasets that are in dashboards, optionally limit to one database
kind = "virtual" if slice.table.is_virtual else "table"
if kind == "virtual": # built on custom sql
sql = slice.table.get_rendered_sql()
sql = slice.table.get_rendered_sql(get_template_processor(slice.table.database))
tables = get_tables_from_sql(sql)
else:
tables = [dataset_key]
Expand Down

0 comments on commit 404d974

Please sign in to comment.