MatchRateCheck: a date filter in filters_left isn't the result's date

Open Beginner friendly
#201 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
83/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, yaml

Research direction

Find MatchRateCheck.date_filter and the tests for MatchRateCheck, then trace how its result DATE and missing-data message choose a date. Add coverage for date filters in filters, filters_left, and filters_right, including the left-table example in the issue. Done means the result and missing-data message use the checked date for each filter location; run the focused tests.

Written by the indexing model from the issue text.

Description

MatchRateCheck.date_filter only looks for the date filter in the shared filters. A dimension table on the right often has no date column, so the date filter belongs in filters_left, but then the check finds no date filter: the result's DATE, and the missing-data message, show the day of the run instead of the checked day.

- check_type: MatchRateCheck
  left_table: orders
  right_table: customers
  check_column: customer_id
  join_columns: [customer_id]
  filters_left:
    partition_date: {column: order_date, value: "2024-01-31", type: date}
# result: DATE = <today>, not 2024-01-31

Confirmed by running it during the review of #116, whose MatchRateCheck page documents the behaviour.

Fix: take the date filter from filters, else from filters_left (else filters_right), and test the result's DATE for each.

Dominant language
Python
Stars
4
Forks
3
Avg merge
28m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ottogroup/koality

All issues in ottogroup/koality

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.