title: DBT - for loop issue with number as variable
body: <p>I am trying to create in DBT tool 'loop for' tables which have number as a variable, the same variable I am using also in macro. Issue is in union part. DBT is trying to create union with table name which is based on number and it is not possible in postgre sql.</p>
  <pre class="lang-sql prettyprint-override"><code>{{ config(materialized='table') }}
  
  {%-    set dpids = [&quot;123&quot;,&quot;1234&quot;]    -%}
  
  WITH
  {% for dpid in dpids %}
      {{ dpid }} AS (
          SELECT *
              FROM {{ ref('table_name') }} b
              WHERE b.create_ts &gt; ({{ get_last_load_timestamp('table_name', dpid) }}) 
              AND b.dpid = '{{ dpid }}'
      ){% if not loop.last %},{% endif %}
  {% endfor %}
  
  {{ union_all(dpids) }}
  </code></pre>
  <pre><code>    select * from 123 union all select * from 1234 --fail
  </code></pre>
  <p>So I tried to to change it where I added t_ before number, but in union part, dbt try to get all characters from string.</p>
  <pre class="lang-sql prettyprint-override"><code>with 
  {% for 't_'~dpid in dpids %}
      {{ dpid }} AS (
          SELECT *
              FROM {{ ref('table_name') }} b
              WHERE b.create_ts &gt; ({{ get_last_load_timestamp('table_name', dpid) }}) 
              AND b.dpid = '{{ dpid }}'
      ){% if not loop.last %},{% endif %}
  {% endfor %}
  {{ union_all('t_'~dpids) }}
  </code></pre>
  <pre class="lang-sql prettyprint-override"><code>select * from t 
  union all 
  select * from _ 
  union all 
  select * from 1
  union all 
  select * from 2
  ...and so on
  </code></pre>
  <p>I dont know if its not just possible or am I missing something.
  If someone has any ideas I would be grateful.</p>
  <p>Thanks</p>