Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi-kumar-pilla committed Dec 4, 2024
1 parent c80645d commit 14d8c36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 2 additions & 4 deletions kedro-datasets/kedro_datasets/ibis/table_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import TYPE_CHECKING, Any, ClassVar

import ibis.expr.types as ir
from kedro.io import AbstractDataset, DatasetError
from kedro.io import AbstractDataset

from kedro_datasets._utils import ConnectionMixin

Expand Down Expand Up @@ -74,7 +74,7 @@ class TableDataset(ConnectionMixin, AbstractDataset[ir.Table, ir.Table]):
def __init__( # noqa: PLR0913
self,
*,
table_name: str | None = None,
table_name: str,
connection: dict[str, Any] | None = None,
save_args: dict[str, Any] | None = None,
metadata: dict[str, Any] | None = None,
Expand Down Expand Up @@ -107,8 +107,6 @@ def __init__( # noqa: PLR0913
metadata: Any arbitrary metadata. This is ignored by Kedro,
but may be consumed by users or external plugins.
"""
if table_name is None:
raise DatasetError("Must provide `table_name`.")

self._table_name = table_name
self._connection_config = connection or self.DEFAULT_CONNECTION_CONFIG
Expand Down
6 changes: 0 additions & 6 deletions kedro-datasets/tests/ibis/test_table_dataset.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import duckdb
import ibis
import pytest
from kedro.io import DatasetError
from pandas.testing import assert_frame_equal

from kedro_datasets.ibis import FileDataset, TableDataset
Expand Down Expand Up @@ -79,11 +78,6 @@ def test_save_extra_params(self, table_dataset, save_args, dummy_table, database
)
assert not con.sql("SELECT * FROM duckdb_views").fetchnumpy()["view_name"]

def test_no_table_name(connection_config):
pattern = r"Must provide `table_name`\."
with pytest.raises(DatasetError, match=pattern):
TableDataset(connection=connection_config)

@pytest.mark.parametrize(
("connection_config", "key"),
[
Expand Down

0 comments on commit 14d8c36

Please sign in to comment.