dfsql
dfsql copied to clipboard
KeyError if 'ORDER BY' contains table name
This query produce KeyError('COLUMNS.ORDINAL_POSITION')
:
dfsql.sql_query(
"SELECT * FROM COLUMNS WHERE COLUMNS.TABLE_SCHEMA = 'MINDSDB' AND COLUMNS.TABLE_NAME = 'predictors' ORDER BY COLUMNS.ORDINAL_POSITION",
ds_kwargs={'case_sensitive': False},
reduce_output=False,
**{table_name: dataframe}
)
Dataframe has column 'ORDINAL_POSITION'
dfsql.sql_query( "SELECT * FROM COLUMNS WHERE COLUMNS.TABLE_SCHEMA = 'MINDSDB' AND COLUMNS.TABLE_NAME = 'predictors' ORDER BY COLUMNS.ORDINAL_POSITION", ds_kwargs={'case_sensitive': False}, reduce_output=False, **{table_name: dataframe} )
after and columns.column_name should be there instead of table name
@StpMax can we archive this project? or close issue?