Skip to content

Commit

Permalink
fix(datasets): make connection config key hashable
Browse files Browse the repository at this point in the history
Signed-off-by: Deepyaman Datta <[email protected]>
  • Loading branch information
deepyaman committed Apr 9, 2024
1 parent 7b3ae33 commit 1fcb01a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kedro-datasets/kedro_datasets/ibis/table_dataset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Provide data loading and saving functionality for Ibis's backends."""
from __future__ import annotations

import json
from copy import deepcopy
from typing import TYPE_CHECKING, Any, ClassVar

Expand Down Expand Up @@ -121,7 +122,7 @@ def __init__( # noqa: PLR0913
@property
def connection(self) -> BaseBackend:
cls = type(self)
key = tuple(sorted(self._connection_config.items()))
key = json.dumps(self._connection_config, sort_keys=True)
if key not in cls._connections:
import ibis

Expand Down

0 comments on commit 1fcb01a

Please sign in to comment.