diff --git a/ingestion/src/metadata/ingestion/source/dashboard/superset/db_source.py b/ingestion/src/metadata/ingestion/source/dashboard/superset/db_source.py index 1b03c5744ba..a8efb2db6ee 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/superset/db_source.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/superset/db_source.py @@ -86,8 +86,9 @@ class SupersetDBSource(SupersetSourceMixin): def get_column_list(self, table_name: str) -> Iterable[FetchChart]: try: if table_name: - sql_query = sql.text(FETCH_COLUMN.format(table_name=table_name.lower())) - col_list = self.engine.execute(sql_query) + col_list = self.engine.execute( + sql.text(FETCH_COLUMN), table_name=table_name.lower() + ) return [FetchColumn(**col) for col in col_list] except Exception as err: logger.debug(traceback.format_exc()) diff --git a/ingestion/src/metadata/ingestion/source/dashboard/superset/queries.py b/ingestion/src/metadata/ingestion/source/dashboard/superset/queries.py index 1d9f667768a..373045d10ee 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/superset/queries.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/superset/queries.py @@ -85,5 +85,5 @@ inner join on t.id=tc.table_id where - table_name= '{table_name}' + table_name= %(table_name)s """