Skip to content

Commit

Permalink
chore: refactor the configurations to be passed during table creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos314 committed Aug 21, 2024
1 parent f45a715 commit 7efb96f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def test(self) -> None:

partitions = self._get_partitions()

"""In data_partitioning.singer we have only three distinct fields of data to be partitioned"""
"""In data_partitioning.singer, we currently have only three distinct fields available for partitioning"""
assert partitions == 3, f"Expected partitions 3, but got {partitions}"


Expand Down Expand Up @@ -172,7 +172,7 @@ def _create_required_tables(self) -> None:

for table, schema in REQUIRED_TABLES.items():

config_create_table = {
table_creation_config = {
"identifier": f"{SAMPLE_CONFIG['database']}.{table}",
"schema": schema,
}
Expand All @@ -181,9 +181,9 @@ def _create_required_tables(self) -> None:
partition_spec = PartitionSpec(
PartitionField(source_id=2, field_id=6, transform=DayTransform(), name="created_at_day")
)
config_create_table["partition_spec"] = partition_spec
table_creation_config["partition_spec"] = partition_spec

catalog.create_table(**config_create_table)
catalog.create_table(**table_creation_config)

@pytest.fixture(scope="class")
def resource(self): # noqa: ANN201
Expand Down

0 comments on commit 7efb96f

Please sign in to comment.