title: How Limit Session Pool Airflow OracleHook
body: <p>I am using airflow with <a href="http://airflow.apache.org/docs/apache-airflow/1.10.13/_modules/airflow/hooks/oracle_hook.html" rel="nofollow noreferrer">OracleHook</a> to do poolling in a database.
  I performed the connection configuration using <a href="https://airflow.apache.org/docs/apache-airflow-providers-oracle/stable/connections/oracle.html" rel="nofollow noreferrer">oracle connection</a> through the graphical interface.</p>
  <p>When executing the first dag, during the select, approximately 100 sessions were created.
  I was able to track this by monitoring the oracle table.</p>
  <pre><code>SELECT *
  FROM v$session;
  </code></pre>
  <p>I would like to pass some configuration to oracle or to the hook that can limit the maximum value of the connection pool or sessions with the database to a maximum of 20 for example.</p>
  <p>Here is a snippet from my DAG:</p>
  <pre class="lang-py prettyprint-override"><code>args = {
      'owner': 'dekstra',
      'depends_on_past': False,
      'start_date': days_ago(2),
      'retries': 1
  }
  
  dag = DAG(
      'documents',
      schedule_interval=timedelta(hours=2),
      default_args=args
  )
  
  listing = PythonOperator(
      task_id='listing',
      provide_context=True,
      python_callable=DocumentsService.listing,
      dag=dag
  )
  
  listing
  </code></pre>
  <pre class="lang-py prettyprint-override"><code>class DocumentsService:
  
      @staticmethod
      def listing(**kwargs):
          data = [column[0] for column in
                  OracleHook(oracle_conn_id='oracle_connection').get_records(sql=DocumentsQuery.listing())]
  
          logger.info(&quot;Remaining Documents: {}&quot;.format(len(data)))
  
          shuffle(data)
  
          return data[:50]
  </code></pre>
  <p>I am using the <code>cx_Oracle</code> library in conjunction with <code>OracleHook</code>, it is possible to limit the session pool as specified <a href="https://cx-oracle.readthedocs.io/en/latest/user_guide/connection_handling.html#connpool" rel="nofollow noreferrer">here</a>, but I do not know how to pass this configuration to <code>OracleHook</code></p>