On Jul 23, 2013, at 11:09 AM, matt g <mgeo...@gmail.com> wrote:

> Hi,
> We are using sqlalchemy with Amazon Redshift. One of the things that I wanted 
> to do was to create a custom construct for Redshift's unload statement. I 
> modified the sample InsertFromSelect 
> (http://docs.sqlalchemy.org/en/rel_0_8/core/compiler.html?highlight=insertfromselect).
>  However, we are having problems because the 
> UNLOAD(http://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html) statement 
> requires that the internal select be wrapped in single quotes. What would be 
> the best way to ensure that the bind params for the enclosing select clause 
> be escaped properly?

why do bound parameters need to be escaped?  you mean they have to be rendered 
out inline ?    If that's the case, set the literal_binds keyword arg to True 
when you pass along to compiler.process().

-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to