diff --git a/soda/core/soda/execution/check/row_count_comparison_check.py b/soda/core/soda/execution/check/row_count_comparison_check.py index 2fef849c2..9adc4f0ad 100644 --- a/soda/core/soda/execution/check/row_count_comparison_check.py +++ b/soda/core/soda/execution/check/row_count_comparison_check.py @@ -41,8 +41,12 @@ def __init__( # If the other partition is None, we ignore the partition_cfg setup if row_count_comparison_check_cfg.other_partition_name: - other_table_cfg = data_source_scan_cfg.get_or_create_table_cfg(row_count_comparison_check_cfg.other_table_name) - other_partition_cfg = other_table_cfg.find_partition(row_count_comparison_check_cfg.location.file_path, row_count_comparison_check_cfg.other_partition_name) + other_table_cfg = data_source_scan_cfg.get_or_create_table_cfg( + row_count_comparison_check_cfg.other_table_name + ) + other_partition_cfg = other_table_cfg.find_partition( + row_count_comparison_check_cfg.location.file_path, row_count_comparison_check_cfg.other_partition_name + ) self.other_partition.set_partition_cfg(other_partition_cfg) self.metrics["row_count"] = self.data_source_scan.resolve_metric( diff --git a/soda/core/tests/data_source/test_row_count_comparison.py b/soda/core/tests/data_source/test_row_count_comparison.py index 10bbd0af3..9186b3386 100644 --- a/soda/core/tests/data_source/test_row_count_comparison.py +++ b/soda/core/tests/data_source/test_row_count_comparison.py @@ -62,6 +62,7 @@ def test_row_count_comparison_cross_data_source(data_source_fixture: DataSourceF scan.assert_all_checks_pass() + def test_row_count_comparison_cross_data_source_with_filter(data_source_fixture: DataSourceFixture): """Does not really create two connections and test cross data sources with filtering, that is handled in integration tests.