On Mon, Feb 11, 2019 at 4:33 PM mark.keller via sqlalchemy <sqlalchemy@googlegroups.com> wrote: > > Hi, > > I'm working on a bug that emerges when a user tries to use Pandas and > SQLAlchemy with a Snowflake database and tries to push a data frame to the > database. > I'm trying to disallow users from submitting a "CREATE INDEX ..." SQL > commands to snowflake, which pandas tries to do by default, but Snowflake > does not allow. > Is there a way to dynamically dispatch the SchemaGenerator's visit_index > functions, or to disallow SQLAlchemy from sending index statements in the > SnowflakeDialect?
I feel like we just saw this issue earlier. Why is pandas forcing indexes to be created? As I recall mentioning elsewhere, there should be options on the Pandas side to disable the creation of indexes. you can also try providing SQLCompiler.visit_create_index() and visit_drop_index() methods that deliver a SQL phrases which do nothing (or perhaps includes a comment that a CREATE /DROP INDEX is being skipped). > > Thanks a lot, > Mark > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > 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 https://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- 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 https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.