title: Redshift COPY operation doesn't work in SQLAlchemy
body: <p>I'm trying to do a Redshift COPY in SQLAlchemy.</p>
  
  <p>The following SQL correctly copies objects from my S3 bucket into my Redshift table when I execute it in psql:</p>
  
  <pre><code>COPY posts FROM 's3://mybucket/the/key/prefix' 
  WITH CREDENTIALS 'aws_access_key_id=myaccesskey;aws_secret_access_key=mysecretaccesskey' 
  JSON AS 'auto';
  </code></pre>
  
  <p>I have several files named </p>
  
  <pre><code>s3://mybucket/the/key/prefix.001.json
  s3://mybucket/the/key/prefix.002.json   
  etc.
  </code></pre>
  
  <p>I can verify that the new rows were added to the table with <code>select count(*) from posts</code>.</p>
  
  <p>However, when I execute the exact same SQL expression in SQLAlchemy, execute completes without error, but no rows get added to my table.</p>
  
  <pre><code>session = get_redshift_session()
  session.bind.execute("COPY posts FROM 's3://mybucket/the/key/prefix' WITH CREDENTIALS aws_access_key_id=myaccesskey;aws_secret_access_key=mysecretaccesskey'    JSON AS 'auto';")
  session.commit()
  </code></pre>
  
  <p>It doesn't matter whether I do the above or</p>
  
  <pre><code>from sqlalchemy.sql import text 
  session = get_redshift_session()
  session.execute(text("COPY posts FROM 's3://mybucket/the/key/prefix' WITH CREDENTIALS aws_access_key_id=myaccesskey;aws_secret_access_key=mysecretaccesskey'    JSON AS 'auto';"))
  session.commit()
  </code></pre>