Modeling inserts-in-a-loop in dbt

I think what you are trying to achieve here is basically the insert_by_period materialization, which is unfortunately not supported for Snowflake at the moment. However, there is an already open PR that would make it Snowflake-compatible. If you are curious, you can give it a spin.