Support result reuse in Athena data sources #7202
Open
+65
−11
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.
What type of PR is this?
Description
Currently, redash makes a query everytime the query page opens and it costs a lot if the query is too heavy.
On the other hand, there is a feature that efficiently uses query results in Athena.
https://docs.aws.amazon.com/athena/latest/ug/reusing-query-results.html
pyathena (>=2.18.0) supports the option.
https://github.com/laughingman7743/PyAthena/blob/6b8f0e94abd09115ba1277616ca84372e2f15d56/pyathena/common.py#L112-L113
It seems the reason of updating the major version is dropping python versions. and as far as I tried, queries work fine.
We may want to turn on/off the option per query but it will break the compatibility with the other data sources, so I made it a data source option. Could you consider adding this feature?
How is this tested?
Run an Athena query with this option with manually container image.
Related Tickets & Documents
N/A
Mobile & Desktop Screenshots/Recordings (if there are UI changes)