You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by gi...@git.apache.org on 2017/10/15 23:34:30 UTC

[GitHub] everglory99 commented on issue #3524: Cannot created temp table in redshift DB

everglory99 commented on issue #3524: Cannot created temp table in redshift DB
URL: https://github.com/apache/incubator-superset/issues/3524#issuecomment-336750250
 
 
   I also observed this issue. After looking deeper into the problem, I realized that the problem is not that the ```temp table``` can't be created in SQL lab and actually the message ```The query returned no data``` is normal. However the real problem is that the created temp table can't be used in the successive queries. For example if I run the following query blocks in SQL lab
   ```SQL
   -- 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 ```dummy``` does't exist. From Redshift temp table [documentation](http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_NEW.html):
   > ...creates a temporary table that is visible only within the current session. The table is automatically dropped at the end of the session in which it is created
   
   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! 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services