Skip to content

Commit

Permalink
removed irrelevant attrs from describe() for managed tables
Browse files Browse the repository at this point in the history
Signed-off-by: Minura Punchihewa <minurapunchihewa17@gmail.com>
  • Loading branch information
MinuraPunchihewa committed Oct 1, 2024
1 parent 73dc1eb commit fef688f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ def _describe(self) -> dict[str, str | list | None]:
"database": self._table.database,
"table": self._table.table,
"format": self._table.format,
"location": self._table.location,
"write_mode": self._table.write_mode,
"dataframe_type": self._table.dataframe_type,
"primary_key": self._table.primary_key,
Expand Down
12 changes: 12 additions & 0 deletions kedro-datasets/kedro_datasets/databricks/managed_table_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,16 @@ def _create_table( # noqa: PLR0913
primary_key=primary_key,
format=format
)

def _describe(self) -> dict[str, str | list | None]:
"""Returns a description of the instance of the dataset.
Returns:
Dict[str, str]: Dict with the details of the dataset.
"""
description = super()._describe()
del description["format"]
del description["location"]

return description

0 comments on commit fef688f

Please sign in to comment.