Re: [sqlalchemy] cannot access tables

2014-08-18 Thread Greg Silverman
SELECT default_schema_name FROM sys.database_principals WHERE name = ? AND type = 'S' On Mon, Aug 18, 2014 at 9:47 AM, Horcle g...@umn.edu wrote: On Friday, August 15, 2014 8:28:41 PM UTC-5, Michael Bayer wrote: On Aug 15, 2014, at 5:03 PM, Greg

Re: [sqlalchemy] Issue with return results

2014-09-04 Thread Greg Silverman
I think I am going to dump SQL Server and just go with Postgres. Much easier, and less of a headache. Fortunately, we are not yet in production. Thanks! Greg-- On Thu, Sep 4, 2014 at 8:31 PM, Horcle g...@umn.edu wrote: Thanks. I forgot to mention that I had tried adding the encoding scheme

Re: [sqlalchemy] Issue with return results

2014-09-08 Thread Greg Silverman
Hi Jonathan, For the record, in my current setup, I installed python via Homebrew. Prior to that, I was using the Apple build of python, which would have been the 32-bit version that came with Lion. Greg-- On Mon, Sep 8, 2014 at 6:31 PM, Jonathan Vanasco jonat...@findmeon.com wrote: Looking at

Re: [sqlalchemy] Re: Dynamically constructing joins

2015-03-25 Thread Greg Silverman
Ha! Ha! On my previous attempts, I had something similar to this, but instead, I had query = db.session.query(label('sid', distinct(a[1].c.patient_sid))) if (n 1): for table in join_tables[1:]: for criterion in join_criteria[1:]:

Re: [sqlalchemy] dealing with NULLS in 1-many relationships

2016-06-06 Thread Greg Silverman
Unfortunately, the data are out of our control. However, this solution looks like it will do the job. Thanks! Greg-- On Mon, Jun 6, 2016 at 5:54 PM, Mike Bayer wrote: > > > On 06/06/2016 11:21 AM, Horcle wrote: > >> I have the following models: >> >> class

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-03-01 Thread Greg Silverman
On Wed, Mar 1, 2017 at 8:53 PM, mike bayer wrote: > > > On 03/01/2017 08:27 PM, GMS wrote: > >> I have the following class models: >> >> >> | class DiagnosisDetail(Model): >> __tablename__ = 'vw_svc_diagnosis' >> diagnosis_id = Column(String(32),

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-03-02 Thread Greg Silverman
wrote: > > > On 03/01/2017 10:22 PM, Greg Silverman wrote: > >> >> >> On Wed, Mar 1, 2017 at 8:53 PM, mike bayer <mike...@zzzcomputing.com >> <mailto:mike...@zzzcomputing.com>> wrote: >> >> >> >> On 0

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-04-24 Thread Greg Silverman
Hi Mike, I'm finally getting to this. Instead of having both a detail and grouped methods, I would like to have only the grouped method. I'm not sure I follow your suggestion for the two methods above and how that would be modified to fit into the @property in my class. Could you please

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-04-24 Thread Greg Silverman
, 2017 at 12:21 PM, mike bayer <mike...@zzzcomputing.com> wrote: > > > On 04/24/2017 12:51 PM, Greg Silverman wrote: > >> Hi Mike, >> I'm finally getting to this. Instead of having both a detail and grouped >> methods, I would like to have only the grouped m

Re: [sqlalchemy] Grouped data in a Flask/SQLAlchemy class

2017-04-24 Thread Greg Silverman
Yes, I can certainly do that. Sounds pretty simple, actually. I may have more questions as I dive into this. Thanks! On Mon, Apr 24, 2017 at 3:06 PM, mike bayer <mike...@zzzcomputing.com> wrote: > > > On 04/24/2017 03:42 PM, Greg Silverman wrote: > >> My naive first

Re: [sqlalchemy] Re: How to format class property as another accessible property

2017-06-07 Thread Greg Silverman
Hi, Thanks for pointing that out. It's still throwing the same error, even when changed. Does not seem to like passing the column name to the column_property method. Greg-- On Wed, Jun 7, 2017 at 3:30 PM, Jonathan Vanasco wrote: > These are two different lines of code.

Re: [sqlalchemy] How to format class property as another accessible property

2017-06-07 Thread Greg Silverman
Thanks, it worked! I tried something similar using the @hybrid_property decorator, but could not get it to work. What exactly is the difference between that and the @property decorator? Greg-- On Wed, Jun 7, 2017 at 5:08 PM, mike bayer wrote: > > > On 06/07/2017

Re: [sqlalchemy] How to format class property as another accessible property

2017-06-07 Thread Greg Silverman
Oh right, I've used the @property decorator before, just been a while. Thanks for the explanation of @hybrid_property. Makes sense. On Wed, Jun 7, 2017 at 5:32 PM, mike bayer <mike...@zzzcomputing.com> wrote: > > > On 06/07/2017 06:19 PM, Greg Silverman wrote: > >> Th