Skip to content

ENH: add PostgreSQL and MySQL support for pandas.io.sql.get_schema #4680

New issue

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

Closed
wants to merge 7 commits into from

Conversation

adamgreenhall
Copy link
Contributor

Simple changes to add PostgreSQL syntax to pandas.io.sql.get_schema. Added data type cases for get_sqltype() and a columns "flavor" for get_schema().

The logic of get_schema seems simple enough at the moment (though it still doesn't support Oracle). Should it be replaced by SQLAlchemy integration?

ref: #4163
old pr: #4574

@jreback
Copy link
Contributor

jreback commented Aug 26, 2013

@adamgreenhall

yeh....have an open issue to disable that test, kind of flaky; ignore for now

@hayd
Copy link
Contributor

hayd commented Aug 26, 2013

I'm going to cherry-pick this when updating the branch.

@hayd
Copy link
Contributor

hayd commented Aug 27, 2013

I should have suggested before adding some tests for this. (At the moment the legacy tests are quite flaky and it's pretty WET and messy, so this may actually be non-trivial). Saying that, I think it's worth adding this as is too, thanks for putting it together.

One of the things coming soon (ish) is making it as simple as subclassing the tests with postgres engine/connection, which will be soo much better.

@jreback
Copy link
Contributor

jreback commented Sep 20, 2013

@hayd u r incorporating this?

@hayd
Copy link
Contributor

hayd commented Sep 21, 2013

@jreback yes, but I'm not sure how going to test all this legacy stuff yet (support for different engines is easier), atm no tests for this legacy (aka not sqlalchemy) postgres... I've just left what was there before.

Perhaps solution is to test using the connection against the engine version, not sure how that'll work yet.

@jreback
Copy link
Contributor

jreback commented Sep 21, 2013

@hayd to be honest, if you new stuff is good to go and covers sufficient test cases I would just go with that, maybe even move legacy engines temporarily for 0.13 so they at least 'work' and just migrate to new

@ghost
Copy link

ghost commented Jan 29, 2014

@hayd, @adamgreenhall , superceded by #5950?

@jreback jreback added the SQL label Feb 16, 2014
@jreback
Copy link
Contributor

jreback commented Feb 16, 2014

@hayd @jorisvandenbossche is this superceded? close?

@jorisvandenbossche
Copy link
Member

I am not really familiar with this PR, but:

  • we decided to not support postgresql in legacy mode, so only with sqlalchemy
  • get_schema is deprecated

so judging from only the title of this PR (in the diff seems a lot more) this should be closed.

@adamgreenhall I am going to close, but if you think there is functionality in this PR that is not available in the new sqlalchemy stuff, we can reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO SQL to_sql, read_sql, read_sql_query
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants