[sqlalchemy] Re: SQLALCHEMY conncection to Sybase Adaptive Server Anywhere Version 7 via TCI/IP

2022-04-21 Thread Gord Thompson
are using. On Thursday, April 21, 2022 at 7:04:18 AM UTC-6 Trainer Go wrote: > > Hello Gord Thompson, > Yeah i found this dialect documentation and its working with the pyodbc > connection. and my query works with pd.read_sql() but i want to test it > with sqlalchemy cause im getting

[sqlalchemy] Re: SQLALCHEMY conncection to Sybase Adaptive Server Anywhere Version 7 via TCI/IP

2022-04-21 Thread Gord Thompson
you may have issues with that. On Thursday, April 21, 2022 at 6:29:19 AM UTC-6 Gord Thompson wrote: > > Verbindung mit dem Datenbankserver unmöglich: Datenbankserver läuft nicht > > "Unable to connect to database server: Database server is not running" > > > Ungültiges Attribut für Ver

[sqlalchemy] Re: SQLALCHEMY conncection to Sybase Adaptive Server Anywhere Version 7 via TCI/IP

2022-04-21 Thread Gord Thompson
. If you are running 64-bit Python then you need to >> have a 64-bit version of the ODBC driver installed. 64-bit applications >> cannot use 32-bit drivers. >> >> On Wednesday, April 20, 2022 at 2:21:32 AM UTC-6 Trainer Go wrote: >> >>> Hi Gord Thompson, &

[sqlalchemy] Re: SQLALCHEMY conncection to Sybase Adaptive Server Anywhere Version 7 via TCI/IP

2022-04-20 Thread Gord Thompson
Yes, that's correct. If you are running 64-bit Python then you need to have a 64-bit version of the ODBC driver installed. 64-bit applications cannot use 32-bit drivers. On Wednesday, April 20, 2022 at 2:21:32 AM UTC-6 Trainer Go wrote: > Hi Gord Thompson, > > with print pyodb

[sqlalchemy] Re: SQLALCHEMY conncection to Sybase Adaptive Server Anywhere Version 7 via TCI/IP

2022-04-14 Thread Gord Thompson
driver on my computer and its called Adaptive Server > Anywhere 7.0 so i dont know where the problem is... > > Jonathan Vanasco schrieb am Donnerstag, 14. April 2022 um 00:07:06 UTC+2: > >> The Sybase dialect was deprecated from first-party support by SQLAlchemy >> and is

Re: [sqlalchemy] Why was the column information stripped away in SA 1.4.20 that existed in 1.3.20?

2021-09-01 Thread Gord Thompson
rted >> here https://github.com/pandas-dev/pandas/issues/40682 >> >> On Tuesday, 31 August 2021 at 23:15:04 UTC+2 Gord Thompson wrote: >> >>> *With version 1.3:* >>> >>> Base = declarative_base() >>> >>> >>> class User(Ba

Re: [sqlalchemy] Why was the column information stripped away in SA 1.4.20 that existed in 1.3.20?

2021-08-31 Thread Gord Thompson
*With version 1.3:* Base = declarative_base() class User(Base): __tablename__ = "user" id = Column(Integer, primary_key=True) name = Column(String) Base.metadata.create_all(engine) print(pd.__version__) # 1.3.2 print(sa.__version__) # 1.3.24 session = Session(engine)

[sqlalchemy] ORM query returning separate columns instead of objects

2021-08-31 Thread Gord Thompson
My memory is failing me. I seem to recall that there was a succinct way to get a 1.4/2.0 ORM query to return individual columns instead of ORM objects. That is, to tell this print(session.execute(select(User)).fetchall()) # [(<__main__.User object at 0x0090175EC700>,)] to return the

[sqlalchemy] Re: Why was the column information stripped away in SA 1.4.20 that existed in 1.3.20?

2021-08-31 Thread Gord Thompson
One option would be to replace result_set = session.query(cls.column_1) with result_set = session.execute(select(cls.column_1)).mappings().all() On Tuesday, August 31, 2021 at 1:10:17 PM UTC-6 thequie...@gmail.com wrote: > > Creating a pandas dataframe that contained descriptive column names

Re: [sqlalchemy] event updating sibling objects: commit() vs. flush()

2021-02-06 Thread Gord Thompson
ebruary 5, 2021 at 8:20:16 PM UTC-7 Mike Bayer wrote: > > > On Fri, Feb 5, 2021, at 6:37 PM, Gord Thompson wrote: > > Hi all. While trying to get more fluent with ORM I looked into a solution > for this Stack Overflow question > <https://stackoverflow.com/q/66027263/2144

[sqlalchemy] event updating sibling objects: commit() vs. flush()

2021-02-05 Thread Gord Thompson
Hi all. While trying to get more fluent with ORM I looked into a solution for this Stack Overflow question . For a many-to-one relationship only one child object can have `is_default=True`. If we add a new child object or update an existing one

[sqlalchemy] Re: Copy of ExcludeConstraint's as part of tometadata fails with column-based expressions.

2021-01-18 Thread Gord Thompson
Issue created: https://github.com/sqlalchemy/sqlalchemy/issues/5850 Thanks for reporting this. On Monday, January 18, 2021 at 8:16:41 AM UTC-7 horema...@gmail.com wrote: > Here's the stacktrace of the test case's failure: > > === FAILURES >

[sqlalchemy] using @hybrid_property setter in place of table trigger

2020-12-21 Thread Gord Thompson
Tinkering with a possible solution to this SO question . The following code does work, but I'll admit that it has a whiff of "brute force" about it. Can anybody suggest a more elegant approach? import sqlalchemy as sa from sqlalchemy.ext.hybrid

[sqlalchemy] Re: Correct and easy method to copy tables from MySQL to Oracle

2020-02-01 Thread Gord Thompson
If you're running Windows 10 then you might be able to use etlalchemy under WSL. If you're running Windows 8.1 then VirtualBox + your_Linux_distro_of_choice + etlalchemy would be another option. The etlalchemy repo shows that the project is 100%

[sqlalchemy] Where are dialect-specific optional arguments declared?

2020-01-29 Thread Gord Thompson
For the external Firebird dialect I am trying to get the following to work. It's really identical to the Oracle equivalent, except for the dialect name, but that's my issue. kw = { "prefixes": ["GLOBAL TEMPORARY"], "firebird_on_commit": "PRESERVE ROWS", } metadata =

Re: [sqlalchemy] Continuing support for Firebird database

2019-12-21 Thread Gord Thompson
Hi Paul. I'm the one who volunteered to revive the sqlalchemy-access dialect and maintain it. Feel free to have a look at https://github.com/sqlalchemy/sqlalchemy-access to get an idea of the project structure. If you need a hand getting things up and running I'd be happy to help. Cheers,