-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot created temp table in redshift DB #3524
Comments
Stacktrace please. What do you mean with "create temp table" ? |
When i fire "create temp table" query in sqllab it does not work for redshift DB. stacktrace:
stacktrace
|
I also observed this issue. After looking deeper into the problem, I realized that the problem is not that the -- query block 1
-- dummy table is just a copy of customer table
create temp table dummy
as
(
select user_id
from customer
)
;
-- query block 2
select * from dummy I will get the expected result. However if I first run query block 1 and then query block 2, I will receive error message indicating table
I am starting to wonder how SQL lab handles "session". Does each SQL lab run re-connect to the database (start a new session) or it uses the same connection throughout the time when user is still logged in? For most of the use cases, I think it is more convenient to enable SQL lab user to first create a temp table and then use it afterwards. Is it possible to achieve this? Thanks very much for the help! |
Does anyone have a similar problem like this when using Redshift? Any help/pointer will be greatly appreciated, thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
@everglory99 I face the same issue with temp tables using snowflake. |
Hi All. The current architecture for Superset creates a new connection to analytical databases for each query executed. Thus temp tables can only be used when they are created during the same query execution as the subsequent operation that references them. I hope this helps you work around the issue. We're currently investigating connection pooling for analytical databases, which would be one step closer to providing persistent sessions. |
Most databases support some type of cross-session temporary table: in SQL Server |
Make sure these boxes are checked before submitting your issue - thank you!
Superset version=0.19.1
Expected results=create temp table should work
Actual results=create temp table gives "The query returned no data" with no error on console. But table is not created in db.
Steps to reproduce
Use redshift db
create temp table temp_table(col1 int);
no table created in DB
The text was updated successfully, but these errors were encountered: