Skip to content

Dimension filters #10

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ZmeiGorynych
Copy link

Partially addressing #6, allowing to filter by dimension values

@ZmeiGorynych
Copy link
Author

I formatted the files I changed with Black --line-length 80, please let me know if you prefer other settings

@hamzahc1 hamzahc1 requested review from owlas and Copilot May 6, 2025 11:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for filtering query results by dimension values in the Python SDK. Key changes include new tests for dimension filters, updates to the Query and Model classes to accept filters, and the introduction of a new filter module.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/test_acceptance.py Added tests for filtering queries by dimension values
lightdash/query.py Updated Query to accept and process filters in query payload
lightdash/models.py Updated query method to pass filters to Query
lightdash/filter.py Introduced DimensionFilter and CompositeFilter for query filtering support
Comments suppressed due to low confidence (1)

lightdash/filter.py:99

  • [nitpick] The variable name 'filter' shadows a built-in function. It is recommended to rename it (e.g., to 'flt') to avoid potential confusion.
for filter in self.filters:

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant