title: dbt macro to iterate over item in list within a sql call?
body: <p>First off, I am a dbt backer! I love this tool and the versatility of it.</p>
  <p>When reading some of the <a href="https://docs.getdbt.com/reference/dbt-jinja-functions/adapter#drop_relation" rel="nofollow noreferrer">docs</a> I noticed that I might be able to do some meta work on my schemas every time I call a macro.</p>
  <p>One of those would be to clean up schemas.</p>
  <p>(<em>This has been edited as per discussion within the dbt slack</em>)</p>
  <ol>
  <li><p><code>dbt run-operation freeze</code> that would introspect all of the tables that would be written with dbt run but with an autogenerated hash (might just be timestamp). It would output those tables in the schema of my choice and would log the “hash” to console.</p>
  </li>
  <li><p><code>dbt run-operation unfreeze --args '{hash: my_hash}'</code> that would then proceed to find the tables written with that hash prefix and clean them out of the schema.</p>
  </li>
  </ol>