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'}) z = Column(Float) This table basically has a float column that corresponds to objects in the main cube (object) table. Each float value is used to modify the array in wavelength to a unique array for that object. The Cube class joins to NSA via two tables that are just intermediate linking tables for this purpose Cube -> Table A -> Table AToB - > Table B (NSA) class MangaTarget(Base): __tablename__ = 'manga_target' __table_args__ = {'autoload': True, 'schema': 'mangasampledb'} class MangaTargetToNSA(Base): __tablename__ = 'manga_target_to_nsa' __table_args__ = ( ForeignKeyConstraint(['manga_target_pk'], ['mangasampledb.manga_target.pk']), ForeignKeyConstraint(['nsa_pk'], ['mangasampledb.nsa.pk']), {'autoload': True, 'schema': 'mangasampledb'}) The rest can probably be hacked together. Let me know if you need anything else. -- 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.