[sqlalchemy] CTEs and ORM objects.

2020-11-09 Thread kris
I need to query over a table mapped to class T, I usually use session.query (T), however I am using two cte's part0 = ... cte('part0') part1 = ... cte('part1')

Re: [sqlalchemy] sqlacodegen

2020-11-09 Thread Larry Martell
sqlacodegen mssql+pyodbc://user:password@host/database On Monday, November 9, 2020 at 11:03:03 PM UTC-5 Mike Bayer wrote: > this has to do with how you are formatting your URL, and it is being seen > as a hostname and not a DSN name. can't provide any more help without > seeing how you are

Re: [sqlalchemy] sqlacodegen

2020-11-09 Thread Mike Bayer
this has to do with how you are formatting your URL, and it is being seen as a hostname and not a DSN name. can't provide any more help without seeing how you are formatting this URL as well as what is the actual method you are trying to use to connect (DSN or hostname). On Mon, Nov 9,

Re: [sqlalchemy] OverflowError: int to big to convert

2020-11-09 Thread Mike Bayer
that error is thrown by SQL Server and/or the ODBC driver you are using. make sure you are using an appropriate datatype for the column in the database. You can likely get more help on the pyodbc issue tracker at https://github.com/mkleehammer/pyodbc/issues as SQLAlchemy just passes these

[sqlalchemy] OverflowError: int to big to convert

2020-11-09 Thread J Sherwood
Hello, I am trying to transfer an Oracle Database(12) to an SQL database(2016) table by table. I read it from the Oracle database using: *ocon = cx_Oracle.connect(username,password,dsn,encoding='UTF-8') df = pd.read_sql("SELECT * FROM TABLE",con=ocon) * I then try to write the dataframe to the

[sqlalchemy] sqlacodegen

2020-11-09 Thread Larry Martell
I am trying to use sqlacodegen on a mac to generate models from a MS SQL db. I get this error when I run: sqlacodegen mssql+pyodbc:xxx pyodbc.InterfaceError: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)') I can