MINOR: Fix superset query to fetch columns (#15153)

This commit is contained in:
Mayur Singal 2024-02-12 21:23:00 +05:30 committed by GitHub
parent 1564a7494d
commit 79d724fc7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -15,7 +15,6 @@ Superset source module
import traceback import traceback
from typing import Iterable, Optional from typing import Iterable, Optional
from sqlalchemy import sql
from sqlalchemy.engine import Engine from sqlalchemy.engine import Engine
from sqlalchemy.engine.url import make_url from sqlalchemy.engine.url import make_url
@ -87,7 +86,7 @@ class SupersetDBSource(SupersetSourceMixin):
try: try:
if table_name: if table_name:
col_list = self.engine.execute( col_list = self.engine.execute(
sql.text(FETCH_COLUMN), table_name=table_name.lower() FETCH_COLUMN, table_name=table_name.lower()
) )
return [FetchColumn(**col) for col in col_list] return [FetchColumn(**col) for col in col_list]
except Exception as err: except Exception as err:

View File

@ -85,5 +85,5 @@ inner join
on on
t.id=tc.table_id t.id=tc.table_id
where where
table_name= %(table_name)s table_name=%(table_name)s
""" """