title: Snowflake stored procedure fails from dbt
body: <p>I have a problem to execute a stored procedure in Snowflake by dbt:</p>
  <p>The description of my procedure is like: MyStoredProcedure(ARRAY, VARCHAR, VARCHAR)</p>
  <p>So, when I want to run it, I use <strong>array_construct</strong> function to create the first argument, for example:
  <code>call MyStoredProcedure(array_construct(array_construct('str_1', 'str_2')), 'schema_name', 'table_name');</code></p>
  <p>This works when I run it in Snowflake. However, when I run this from dbt it fails with this error:</p>
  <blockquote>
  <p>Modifying a transaction that has started at a different scope is not allowed.</p>
  </blockquote>
  <p>Which I am sure that it is something related to invoking array_construct in this call.</p>
  <p>I should mention that to run this from dbt I have defined a macro like this:</p>
  <pre><code>{% macro MyStoredProcedure() %}
      {% set query -%}
          CALL MyStoredProcedure(
             array_construct(array_construct('str_1', 'str_2')),
             'schema_name',
             'table_name');
      {%- endset %}
  
      {% do run_query(query) %}
  {% endmacro %}
  </code></pre>
  <p>And run it of course like: <code>dbt run-operation MyStoredProcedure</code></p>
  <p>I appreciate any tip or idea to help me with this problem.</p>
  <p>Thanks</p>