Skip to content

Commit

Permalink
Change jobDescription for DBReader & FileDFReader
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Oct 30, 2024
1 parent e1ab213 commit 9c72d7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/changelog/next_release/+.improvement.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Change Spark ``jobDescription`` for DBReader & FileDFReader from ``DBReader.run() -> Connection`` to ``Connection -> DBReader.run()``.
2 changes: 1 addition & 1 deletion onetl/db/db_reader/db_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def run(self) -> DataFrame:

self._check_strategy()

job_description = f"{self.__class__.__name__}.run({self.source}) -> {self.connection}"
job_description = f"{self.connection} -> {self.__class__.__name__}.run({self.source})"
with override_job_description(self.connection.spark, job_description):
if not self._connection_checked:
self._log_parameters()
Expand Down
4 changes: 2 additions & 2 deletions onetl/file/file_df_reader/file_df_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ def run(self, files: Iterable[str | os.PathLike] | None = None) -> DataFrame:
self._log_parameters(files)

if files:
job_description = f"{self.__class__.__name__}.run([..files..]) -> {self.connection}"
job_description = f"{self.connection} -> {self.__class__.__name__}.run([..files..])"
else:
job_description = f"{self.__class__.__name__}.run({self.source_path}) -> {self.connection}"
job_description = f"{self.connection} -> {self.__class__.__name__}.run({self.source_path})"

with override_job_description(self.connection.spark, job_description):
paths: FileSet[PurePathProtocol] = FileSet()
Expand Down

0 comments on commit 9c72d7a

Please sign in to comment.