xingyc15 opened a new issue #16278:
URL: https://github.com/apache/superset/issues/16278


   Not able to create new dataset with presto database, which is using pinot.
   
   ### Expected results
   
   There should be a new dataset being created with selected database.
   
   ### Actual results
   
   Come out with an error called `An error occurred while creating datasets: 
Dataset could not be created.`
   
   #### Screenshots
   
   
![image](https://user-images.githubusercontent.com/33602700/129618529-d6f7d54c-5426-45f8-8b96-a983fe1c3732.png)
   
   
![image](https://user-images.githubusercontent.com/33602700/129617887-29cfdcca-e614-4ff7-90ca-7fc926239492.png)
   
   
   ### Environment
   
   - superset version: `1.2.0`
   - presto database: pinot
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Here are the error logs in the backend of Superset:
   ```
   [SQL: INSERT INTO table_columns (uuid, created_on, changed_on, column_name, 
verbose_name, is_active, type, groupby, filterable, description, table_id, 
is_dttm, expression, python_date_format, created_by_fk, changed_by_fk) VALUES 
(%(uuid)s, %(created_on)s, %(changed_on)s,
   %(column_name)s, %(verbose_name)s, %(is_active)s, %(type)s, %(groupby)s, 
%(filterable)s, %(description)s, %(table_id)s, %(is_dttm)s, %(expression)s, 
%(python_date_format)s, %(created_by_fk)s, %(changed_by_fk)s) RETURNING 
table_columns.id]
   [parameters: {'uuid': UUID('a9020eaf-9338-4a0a-b561-0584bb2ad95e'), 
'created_on': datetime.datetime(2021, 8, 13, 22, 37, 52, 752147), 'changed_on': 
datetime.datetime(2021, 8, 13, 22, 37, 52, 752159), 'column_name': 
'create_time', 'verbose_name': None, 'is_active': True, '
   type': "<class 
'superset.models.sql_types.base.literal_dttm_type_factory.<locals>.TemporalWrapperType'>",
 'groupby': True, 'filterable': True, 'description': None, 'table_id': 48, 
'is_dttm': False, 'expression': None, 'python_date_format': None, 
'created_by_fk': 3, 'chang
   ed_by_fk': 3}]
   (Background on this error at: http://sqlalche.me/e/13/9h9h)
   Traceback (most recent call last):
     File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", 
line 1277, in _execute_context
       cursor, statement, parameters, context
     File 
"/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 
593, in do_execute
       cursor.execute(statement, parameters)
   psycopg2.errors.StringDataRightTruncation: value too long for type character 
varying(32)
   ```
   
   This could be caused by 
https://github.com/apache/superset/blame/9773aba522e957ed9423045ca153219638a85d2f/superset/migrations/versions/4e6a06bad7a8_init.py#L226
   
   The type `<class 
'superset.models.sql_types.base.literal_dttm_type_factory.<locals>.TemporalWrapperType'>`
 is logger than 32.
   
   Could you help solve this bug?


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to