Oh interesting.  I didn't know that about the @expression.  I'll play 
around with the as_scalar() as well, and see if I can get something to 
work.  

class Wavelength(Base):
    __tablename__ = 'wavelength'
    __table_args__ = {'autoload': True, 'schema': 'mangadatadb', 
'extend_existing': True}

    wavelength = deferred(Column(ARRAY_D(Float, zero_indexes=True)))

The wavelength table has a single row and single column, which is an array. 
 

The other table of interest would look something like 

class NSA(Base):
    __tablename__ = 'nsa'
    __table_args__ = ({'autoload': True, 'schema': 'mangasampledb'})




On Friday, July 29, 2016 at 3:13:17 PM UTC-4, Mike Bayer wrote:
>
> you might need to change more than this, but at least the fundamental 
> thing about @expression is that it has to return a column, not a Query 
> or a select().   On either one, calling as_scalar() will give you a 
> scalar subquery, e.g. a SELECT interpreted as a column. 
>
> Assuming there's still problems because once array_agg is involved, 
> things generally get crazy, send along a Wavelength, NSA and MangaNSA 
> model with that Cube and I can try putting it together. 
>

-- 
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.

Reply via email to