title: sqlalchemy : executing raw sql with parameter bindings
body: <p>I'm trying to run this simple raw sql statement with parameters with SQLALchemy (within an alembic script) :</p>
  
  <pre><code>from alembic import op
  
  t = {"code": "123", "description": "one two three"}
  
  op.execute("insert into field_tags (id, field_id, code, description) "+
                 "values (1,'zasz', :code ,:description')", t)
  </code></pre>
  
  <p>And I get the following error :</p>
  
  <pre><code>sqlalchemy.exc.StatementError: A value is required for bind parameter 
    'description' (original cause: InvalidRequestError: A value is required for 
    bind parameter 'description') "insert into field_tags (id, field_id, code, 
    description) values (1, 'math', 
    %(code)s ,%(description)s)" []
  </code></pre>
  
  <hr>
  
  <p><strong>The solution:</strong></p>
  
  <pre><code>t = {"code": "123", "description": "one two three"}
  from sqlalchemy.sql import text
  
  op.get_bind().execute(text("insert into field_tags (id, field_id, code, description) "+
                 "values (1,'zasz', :code ,:description')"), **t)
  </code></pre>