mirror of
https://github.com/apache/superset.git
synced 2026-07-11 09:15:31 +00:00
refactor: update Connection.execute() to use queries with text() (#40277)
This commit is contained in:
@@ -20,6 +20,7 @@ from abc import ABC, abstractmethod
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from pandas import DataFrame
|
||||
from sqlalchemy import text
|
||||
from sqlalchemy.inspection import inspect
|
||||
|
||||
from tests.common.logger_utils import log
|
||||
@@ -74,7 +75,7 @@ class PandasDataLoader(DataLoader):
|
||||
return None
|
||||
|
||||
def remove_table(self, table_name: str) -> None:
|
||||
self._db_engine.execute(f"DROP TABLE IF EXISTS {table_name}")
|
||||
self._db_engine.execute(text(f"DROP TABLE IF EXISTS {table_name}"))
|
||||
|
||||
|
||||
class TableToDfConvertor(ABC):
|
||||
|
||||
Reference in New Issue
Block a user