You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/01/10 14:55:10 UTC

[GitHub] rpwils opened a new issue #4192: sql_lab.py is using the raw dbapi connection object and not SQLAlchemy dialect

rpwils opened a new issue #4192: sql_lab.py is using the raw dbapi connection object and not SQLAlchemy dialect
URL: https://github.com/apache/incubator-superset/issues/4192
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [ X] I have checked the superset logs for python stacktraces and included it here as text if any
   - [ X] I have reproduced the issue with at least the latest released version of superset
   - [ X] I have checked the issue tracker for the same issue and I haven't found one similar
   
   
   ### Superset version
   0.22.1
   
   ### Expected results
   data = db_engine_spec.fetch_data(cursor, query.limit) should return a list of "sqlalchemy.engine.result.RowProxy"
   
   ### Actual results
   returns a list of "pyodbc.Row"
   
   ### Steps to reproduce
   Create a DB connection to using the mssql dialect. 
   
   I would like to get your input on this issue. I was creating a new dialect using the pyodbc and ran into this issue. According to a conversation i have had on Google Groups we might not want to be using the raw_connection.
   (https://groups.google.com/forum/#!searchin/sqlalchemy/pyodbc.Row$20%7Csort:date/sqlalchemy/wtLwkQr2xSY/SDvVbOySAAAJ)
   Should this be a change in superset or will it impact 
   
   with engine.connect() as conn: 
       result = conn.execute("SELECT * FROM ADV.MYTABLE") 
       result.fetchmany(limit)
   
   vs what is in superset  (https://github.com/apache/incubator-superset/blob/e182f7f96227ef699c1e55c43bb97f8df2fa5f12/superset/sql_lab.py#L188)
   
           conn = engine.raw_connection()
           cursor = conn.cursor()
           cursor.fetchmany(limit)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services