On Wed, Oct 11, 2017 at 4:20 AM, Julien Meyer <julien.mey...@gmail.com> wrote:
> Thanks for your response.
> I tried to reproduce the problem on a small environment without success.
>
> In my use case, the schema name is set dynamically to support cross database
> query. I suppose the problem comes from this point.

hmm you mean like:

t = Table('foo', m, ...)

t.schema = 'some schema'

?

that will cause a lot of problems.  Have you looked into the schema
translation feature?   This is at
http://docs.sqlalchemy.org/en/latest/core/connections.html?highlight=execution_options#schema-translating
and should not produce any problems in rendering SQL.




>
> I solved my problem by setting an other relationship to 'joined'. Before,
> the row_number was computed with some left join. After setting a third
> relationship on 'joined' mode, the row_number is computed only from the
> "main" table and left joins are made on this result set.
>
> If I can reproduce the problem in the future, i will create an issue.
>
> Le mardi 10 octobre 2017 18:43:11 UTC+2, Mike Bayer a écrit :
>>
>> On Tue, Oct 10, 2017 at 11:07 AM, Julien Meyer <julien...@gmail.com>
>> wrote:
>> > Hello,
>> >
>> > I have a problem when using an offset (with MSSQL) and joined
>> > relationships
>> > : "Invalid column name '%(181351312 customerfollowupaction)s_tstamp'".
>> >
>> > The query works without offset. But when adding an offset, SQLAlchemy
>> > creates an alias query with the row_number helper function. The "bug" is
>> > in
>> > the outer select clause : all relationship fields are not "translated"
>> > by
>> > SQLAlchemy (printed with %(...)s_column_name).
>>
>> sounds like a bug.    Can you please provide a complete test case that
>> reproduces your issue?  thanks!
>>
>>
>> >
>> > Any idea?
>> >
>> > Thanks
>> >
>> >
>> > --
>> > 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+...@googlegroups.com.
>> > To post to this group, send email to sqlal...@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 - 
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.

Reply via email to