Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-15 Thread Benjamin Taub
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 believ

Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-14 Thread Benjamin Taub
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://' + db_uid + ':' + > db_pw + '@' + db_a

Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-13 Thread Benjamin Taub
078731dc72.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-4 Benjamin Taub wrote: > Th

Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-13 Thread Benjamin Taub
)* 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 SQLAlchemy 1.4 but recently upgraded to 2

Re: [sqlalchemy] Inconsistent SQL Generation in 2.0

2023-05-12 Thread Benjamin Taub
c0c739cba".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 SQL >> statemen

[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

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
n(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`.`3table` &

[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

Re: [sqlalchemy] SQLAlchemy Access to Native Bulk Loaders

2020-04-22 Thread Benjamin Taub
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 engineerin

Re: [sqlalchemy] SQLAlchemy Access to Native Bulk Loaders

2020-04-19 Thread Benjamin Taub
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 candidate