[sqlalchemy] Brewery: Heterogenous data streams with SQL Alchemy

2011-01-21 Thread Stefan Urbanek
Hi, I am working on a framework called Brewery. Goal is to provide abstract interface for data streams from heterogenous sources into heterogenous targets. More information with images: http://databrewery.org/doc/streams.html Point is to have objects similar to file streams, but streaming

[sqlalchemy] Query doesn't work for Sybase?

2011-01-21 Thread Joel Zhou
Hi All I am using sqlalchemy 0.6.5 with sybase dialect. Python-Sybase driver is 0.39. The query SQL generated by sqlachemy has double quotes on each identifier, something like: SELECT MYTABLE.ID AS MYTABLE_ID FROM MYTABLE among which MYTABLE.ID is syntactically wrong in ASE 12.5. Is this a

[sqlalchemy] Re: rollback not working

2011-01-21 Thread bool
I am not an expert in these concepts, so just trying to make sure I understand what you said. 1. If I use connection.execute(), then then every sql statements is not put in its own transactions. 2. But If I use connection-less execution like table.execute or engine.execute() then every statement

Re: [sqlalchemy] Query doesn't work for Sybase?

2011-01-21 Thread Michael Bayer
use lower case names for your column names in Table metadata, so that they are case insensitive. they will not be quoted. On Jan 21, 2011, at 2:00 AM, Joel Zhou wrote: Hi All I am using sqlalchemy 0.6.5 with sybase dialect. Python-Sybase driver is 0.39. The query SQL generated by

Re: [sqlalchemy] Brewery: Heterogenous data streams with SQL Alchemy

2011-01-21 Thread Michael Bayer
seems like a nice effort, generic ETLs are tough! On Jan 20, 2011, at 10:25 PM, Stefan Urbanek wrote: Hi, I am working on a framework called Brewery. Goal is to provide abstract interface for data streams from heterogenous sources into heterogenous targets. More information with images:

[sqlalchemy] Re: SQLAlchemy case insensitive like for unicode word

2011-01-21 Thread proft
Thanks for response! On 21 янв, 00:29, Michael Bayer mike...@zzzcomputing.com wrote: That's SQLite's lower() function.   If you'd like to use Python's lower() function, you should call lower() on the string and use column.like(mystring.lower()).  But that won't do case-insensitive comparison

Re: [sqlalchemy] Re: rollback not working

2011-01-21 Thread Michael Bayer
On Jan 21, 2011, at 9:16 AM, bool wrote: I am not an expert in these concepts, so just trying to make sure I understand what you said. 1. If I use connection.execute(), then then every sql statements is not put in its own transactions. 2. But If I use connection-less execution like

[sqlalchemy] Inserting in a container class that behaves as list (or set) from the contained class (not from the container)

2011-01-21 Thread Hector Blanco
Hello list! I have a couple of classes. One of the behaves as the container of the other: class ContainerOfSamples(declarativeBase): __tablename__ = containers _id = Column(id, Integer, primary_key=True) _samples = relationship(Samples, cascade=all, delete,

Re: [sqlalchemy] Inserting in a container class that behaves as list (or set) from the contained class (not from the container)

2011-01-21 Thread A.M.
On Jan 21, 2011, at 12:29 PM, Hector Blanco wrote: Hello list! I have a couple of classes. One of the behaves as the container of the other: class ContainerOfSamples(declarativeBase): __tablename__ = containers _id = Column(id, Integer, primary_key=True) _samples =

[sqlalchemy] On creating new SchemaItems

2011-01-21 Thread A.M.
Hello, I would like SQLAlchemy to generate views much in the same way it can generate tables- perhaps like this: View('bob',select([...])) Is the SQLAlchemy code modular enough to support a user-defined SchemaItem or does that require changes to SQLAlchemy itself? The reason I would very

Re: [sqlalchemy] Query doesn't work for Sybase?

2011-01-21 Thread 周游弋
Thanks for your reply. I have found an option in creating table to force the quoting off. Just pass quote=false as additional argument when creating tables, it works. Thank you all the same. Joel 发自我的 iPhone 在 2011-1-21,23:24,Michael Bayer mike...@zzzcomputing.com 写道: use lower case names

Re: [sqlalchemy] Inserting in a container class that behaves as list (or set) from the contained class (not from the container)

2011-01-21 Thread Hector Blanco
Thank you for the quick reply. shouldn't this be as simple as sample.container = container Yeah... I thought so too... And actually, the getter/setters (the synonym or property) just do that... (and a check for the parameter type): class Sample(declarativeBase): # yadda, yadda, yadda

Re: [sqlalchemy] On creating new SchemaItems

2011-01-21 Thread Michael Bayer
On Jan 21, 2011, at 12:56 PM, A.M. wrote: Hello, I would like SQLAlchemy to generate views much in the same way it can generate tables- perhaps like this: View('bob',select([...])) Is the SQLAlchemy code modular enough to support a user-defined SchemaItem or does that require

Re: [sqlalchemy] On creating new SchemaItems

2011-01-21 Thread A.M.
On Jan 21, 2011, at 1:36 PM, Michael Bayer wrote: On Jan 21, 2011, at 12:56 PM, A.M. wrote: Hello, I would like SQLAlchemy to generate views much in the same way it can generate tables- perhaps like this: View('bob',select([...])) Is the SQLAlchemy code modular enough to support

Re: [sqlalchemy] Re: I need a final push

2011-01-21 Thread F.A. Pinkse
Hello Michael, Thanks for your explanation. Uhmpf Ok, the book is trashed and burnt. Oh no not all I wrote came out of the book I used it as a guide to setup a SQLAlchemy without Elixir. The part using Python as a SQLite plugin came form http://docs.python.org/py3k/library/sqlite3.html

Re: [sqlalchemy] On creating new SchemaItems

2011-01-21 Thread Michael Bayer
On Jan 21, 2011, at 3:15 PM, A.M. wrote: I guess I am curious as to why there should be a built-in way to compile SchemaItems and then a user way to do the same thing. Is there a plan to unify these methods? I've considered it but haven't drawn a picture of what that would really look