We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
I encountered an issue with the impala-sqlalchemy connector when querying a table with a name that contains a reserved word.
The table is named "reserved.name" and usually can be queried using backticks like so:
SELECT `reserved`.name.column_1, `reserved`.name.column_2 FROM `reserved`.name;
To load the table into sqlalchemy I then use
def impala_conn(): return connect( host='localhost' ) engine = create_engine('impala://', creator=impala_conn, echo=True) metadata = MetaData(engine) table = Table(`reserved`.name, metadata, autoload=True)
table contains a correct description of the table.
table
However when trying to query the table with
stmt = select(table).limit(100) engine.execute(stmt)
the query escapes the already escaped table name again, leading to a query that fails:
SELECT ``reserved`.name`.column_1, ... ^ Encountered: EMPTY IDENTIFIER Expected: ALL, CASE, CAST, DEFAULT, DISTINCT, EXISTS, FALSE, IF, INTERVAL, LEFT, NOT, NULL, REPLACE, RIGHT, STRAIGHT_JOIN, TRUNCATE, TRUE, IDENTIFIER CAUSED BY: Exception: Syntax error
Is there a way to avoid the additional escaping during the query?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi!
I encountered an issue with the impala-sqlalchemy connector when querying a table with a name that contains a reserved word.
The table is named "reserved.name" and usually can be queried using backticks like so:
To load the table into sqlalchemy I then use
table
contains a correct description of the table.However when trying to query the table with
the query escapes the already escaped table name again, leading to a query that fails:
Is there a way to avoid the additional escaping during the query?
The text was updated successfully, but these errors were encountered: