code: def process_template(self, sql, **kwargs):
          
          template = self.env.from_string(sql)
          kwargs.update(self.context)
          return template.render(kwargs)
docs: Processes a sql template
  
          >>> sql = "SELECT '{{ datetime(2017, 1, 1).isoformat() }}'"
          >>> process_template(sql)
          "SELECT '2017-01-01T00:00:00'"