Hi,

Since version 0.14 (released two weeks ago), pandas uses sqlalchemy in the 
SQL reading and writing functions to support different database flavors. A 
user reported an issue with SQL server: 
https://github.com/pydata/pandas/issues/7422 (and question on SO: 
http://stackoverflow.com/questions/24126883/pandas-dataframe-to-sql-function-if-exists-parameter-not-working).

The user has set the default schema to `test`, but 
`engine.has_table('table_name')` and `meta.tables` still seem to return the 
tables in schema `dbo`.
This leads to the following issue in our sql writing function `to_sql`:
- when creating the table (using `Table.create()`), it creates it in the 
schema set as default (so 'test')
- when checking for existence of the table (needed to see if the function 
has to fail, or has to append to the existing table), it however checks if 
the table exists in the 'dbo' schema
- for this reason, the function thinks the table does not yet exists, tries 
to create it, resulting in a "There is already an object named 'foobar' in 
the database" error.

Is there a way to resolve this? Is this an issue on our side, or possibly 
in sqlalchemy?

BTW, I tried this myself with PostgreSQL, but couldn't reproduce it.

Kind regards,
Joris

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to