Re: [sqlalchemy] Disable create index SQL command in SnowflakeDialect

2019-02-11 Thread mark.keller via sqlalchemy
Here is what our customer did: data = pd.DataFrame([('1.0.0',)]) data.to_sql('version', schema='testschema', index=True, index_label='col1', con=connection, if_exists='replace') The problem is that the default value for index is True in pandas. It proceeds to create the default Table object form

Re: [sqlalchemy] Disable create index SQL command in SnowflakeDialect

2019-02-11 Thread Mike Bayer
On Mon, Feb 11, 2019 at 4:33 PM mark.keller via sqlalchemy 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

[sqlalchemy] Re: Disable create index SQL command in SnowflakeDialect

2019-02-11 Thread mark.keller via sqlalchemy
I just found that I could add a before_creation listener to the default Table object. However; I would like to still discuss possibly overwriting the methods in the default SchemaGenerator. On Monday, February 11, 2019 at 1:33:39 PM UTC-8, mark@snowflake.com wrote: > > Hi, > > I'm working

Re: [sqlalchemy] Compiling to Postgres VALUES clause with bindparam

2019-02-11 Thread Mike Bayer
On Mon, Feb 11, 2019 at 3:37 PM Martin Stein wrote: > > So I have replaced the regex-based rewrite with the PGValuesParam approach > that we talked about. One issue with the regex-based rewrite was that in its > current form it breaks for parameter-lists > 10 elements, because the inner >

[sqlalchemy] Disable create index SQL command in SnowflakeDialect

2019-02-11 Thread mark.keller via sqlalchemy
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

Re: [sqlalchemy] Compiling to Postgres VALUES clause with bindparam

2019-02-11 Thread Martin Stein
So I have replaced the regex-based rewrite with the PGValuesParam approach that we talked about. One issue with the regex-based rewrite was that in its current form it breaks for parameter-lists > 10 elements, because the inner sorted(..) call does string-based sorting: 'IN