title: How to pass a date string into an SQL query using Jinja
body: <p>I need to pass in a date '20200303' into an SQL table reading jinja.</p>
  
  <p>the python script is as follows:</p>
  
  <pre><code>record_date = '20170303'
  
  sql_data = {'date':record_date}
  
  for file in files_sql:
      with open(file) as file_reader:
          sql_template = file_reader.read()
  
      sql_template = jinja(sql_template)
      sql_query = sql_template.render(data=sql_data)
      spark.sql(sql_query)
  </code></pre>
  
  <p>the sql query file (query_A.sql) it's reading looks like this:</p>
  
  <pre><code>SELECT * FROM table where date &lt;= {{date}}
  </code></pre>
  
  <p>however this is not working and is returning 0 rows. what am I doing wrong here?</p>
  
  <p>EDIT: fixed key from record_date to date, but still having issues</p>