<p dir="auto"><a href="url">https://airflow.readthedocs.io/en/stable/_modules/airflow/hooks/dbapi_hook.html#DbApiHook.get_records</a></p>
<p dir="auto">In the method description said, that get_records can take string and list of the strings. But it can execute only string, not list. The method doesn't even check is it a list or is it a string.</p>
<p dir="auto"><strong>Apache Airflow version</strong>:1.10.10</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">passing a list to <code class="notranslate">dbapi_hook.get_records</code> fails<br>
<code class="notranslate">TypeError: argument 1 must be a string or unicode object: got list instead</code></p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">return list of query results.</p>
<p dir="auto"><strong>How to reproduce it</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from airflow.hooks.postgres_hook import PostgresHook
PostgresHook().get_records(['select * from dag_run limit 1', 'select * from dag_run limit 1'])"><pre class="notranslate"><code class="notranslate">from airflow.hooks.postgres_hook import PostgresHook
PostgresHook().get_records(['select * from dag_run limit 1', 'select * from dag_run limit 1'])
</code></pre></div>
<p dir="auto"><strong>Anything else we need to know</strong>:</p>