Re: [sqlalchemy] Syntax error from sqlalchemy generated sql to sybase ase

2018-11-28 Thread Ken MacKenzie
That makes sense, and as much as I would volunteer to try to maintain the 
dialect, I can't see justify using work resources (where I have access to 
Sybase) to maintain an open source component for a DB we are working to 
migrate away from.

Since the metadata is collecting ok, minus some type catches I have to do 
to write to other DB's, I can maybe just write raw SQL through sql alchemy 
or worst case through pyodbc to deal with collecting the records.

Thank you for the help.

Ken

On Wednesday, November 28, 2018 at 6:12:41 PM UTC-5, Mike Bayer wrote:
>
> Hi there - 
>
> Unfortuantely, the Sybase dialect is unmaintained and will likely be 
> removed from a future SQLAlchemy release.For this database to be 
> usable, a dedicated maintainer would need to volunteer and we can set 
> them up with a new sybase ASE dialect available as a third party 
> download.   The demand for this database is extremely low, the Python 
> drivers are poorly maintained and the database itself is extremely 
> difficult to run for testing purposes. 
>
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


Re: [sqlalchemy] Syntax error from sqlalchemy generated sql to sybase ase

2018-11-28 Thread Mike Bayer
Hi there -

Unfortuantely, the Sybase dialect is unmaintained and will likely be
removed from a future SQLAlchemy release.For this database to be
usable, a dedicated maintainer would need to volunteer and we can set
them up with a new sybase ASE dialect available as a third party
download.   The demand for this database is extremely low, the Python
drivers are poorly maintained and the database itself is extremely
difficult to run for testing purposes.





On Wed, Nov 28, 2018 at 4:43 PM Ken MacKenzie  wrote:
>
> Error message:
>
> sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] 
> [FreeTDS][SQL Server]Incorrect syntax near 'dbo.APPLICATION_STATUS_DIM.'.\n 
> (102) (SQLExecDirectW)") [SQL: 'SELECT 
> dbo."APPLICATION_STATUS_DIM"."APPLICATION_STATUS_SKEY" AS 
> "dbo_APPLICATION_STATUS_DIM_APPLICATION_STATUS_SKEY", 
> dbo."APPLICATION_STATUS_DIM"."APPLICATION_STATUS_CD" AS 
> "dbo_APPLICATION_STATUS_DIM_APPLICATION_STATUS_CD", 
> dbo."APPLICATION_STATUS_DIM"."APPLICATION_STATUS_DESC" AS 
> "dbo_APPLICATION_STATUS_DIM_APPLICATION_STATUS_DESC" \nFROM 
> dbo."APPLICATION_STATUS_DIM"'] (Background on this error at: 
> http://sqlalche.me/e/f405)
>
> Code triggering the error:
>
> for record in source.query(table).all():
>
> pip freeze output:
>
> pkg-resources==0.0.0
> psycopg2==2.7.6.1
> pyodbc==4.0.24
> SQLAlchemy==1.2.14
>
> Purpose of the code:
>
> Trying a quick stab at migrating a db from sybase ase to either postgres or 
> sql server. Evaluating both targets. Connection works fine, pulling table 
> metadata works fine, writing to target db structure from meta works fine, but 
> selecting the records leads to that.
>
> If I take that statement as is and paste into dbeaver (replacing the \n with 
> an actual carriage return) everything works.
>
> This fails on both linux (using FreeTDS version set to 5) and windows (using 
> the dsn name for the actual ASE driver setup in my odbc)
>
> I am confused what is going on here that causes sybase to see this as a 
> syntax error.
>
> Ken
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
> description.
> ---
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Syntax error from sqlalchemy generated sql to sybase ase

2018-11-28 Thread Ken MacKenzie
Error message:

sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', 
"[42000] [FreeTDS][SQL Server]Incorrect syntax near 
'dbo.APPLICATION_STATUS_DIM.'.\n (102) (SQLExecDirectW)") [SQL: 'SELECT 
dbo."APPLICATION_STATUS_DIM"."APPLICATION_STATUS_SKEY" AS 
"dbo_APPLICATION_STATUS_DIM_APPLICATION_STATUS_SKEY", 
dbo."APPLICATION_STATUS_DIM"."APPLICATION_STATUS_CD" AS 
"dbo_APPLICATION_STATUS_DIM_APPLICATION_STATUS_CD", 
dbo."APPLICATION_STATUS_DIM"."APPLICATION_STATUS_DESC" AS 
"dbo_APPLICATION_STATUS_DIM_APPLICATION_STATUS_DESC" \nFROM 
dbo."APPLICATION_STATUS_DIM"'] (Background on this error at: 
http://sqlalche.me/e/f405)

Code triggering the error:

for record in source.query(table).all():

pip freeze output:

pkg-resources==0.0.0
psycopg2==2.7.6.1
pyodbc==4.0.24
SQLAlchemy==1.2.14

Purpose of the code:

Trying a quick stab at migrating a db from sybase ase to either postgres or 
sql server. Evaluating both targets. Connection works fine, pulling table 
metadata works fine, writing to target db structure from meta works fine, 
but selecting the records leads to that.

If I take that statement as is and paste into dbeaver (replacing the \n 
with an actual carriage return) everything works.

This fails on both linux (using FreeTDS version set to 5) and windows 
(using the dsn name for the actual ASE driver setup in my odbc)

I am confused what is going on here that causes sybase to see this as a 
syntax error.

Ken

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.