Ability for data handlers to stream data#12018
Merged
Merged
Conversation
ea-rus
reviewed
Mar 4, 2026
ea-rus
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces changes that enable data handlers to return data in chunks rather than a single large block.
Originally, data handlers would always return data as one large block in response to a user's request (when using the
native_querymethod). This approach caused issues when requesting large amounts of data, as it could exceed memory capacity and lead to 'out of memory' errors.Now, with specific modifications, data handlers can send data to the user in parts without storing all the data in memory at once. Currently, this is supported for:
In this PR, the following handlers have been modified to support chunked data transfer:
Changes to the HTTP API:
A new parameter,
response_format, has been added to the/query/sqlendpoint with the following possible values:application/jsonwith all data in one piece.sse: The response will be streamed astext/event-stream.jsonlines: The response will be streamed asapplication/jsonlines.Fixes #FQE-1618
Type of change
(Please delete options that are not relevant)
Verification Process
To ensure the changes are working as expected:
Additional Media:
Checklist: