SQL: Status of the legacy mode? · Issue #6900 · pandas-dev/pandas (original) (raw)
To discuss: do we regard the sql legacy mode (using a DBAPI2 connection, for sqlite and mysql) as a 'first-class citizen' in pandas? Or is it mainly for backwards compatibility?
Is it useful to have something that is not dependent on sqlalchemy? And consequently we alo try to enhance it /accept enhancements to it? Or is it really just 'legacy' and we don't develop it further (only bug fixes)?
I think it is important to discuss this (and 'formally' decide on this), as there are some issues with this:
- If it is mainly for backwards compatibility, are we also planning to deprecate it? (which is not necessarily the consequence, if we just regard it as what the name says: legacy)
- If it is not only for backwards compatibility, why do we raise a warning?:
UserWarning: Not an SQLAlchemy engine,
attempting to use as legacy DBAPI connection
As this implies to me that it is not really preferred to use this.
- Do we want to keep the functionality equal to the sqlalchemy version? (as we are using the same functions for both, it would make it complex if it is not)
- Eg, we could easily provide a
read_table
functionality to legacy mode, by just doing aread_sql("SELECT * FROM specified_table", ..)
.
- Eg, we could easily provide a
- We should clarify the docs on this status: http://pandas-docs.github.io/pandas-docs-travis/io.html#legacy (as it is not really clear now)
- If we decide we want to fully support this, we should maybe try to find another name than 'legacy' .. :-)
Maybe the bottom line we should ask ourselves is: do we want that we can really recommend it to users to use the legacy sqlite without sqlalchemy version? (and in that case I think it should be fully supported and not regarded as 'legacy')