This is a follow up request from @electrum's reply to this post https://groups.google.com/forum/#!topic/presto-users/5I480n_1nPc
Creating this issue to track development for this task.
It will be great if Presto could provide a way to save output of a query as inmemory temp table.
Something like this (from spark)
DataFrame teenagers = sqlContext.sql("SELECT * FROM people WHERE age >= 13 AND age <= 19");
teenagers.registerTempTable("teenagers");
Now we can slice and dice teenagers table.
DataFrame teensFromSF = sqlContext.sql("SELECT * FROM teenagers WHERE city = 'san fransokyo' ")
+1
@puneetjaiswal -- it's not exactly a temp table, but you can store intermediate results in the memory connector (https://prestodb.io/docs/current/connector/memory.html). Does that work for you?
@puneetjaiswal I believe Spark treats that more like a temporary view, and doesn't access data until the data is requested, by running something like collect().
That said, it sounds like you're looking for "CREATE TEMPORARY VIEW" or "CREATE TEMPORARY TABLE" on a per-session basis.
I am currently looking into adding support for session-level temporary tables. Assigning this issue to me
@anusudarsan do you have any new comments on session-level temporary tables in Presto? Thanks for any update.
This issue has been automatically marked as stale because it has not had any activity in the last 2 years. If you feel that this issue is important, just comment and the stale tag will be removed; otherwise it will be closed in 7 days. This is an attempt to ensure that our open issues remain valuable and relevant so that we can keep track of what needs to be done and prioritize the right things.
Seconding @aromero-pm years later. I still think this is a good idea. Any chance this will get done in the future, @anusudarsan?
@kdonavin for your information, @anusudarsan now works on https://github.com/prestosql/presto/ repo, you can find her there.
You can also reach her on Presto Community slack.
Most helpful comment
@anusudarsan do you have any new comments on session-level temporary tables in Presto? Thanks for any update.