Skip to content

Commit

Permalink
Update teradata.py
Browse files Browse the repository at this point in the history
Updated comments. Adjusted to only change poolclass.
  • Loading branch information
brock-acryl committed Feb 7, 2025
1 parent 4760bac commit 40499e0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,10 @@ def _add_default_options(self, sql_config: SQLCommonConfig) -> None:
"""Add Teradata-specific default options"""
super()._add_default_options(sql_config)
if sql_config.is_profiling_enabled():

Check warning on line 685 in metadata-ingestion/src/datahub/ingestion/source/sql/teradata.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/sql/teradata.py#L684-L685

Added lines #L684 - L685 were not covered by tests
# By default, Teradata uses SingletonThreadPool, which is not supported by sqlalchemy
# QueuePool used for parallel connections when profiling is enabled
# Sqlalchemy uses QueuePool by default however Teradata uses SingletonThreadPool.
# SingletonThreadPool does not support parellel connections.
# https://docs.sqlalchemy.org/en/20/core/pooling.html#connection-pool-configuration
# https://github.com/Teradata/sqlalchemy-teradata/issues/96
sql_config.options.setdefault("poolclass", QueuePool)

Check warning on line 690 in metadata-ingestion/src/datahub/ingestion/source/sql/teradata.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/sql/teradata.py#L690

Added line #L690 was not covered by tests

@classmethod
Expand Down

0 comments on commit 40499e0

Please sign in to comment.