You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/10/08 13:26:35 UTC

[GitHub] [incubator-superset] sivasakthipt opened a new issue #11202: BUG: Unable to select column with byte datatype

sivasakthipt opened a new issue #11202:
URL: https://github.com/apache/incubator-superset/issues/11202


   I am using python 3.6.9 to install Apache Superset and elasticsearch version 7.9.1. I have created doc with type as byte but I couldn't query the value in SQL LAB in a superset, getting the following error while querying,
   
   ### Expected results
   Select * from sample;
   ```
   age    email                   name
   10     admin@superset.com      6
   ```
   
   what you expected to happen.
   It should return the value
   
   ### Actual results
   elasticsearch error: 'byte'
   
   what actually happens.
   Showing Error: elasticsearch error: 'byte'
   
   #### Screenshots
   ![screenshot-ec2-15-207-37-206 ap-south-1 compute amazonaws com_8080-2020 10 08-12_42_12 (1)](https://user-images.githubusercontent.com/52786918/95464689-def14e80-0997-11eb-9001-4049c6dacaee.png)
   
   If applicable, add screenshots to help explain your problem.
   
   #### How to reproduce the bug
   
   Create index from Kibana,
   ```
   PUT /sample
   {
     "mappings": {
       "properties": {
         "age":    { "type": "integer" },  
         "email":  { "type": "keyword"  }, 
         "name":   { "type": "keyword"  }     
       }
     }
   }
   
   PUT sample/_doc/1
   {
     "age": "10",
     "email": "admin@superset.com",
     "name": "admin"
   }
   ```
   
   1. Go to 'Superset SQL Lab'
   2. Click on 'SQL Editor'
   3. Select Database
   4. Select Schema
   5. Select table (index: sample)
   6. See an error
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `Superset 0.37.2 `
   - python version: `Python 3.6.9`
   
   
   CC: @dpgaspar 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] sivasakthipt commented on issue #11202: BUG: Unable to select column with byte datatype

Posted by GitBox <gi...@apache.org>.
sivasakthipt commented on issue #11202:
URL: https://github.com/apache/incubator-superset/issues/11202#issuecomment-705953779


   I am getting the following error in superset while selecting the sample schema,
   
   ```
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:9200
   INFO:werkzeug:223.228.146.132 - - [09/Oct/2020 03:53:13] "GET /superset/extra_table_metadata/1/sample/default/ HTTP/1.1" 200 -
   DEBUG:urllib3.connectionpool:http://localhost:9200 "POST /sample/_search?size=1 HTTP/1.1" 200 277
   INFO:elasticsearch:POST http://localhost:9200/sample/_search?size=1 [status:200 request:0.006s]
   DEBUG:elasticsearch:> None
   DEBUG:elasticsearch:< {"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":1,"relation":"eq"},"max_score":1.0,"hits":[{"_index":"sample","_type":"_doc","_id":"1","_score":1.0,"_source":{"name":6,"age":"10","email":"admin@superset.com"}}]}}
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:9200
   DEBUG:urllib3.connectionpool:http://localhost:9200 "POST /_sql/ HTTP/1.1" 200 210
   INFO:elasticsearch:POST http://localhost:9200/_sql/ [status:200 request:0.004s]
   DEBUG:elasticsearch:> {"query":"SHOW COLUMNS FROM \"sample\""}
   DEBUG:elasticsearch:< {"columns":[{"name":"column","type":"keyword"},{"name":"type","type":"keyword"},{"name":"mapping","type":"keyword"}],"rows":[["age","INTEGER","integer"],["email","VARCHAR","keyword"],["name","TINYINT","byte"]]}
   WARNING:es.basesqlalchemy:Unknown type found byte reverting to string
   INFO:werkzeug:223.228.146.132 - - [09/Oct/2020 03:53:13] "GET /api/v1/database/1/table/sample/default/ HTTP/1.1" 200 -
   Triggering query_id: 31
   INFO:superset.views.core:Triggering query_id: 31
   timeout can't be used in the current context
   WARNING:superset.utils.core:timeout can't be used in the current context
   signal only works in main thread
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/utils/core.py", line 624, in __enter__
       signal.signal(signal.SIGALRM, self.handle_timeout)
     File "/usr/lib64/python3.6/signal.py", line 47, in signal
       handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
   ValueError: signal only works in main thread
   ERROR:superset.utils.core:signal only works in main thread
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/utils/core.py", line 624, in __enter__
       signal.signal(signal.SIGALRM, self.handle_timeout)
     File "/usr/lib64/python3.6/signal.py", line 47, in signal
       handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
   ValueError: signal only works in main thread
   SQLite Database support for metadata databases will be removed             in a future version of Superset.
   WARNING:superset.sql_lab:SQLite Database support for metadata databases will be removed             in a future version of Superset.
   Query 31: Executing 1 statement(s)
   INFO:superset.sql_lab:Query 31: Executing 1 statement(s)
   Query 31: Set query to 'running'
   INFO:superset.sql_lab:Query 31: Set query to 'running'
   Query 31: Running statement 1 out of 1
   INFO:superset.sql_lab:Query 31: Running statement 1 out of 1
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:9200
   DEBUG:urllib3.connectionpool:http://localhost:9200 "POST /_sql/ HTTP/1.1" 200 146
   INFO:elasticsearch:POST http://localhost:9200/_sql/ [status:200 request:0.011s]
   DEBUG:elasticsearch:> {"query":"SELECT age,\n       email,\n       name\nFROM sample\nLIMIT 100"}
   DEBUG:elasticsearch:< {"columns":[{"name":"age","type":"integer"},{"name":"email","type":"keyword"},{"name":"name","type":"byte"}],"rows":[[10,"admin@superset.com",6]]}
   Query 31: <class 'KeyError'>
   ERROR:superset.sql_lab:Query 31: <class 'KeyError'>
   INFO:werkzeug:223.228.146.132 - - [09/Oct/2020 03:53:13] "POST /superset/sql_json/ HTTP/1.1" 500 -
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #11202: BUG: Unable to select column with byte datatype

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #11202:
URL: https://github.com/apache/incubator-superset/issues/11202#issuecomment-705566953


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.81. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] mistercrunch commented on issue #11202: BUG: Unable to select column with byte datatype

Posted by GitBox <gi...@apache.org>.
mistercrunch commented on issue #11202:
URL: https://github.com/apache/incubator-superset/issues/11202#issuecomment-705939499


   Superset server logs would help here. Those kinds of error are hard to debug if you dont have an ES cluster laying around...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] mistercrunch commented on issue #11202: BUG: Unable to select column with byte datatype

Posted by GitBox <gi...@apache.org>.
mistercrunch commented on issue #11202:
URL: https://github.com/apache/incubator-superset/issues/11202#issuecomment-705939499


   Superset server logs would help here. Those kinds of error are hard to debug if you dont have an ES cluster laying around...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] sivasakthipt commented on issue #11202: BUG: Unable to select column with byte datatype

Posted by GitBox <gi...@apache.org>.
sivasakthipt commented on issue #11202:
URL: https://github.com/apache/incubator-superset/issues/11202#issuecomment-705953779


   I am getting the following error in superset while selecting the sample schema,
   
   ```
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:9200
   INFO:werkzeug:223.228.146.132 - - [09/Oct/2020 03:53:13] "GET /superset/extra_table_metadata/1/sample/default/ HTTP/1.1" 200 -
   DEBUG:urllib3.connectionpool:http://localhost:9200 "POST /sample/_search?size=1 HTTP/1.1" 200 277
   INFO:elasticsearch:POST http://localhost:9200/sample/_search?size=1 [status:200 request:0.006s]
   DEBUG:elasticsearch:> None
   DEBUG:elasticsearch:< {"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":1,"relation":"eq"},"max_score":1.0,"hits":[{"_index":"sample","_type":"_doc","_id":"1","_score":1.0,"_source":{"name":6,"age":"10","email":"admin@superset.com"}}]}}
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:9200
   DEBUG:urllib3.connectionpool:http://localhost:9200 "POST /_sql/ HTTP/1.1" 200 210
   INFO:elasticsearch:POST http://localhost:9200/_sql/ [status:200 request:0.004s]
   DEBUG:elasticsearch:> {"query":"SHOW COLUMNS FROM \"sample\""}
   DEBUG:elasticsearch:< {"columns":[{"name":"column","type":"keyword"},{"name":"type","type":"keyword"},{"name":"mapping","type":"keyword"}],"rows":[["age","INTEGER","integer"],["email","VARCHAR","keyword"],["name","TINYINT","byte"]]}
   WARNING:es.basesqlalchemy:Unknown type found byte reverting to string
   INFO:werkzeug:223.228.146.132 - - [09/Oct/2020 03:53:13] "GET /api/v1/database/1/table/sample/default/ HTTP/1.1" 200 -
   Triggering query_id: 31
   INFO:superset.views.core:Triggering query_id: 31
   timeout can't be used in the current context
   WARNING:superset.utils.core:timeout can't be used in the current context
   signal only works in main thread
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/utils/core.py", line 624, in __enter__
       signal.signal(signal.SIGALRM, self.handle_timeout)
     File "/usr/lib64/python3.6/signal.py", line 47, in signal
       handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
   ValueError: signal only works in main thread
   ERROR:superset.utils.core:signal only works in main thread
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/utils/core.py", line 624, in __enter__
       signal.signal(signal.SIGALRM, self.handle_timeout)
     File "/usr/lib64/python3.6/signal.py", line 47, in signal
       handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
   ValueError: signal only works in main thread
   SQLite Database support for metadata databases will be removed             in a future version of Superset.
   WARNING:superset.sql_lab:SQLite Database support for metadata databases will be removed             in a future version of Superset.
   Query 31: Executing 1 statement(s)
   INFO:superset.sql_lab:Query 31: Executing 1 statement(s)
   Query 31: Set query to 'running'
   INFO:superset.sql_lab:Query 31: Set query to 'running'
   Query 31: Running statement 1 out of 1
   INFO:superset.sql_lab:Query 31: Running statement 1 out of 1
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:9200
   DEBUG:urllib3.connectionpool:http://localhost:9200 "POST /_sql/ HTTP/1.1" 200 146
   INFO:elasticsearch:POST http://localhost:9200/_sql/ [status:200 request:0.011s]
   DEBUG:elasticsearch:> {"query":"SELECT age,\n       email,\n       name\nFROM sample\nLIMIT 100"}
   DEBUG:elasticsearch:< {"columns":[{"name":"age","type":"integer"},{"name":"email","type":"keyword"},{"name":"name","type":"byte"}],"rows":[[10,"admin@superset.com",6]]}
   Query 31: <class 'KeyError'>
   ERROR:superset.sql_lab:Query 31: <class 'KeyError'>
   INFO:werkzeug:223.228.146.132 - - [09/Oct/2020 03:53:13] "POST /superset/sql_json/ HTTP/1.1" 500 -
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #11202: BUG: Unable to select column with byte datatype

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #11202:
URL: https://github.com/apache/incubator-superset/issues/11202#issuecomment-705566953


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.81. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org