Skip to content

feat: add sql endpoint for tinybird queryActvitites, for preventing 414#3548

Merged
ulemons merged 10 commits into
mainfrom
feat/post-tinybird
Oct 28, 2025
Merged

feat: add sql endpoint for tinybird queryActvitites, for preventing 414#3548
ulemons merged 10 commits into
mainfrom
feat/post-tinybird

Conversation

@ulemons
Copy link
Copy Markdown
Contributor

@ulemons ulemons commented Oct 27, 2025

What

Use the SQL API on Tinybird as described in the official documentation.
This allows us to send queries via POST with a JSON body instead of long GET requests.

Why

When using the standard /v0/pipes/<pipe>.json GET approach, Tinybird can return a 414 (URI Too Long) error if the request contains too many query parameters — for example, when passing large arrays.

How

  1. Added a new pipeSql method to the tinybirdClient, using POST /v0/sql.
  2. Updated the parameter builder to correctly handle arrays and preserve their types in the JSON body.
  3. (Optional) Normalized the Tinybird response to match the existing pipe method shape for consistency.

@ulemons ulemons self-assigned this Oct 27, 2025
@ulemons ulemons requested a review from joanagmaia October 28, 2025 11:46
@ulemons ulemons marked this pull request as ready for review October 28, 2025 11:46
Copy link
Copy Markdown
Contributor

@joanagmaia joanagmaia left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@ulemons ulemons force-pushed the feat/post-tinybird branch from 5233d36 to aa87279 Compare October 28, 2025 13:44
@github-actions
Copy link
Copy Markdown
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.

@ulemons ulemons force-pushed the feat/post-tinybird branch from aa87279 to ea4ad51 Compare October 28, 2025 14:18
@github-actions
Copy link
Copy Markdown
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.

@ulemons ulemons merged commit be48aef into main Oct 28, 2025
14 checks passed
@ulemons ulemons deleted the feat/post-tinybird branch October 28, 2025 15:12
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.

2 participants