Skip to content

feat: add sort and filters to project-insights#3922

Open
gaspergrom wants to merge 1 commit intomainfrom
feat/project-insights-filters-sort
Open

feat: add sort and filters to project-insights#3922
gaspergrom wants to merge 1 commit intomainfrom
feat/project-insights-filters-sort

Conversation

@gaspergrom
Copy link
Contributor

@gaspergrom gaspergrom commented Mar 16, 2026

Note

Medium Risk
Adds client-controlled filtering and dynamic ORDER BY to the project_insights query, which can change result sets and query performance and needs careful validation of allowed sort columns/directions.

Overview
Adds new optional query parameters to project_insights.pipe: an isLfx filter (mapped to isLF) and dynamic sorting via orderByField/orderByDirection (defaulting to name/ascending), with a deterministic secondary sort by name.

Written by Cursor Bugbot for commit d406322. This will update automatically on new commits. Configure here.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copilot AI review requested due to automatic review settings March 16, 2026 10:57
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

2 similar comments
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link
Contributor

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

Adds sorting and filtering capabilities to the project_insights Tinybird pipe, allowing consumers to filter by LFX status and specify sort field/direction.

Changes:

  • Added isLfx filter parameter to restrict results to LFX or non-LFX projects
  • Added orderByField and orderByDirection parameters for sorting, with name ASC as secondary sort
  • Updated pipe description with new parameter documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +66 to +67
String(
orderByField, "name", description="Order by field.", required=False
Comment on lines +71 to +81
{% if String(
orderByDirection,
'asc',
description="Order by direction. ASC or DESC",
required=False,
) == 'asc' or String(
orderByDirection,
'asc',
description="Order by direction. ASC or DESC",
required=False,
) == 'ASC' %} ASC
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.

3 participants