Skip to content

Commit

Permalink
mark dataset factory as private
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Oct 14, 2024
1 parent f49c3ca commit 9354e86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dlt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
)
from dlt.pipeline import progress
from dlt import destinations
from dlt.destinations.dataset import dataset
from dlt.destinations.dataset import dataset as _dataset

pipeline = _pipeline
current = _current
Expand Down Expand Up @@ -80,7 +80,7 @@
"TCredentials",
"sources",
"destinations",
"dataset",
"_dataset",
]

# verify that no injection context was created
Expand Down
12 changes: 6 additions & 6 deletions tests/load/test_read_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def double_items():
)

# check dataset factory
dataset = dlt.dataset(destination=destination_for_dataset, dataset_name=pipeline.dataset_name)
dataset = dlt._dataset(destination=destination_for_dataset, dataset_name=pipeline.dataset_name)
# verfiy that sql client and schema are lazy loaded
assert not dataset.schema
assert not dataset.sql_client
Expand All @@ -232,7 +232,7 @@ def double_items():
# check that schema is loaded by name
dataset = cast(
ReadableDBAPIDataset,
dlt.dataset(
dlt._dataset(
destination=destination_for_dataset,
dataset_name=pipeline.dataset_name,
schema=pipeline.default_schema_name,
Expand All @@ -244,7 +244,7 @@ def double_items():
# check that schema is not loaded when wrong name given
dataset = cast(
ReadableDBAPIDataset,
dlt.dataset(
dlt._dataset(
destination=destination_for_dataset,
dataset_name=pipeline.dataset_name,
schema="wrong_schema_name",
Expand All @@ -257,7 +257,7 @@ def double_items():
# check that schema is loaded if no schema name given
dataset = cast(
ReadableDBAPIDataset,
dlt.dataset(
dlt._dataset(
destination=destination_for_dataset,
dataset_name=pipeline.dataset_name,
),
Expand All @@ -269,7 +269,7 @@ def double_items():
# check that there is no error when creating dataset without schema table
dataset = cast(
ReadableDBAPIDataset,
dlt.dataset(
dlt._dataset(
destination=destination_for_dataset,
dataset_name="unknown_dataset",
),
Expand All @@ -292,7 +292,7 @@ def double_items():

dataset = cast(
ReadableDBAPIDataset,
dlt.dataset(
dlt._dataset(
destination=destination_for_dataset,
dataset_name=pipeline.dataset_name,
),
Expand Down

0 comments on commit 9354e86

Please sign in to comment.