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/02 00:41:47 UTC

[GitHub] [incubator-superset] DRavikanth opened a new issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

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


   A clear and concise description of what the bug is.
   
   PrestoSQL Version - 341 
   SuperSet Version - 0.37.2
   
   I have a table in Presto that has 1250 columns. 118 of these columns are timestamp type. When I add this table under Sources -> Tables -> Add a new record, all these timestamps are being identified as UNKNOWN. However, when I manually edit each timestamp column and change UNKNOWN -> TIMESTAMP, it all works fine as expected. 
   
   I tried the same in master build docker image. Data -> Datasets -> Add a new record referencing the table in DB. All timestamp fields are being identified as UNKNOWN type.
   
   Adding the DB table in the below screen 
   <img width="1538" alt="image" src="https://user-images.githubusercontent.com/10642145/94876540-c966ac80-040c-11eb-9ffa-6afd2127190d.png">
   
   what you expected to happen.
   timestamp(3) which is the native timestamp of Presto should be identified as timestamp
   <img width="1162" alt="image" src="https://user-images.githubusercontent.com/10642145/94876578-e69b7b00-040c-11eb-8069-5e597bba05b1.png">
   
   what actually happens.
   
   #### Screenshots
   <img width="1178" alt="image" src="https://user-images.githubusercontent.com/10642145/94876559-d6839b80-040c-11eb-8b13-f16fc1068fee.png">
   
   
   If applicable, add screenshots to help explain your problem.
   
   #### How to reproduce the bug
   1. Have a Presto table defined with timestamp field in it.
   2. Add a presto connection in the database section.
   3. Go to Sources -> Tables -> Add a new record
   4. Click on edit record -> COLUMNS -> check the timestamp type you stored in DB.
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `0.37.2` 
   - python version: `3.6`
   Using docker image for 0.37.2 from https://hub.docker.com/layers/amancevice/superset/0.37.2/images/sha256-0036adb5d313cd8dd1263a843e501380162c57bf70c616913d1613c390a00950?context=explore
   
   ### Checklist
   
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [y] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [y] I have reproduced the issue with at least the latest released version of superset.
   - [y] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


----------------------------------------------------------------
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] DRavikanth edited a comment on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

Posted by GitBox <gi...@apache.org>.
DRavikanth edited a comment on issue #11138:
URL: https://github.com/apache/incubator-superset/issues/11138#issuecomment-702932115


   Will the changes from master be available in the next release? @villebro 


----------------------------------------------------------------
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] DRavikanth edited a comment on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

Posted by GitBox <gi...@apache.org>.
DRavikanth edited a comment on issue #11138:
URL: https://github.com/apache/incubator-superset/issues/11138#issuecomment-702932115


   Will the changes from master be available in the next release? @villebro. What's the target release for this?


----------------------------------------------------------------
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] villebro commented on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

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


   Yes, we're currently preparing `0.38.0` which will include this improvement.


----------------------------------------------------------------
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] villebro closed issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

Posted by GitBox <gi...@apache.org>.
villebro closed issue #11138:
URL: https://github.com/apache/incubator-superset/issues/11138


   


----------------------------------------------------------------
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 #11138: Presto Timestamp types are being identified as UNKNOWN datatype

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


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.92. 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] DRavikanth commented on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

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


   Will this be available in the next release? @villebro 


----------------------------------------------------------------
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] villebro commented on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

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


   @DRavikanth have you been able to test this with master branch? On Superset 0.37.2, timestamps were matched literally as  `timestamp`:
   
   https://github.com/apache/incubator-superset/blob/bbb8c87e627f49de42d4a4ebe55125bfe8fc9643/superset/models/sql_types/presto_sql_types.py#L112
   
   However, on master branch, they are now matched with a regular expression that should match `TIMESTAMP(3)`:
   
   https://github.com/apache/incubator-superset/blob/53cd05d74af0c5b07307b1c17c86e7c14d868d39/superset/db_engine_specs/presto.py#L356
   
   
   


----------------------------------------------------------------
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] DRavikanth edited a comment on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

Posted by GitBox <gi...@apache.org>.
DRavikanth edited a comment on issue #11138:
URL: https://github.com/apache/incubator-superset/issues/11138#issuecomment-702475356


   So, to whoever is running into this problem, the issue should have happened post-Presto 338 release where the timestamp is a parametric timestamp type (timestamp with different precision).  
   
   https://github.com/prestosql/presto/pull/4349
   
   This is what I did to resolve the problem. Updated my database connection and specific extra field with the following:
   ```
   {
     "metadata_params": {},
     "engine_params": {
       "connect_args": {
         "protocol": "https",
         "session_props": {
             "omit_datetime_type_precision": true
         }
       }
     },
     "metadata_cache_timeout": {},
     "schemas_allowed_for_csv_upload": []
   }
   ```
   
   Make a note of the  "omit_datetime_type_precision": true property. Refer: https://prestosql.io/docs/current/release/release-338.html
   
   This works fine now after I added the flag. I will leave it to Superset developers if they want to add a fix for it.


----------------------------------------------------------------
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] DRavikanth commented on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

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


   Sounds good. 


----------------------------------------------------------------
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] DRavikanth commented on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

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


   So, to whoever is running into this problem, the issue should have happened post-Presto 338 release where the timestamp is a parametric timestamp type (timestamp with different precision).  
   
   https://github.com/prestosql/presto/pull/4349
   
   This is what I did to resolve the problem. Updated my database connection and specific extra field with the following:
   {
     "metadata_params": {},
     "engine_params": {
       "connect_args": {
         "protocol": "https",
         "session_props": {
             "omit_datetime_type_precision": true
         }
       }
     },
     "metadata_cache_timeout": {},
     "schemas_allowed_for_csv_upload": []
   }
   
   Make a note of the  "omit_datetime_type_precision": true property. Refer: https://prestosql.io/docs/current/release/release-338.html
   
   This works fine now after I added the flag. I will leave it to Superset developers if they want to add a fix for it.


----------------------------------------------------------------
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] villebro commented on issue #11138: Presto Timestamp types are being identified as UNKNOWN datatype

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


   Closing for now, as this is assumed to be working on current master.


----------------------------------------------------------------
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