Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG: `read_sql_table` can't find views #10750
Comments
TomAugspurger
added Difficulty Novice SQL Effort Low
labels
Aug 4, 2015
TomAugspurger
added this to the
Next Major Release
milestone
Aug 4, 2015
|
I'm working on this. At the moment I'm building a unit test which works for all dbs (sqlite, postgres, mysql). The change you suggested seems to work @TomAugspurger |
IamGianluca
added a commit
to IamGianluca/pandas
that referenced
this issue
Aug 11, 2015
|
|
IamGianluca |
17917cb
|
IamGianluca
added a commit
to IamGianluca/pandas
that referenced
this issue
Aug 11, 2015
|
|
IamGianluca |
5939fa4
|
IamGianluca
referenced
this issue
Aug 12, 2015
Merged
BUG: Allow read_sql_table to read from views #10803
|
Closed by #10803 |
jorisvandenbossche
closed this
Aug 12, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TomAugspurger commentedAug 4, 2015
pd.read_sql_table(tablename, engine)won't be able to findtablenameif it's actually a view.This should be a one line change to https://github.com/pydata/pandas/blob/b281e6570bc3bb3773520eff0b6965d5691e3ba2/pandas/io/sql.py#L340
just adding the keyword argument
views=Truefrom http://docs.sqlalchemy.org/en/rel_1_0/core/metadata.html I don't think there will be any negative consequences to this, but I don't use sqlalchemy MetaData objects that often.