Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-15 Thread Benjamin Taub
o much for your help! Ben On Sunday, May 14, 2023 at 11:26:27 PM UTC-4 Mike Bayer wrote: > > > On Sun, May 14, 2023, at 12:39 PM, Benjamin Taub wrote: > > Hi, Mike! > I tried your code, and it worked after I set the dialect to mysql+pymysql. > > Given this, in my case, I

Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-14 Thread Benjamin Taub
at 11:33:03 PM UTC-4 Mike Bayer wrote: > > > On Sat, May 13, 2023, at 5:12 PM, Benjamin Taub wrote: > > Thank you, Mike, but aren't I using the correct dialect with this > create_engine() command? > > > *qry_engine = create_engine('mysql+pymysql://' +

Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-13 Thread Benjamin Taub
*SELECT s_42331a8d8a8f3ca73660cc078731dc72.t_ec37b6f3271c0f97429d5301a41be3da."ApplicationId" AS "Application Id" FROM s_42331a8d8a8f3ca73660cc078731dc72.t_ec37b6f3271c0f97429d5301a41be3da* Any suggestions? Thanks for your help! Ben On Saturday, May 13, 2023 at 5:12:11 PM UTC-

Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-13 Thread Benjamin Taub
cycle=3600, echo=False, future=True)* Or, am I missing something? (BTW, I'm using core, not ORM). Thanks again! Ben On Friday, May 12, 2023 at 4:48:45 PM UTC-4 Mike Bayer wrote: > > > On Fri, May 12, 2023, at 4:30 PM, Benjamin Taub wrote: > > I have code that worked under SQLAl

Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-12 Thread Benjamin Taub
ac7717fe770c5ed6d425c0c739cba".t_59a33cbea3617986d810e9fbae60ba19 XYZ* > > *?* > > On Fri, May 12, 2023, 3:30 PM Benjamin Taub > wrote: > >> I have code that worked under SQLAlchemy 1.4 but recently upgraded to 2. >> I am using the add_columns() method to add columns to an existing SQ

[sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-12 Thread Benjamin Taub
I have code that worked under SQLAlchemy 1.4 but recently upgraded to 2. I am using the add_columns() method to add columns to an existing SQL statement. The resultant queries sometimes, but not always, crash. I believe the issue happens when the schema/database name (I'm using MySQL) starts wi

Re: [sqlalchemy] Possible error with fully qualified table names

2020-12-22 Thread Benjamin Taub
Perfect! Thank you, Mike. Ben __ [image: Dataspace] <https://dataspace.com> Benjamin Taub, CEO Direct: (734) 585-3503 Check out Golden Record <https://goldenrecord.dataspace.com/>, our cloud-based record matching and deduplication solutio

Re: [sqlalchemy] Possible error with fully qualified table names

2020-12-22 Thread Benjamin Taub
id = Column(String, primary_key=True) > > __table_args__ = {"schema": "4schema"} > > > s = Session() > > print(s.query(SomeTable).statement.compile(dialect=mysql.dialect())) > > output: > > SELECT `4schema`.`3table`.id > FROM `4schema`.`3t

[sqlalchemy] Possible error with fully qualified table names

2020-12-22 Thread Benjamin Taub
schema.py defines a variable fullname for tables as follows: if self.schema is not None: self.fullname = "%s.%s" % (self.schema, self.name) else: self.fullname = self.name However, this fails for me in some cases, apparently when my table or schema name starts with a number. To address t

Re: [sqlalchemy] SQLAlchemy Access to Native Bulk Loaders

2020-04-22 Thread Benjamin Taub
rethink at that time. Thanks again! Ben __ [image: light logo] <https://dataspace.com/> Benjamin Taub, CEO Direct: (734) 585-3503 Check out Talentspace <https://dataspace.com/talentspace-candidate/> to see a list of prescreened analytics and data

Re: [sqlalchemy] SQLAlchemy Access to Native Bulk Loaders

2020-04-19 Thread Benjamin Taub
reciate it. Ben __ [image: light logo] <https://dataspace.com/> Benjamin Taub, CEO Direct: (734) 585-3503 Check out Talentspace <https://dataspace.com/talentspace-candidate/> to see a list of prescreened analytics and data engineering