<p dir="auto"><strong>Apache Airflow version</strong>: 1.10.11</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"><strong>What you expected to happen</strong>:</p>

<p dir="auto"><strong>How to reproduce it</strong>:</p>
<p dir="auto">Set MSSQL as the sql connection backend  and examine the airflow scheduler logs</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2020-07-22 08:27:16,334] {settings.py:306} DEBUG - Disposing DB connection pool (PID 7714)
Process DagFileProcessor1036-Process:
Traceback (most recent call last):
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py&quot;, line 1278, in _execute_context
    cursor, statement, parameters, context
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py&quot;, line 593, in do_execute
    cursor.execute(statement, parameters)
pyodbc.ProgrammingError: ('42000', &quot;[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '1'. (102) (SQLExecDirectW)&quot;)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.7/multiprocessing/process.py&quot;, line 297, in _bootstrap
    self.run()
  File &quot;/usr/local/lib/python3.7/multiprocessing/process.py&quot;, line 99, in run
    self._target(*self._args, **self._kwargs)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/airflow/jobs/scheduler_job.py&quot;, line 159, in _run_file_processor
    pickle_dags)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/db.py&quot;, line 74, in wrapper
    return func(*args, **kwargs)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/airflow/jobs/scheduler_job.py&quot;, line 1593, in process_file
    paused_dag_ids = models.DagModel.get_paused_dag_ids(dag_ids=dagbag.dag_ids)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/db.py&quot;, line 74, in wrapper
    return func(*args, **kwargs)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/airflow/models/dag.py&quot;, line 1808, in get_paused_dag_ids
    .filter(DagModel.dag_id.in_(dag_ids))
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py&quot;, line 3341, in all
    return list(self)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py&quot;, line 3503, in __iter__
    return self._execute_and_instances(context)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py&quot;, line 3528, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py&quot;, line 1014, in execute
    return meth(self, multiparams, params)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py&quot;, line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py&quot;, line 1133, in _execute_clauseelement
    distilled_params,
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py&quot;, line 1318, in _execute_context
    e, statement, parameters, cursor, context
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py&quot;, line 1512, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py&quot;, line 178, in raise_
    raise exception
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py&quot;, line 1278, in _execute_context
    cursor, statement, parameters, context
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py&quot;, line 593, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', &quot;[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '1'. (102) (SQLExecDirectW)&quot;)
[SQL: SELECT dag.dag_id AS dag_dag_id 
FROM dag 
WHERE dag.is_paused IS 1 AND dag.dag_id IN (?)]
[parameters: ('test-dag',)]
(Background on this error at: http://sqlalche.me/e/13/f405)
"><pre class="notranslate"><code class="notranslate">[2020-07-22 08:27:16,334] {settings.py:306} DEBUG - Disposing DB connection pool (PID 7714)
Process DagFileProcessor1036-Process:
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
    cursor, statement, parameters, context
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
    cursor.execute(statement, parameters)
pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '1'. (102) (SQLExecDirectW)")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/jobs/scheduler_job.py", line 159, in _run_file_processor
    pickle_dags)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/db.py", line 74, in wrapper
    return func(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/jobs/scheduler_job.py", line 1593, in process_file
    paused_dag_ids = models.DagModel.get_paused_dag_ids(dag_ids=dagbag.dag_ids)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/db.py", line 74, in wrapper
    return func(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/models/dag.py", line 1808, in get_paused_dag_ids
    .filter(DagModel.dag_id.in_(dag_ids))
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3341, in all
    return list(self)
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3503, in __iter__
    return self._execute_and_instances(context)
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3528, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1014, in execute
    return meth(self, multiparams, params)
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1133, in _execute_clauseelement
    distilled_params,
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1318, in _execute_context
    e, statement, parameters, cursor, context
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1512, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
    raise exception
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
    cursor, statement, parameters, context
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '1'. (102) (SQLExecDirectW)")
[SQL: SELECT dag.dag_id AS dag_dag_id 
FROM dag 
WHERE dag.is_paused IS 1 AND dag.dag_id IN (?)]
[parameters: ('test-dag',)]
(Background on this error at: http://sqlalche.me/e/13/f405)

</code></pre></div>

<p dir="auto"><strong>Anything else we need to know</strong>:</p>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.5.2</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">When using dynamic task groups mapping I cannot access logs of the mapped task instances</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31843161/231144317-5d29e07d-9e50-4540-b482-d080e80793f2.png"><img src="https://user-images.githubusercontent.com/31843161/231144317-5d29e07d-9e50-4540-b482-d080e80793f2.png" alt="obrazek" style="max-width: 100%;"></a></p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">I want to be able to click through logs of mapped task instances in the Grid View in Airflow UI</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Follow tutorial <a href="https://docs.astronomer.io/learn/dynamic-tasks#mapping-over-task-groups" rel="nofollow">https://docs.astronomer.io/learn/dynamic-tasks#mapping-over-task-groups</a></p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">debian</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Other Docker-based deployment</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>