Skip to content

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 Copilot and owlas May 6, 2025 11:01
Copy link

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant