检查SQL查询语句的语法是否正确,并确保查询语句符合Superset支持的SQL语法。此外,还可以通过在SQL编辑器中连接到数据库并使用SQLAlchemy语句来验证查询是否可以在Superset中工作。
代码示例:
SELECT * FROM my_table WHERE my_column = 'my_value';
from sqlalchemy import create_engine
engine = create_engine('postgresql://username:password@hostname/database')
results = engine.execute("SELECT * FROM my_table WHERE my_column = 'my_value'") for row in results: print(row)