Skip to content

Commit

Permalink
[DOP-16999] Log detected JDBC dialect while using DBReader
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Aug 29, 2024
1 parent cf1dca4 commit 7e70db1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions onetl/connection/db_connection/greenplum/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ def get_df_schema(
columns: list[str] | None = None,
options: JDBCReadOptions | None = None,
) -> StructType:
log.info("|%s| Detected dialect: '%s'", self.__class__.__name__, self._get_spark_dialect_name())
log.info("|%s| Fetching schema of table %r ...", self.__class__.__name__, source)

query = self.dialect.get_sql_query(source, columns=columns, limit=0, compact=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def read_source_as_df(
limit=limit,
)

log.info("|%s| Detected dialect: '%s'", self.__class__.__name__, self._get_spark_dialect_name())
log.info("|%s| Executing SQL query (on executor):", self.__class__.__name__)
log_lines(log, query)

Expand Down

0 comments on commit 7e70db1

Please sign in to comment.