Skip to content
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

the "type" field in the "table_columns" table was too short #13690

Closed
bm8836900 opened this issue Mar 18, 2021 · 4 comments
Closed

the "type" field in the "table_columns" table was too short #13690

bm8836900 opened this issue Mar 18, 2021 · 4 comments
Labels
inactive Inactive for >= 30 days need:more-info Requires more information from author

Comments

@bm8836900
Copy link

bm8836900 commented Mar 18, 2021

There is an enum in my table. When creating a data set, the creation failed because the "type" field in the "table_columns" table was too short

DataBase:mysql 5.7.33

Superset Error Message:(MySQLdb._exceptions.DataError) (1406, "Data too long for column 'type' at row 1")
[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 (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (b'#\xe8J\xd1\xa9\xeaOg\xaaI\x12\x1c\x7fR\xfd\x82', datetime.datetime(2021, 3, 18, 17, 30, 17, 894672), datetime.datetime(2021, 3, 18, 17, 30, 17, 894672), 'Continent', None, 1, "ENUM('ASIA','EUROPE','NORTH AMERICA','AFRICA','OCEANIA','ANTARCTICA','SOUTH AMERICA')", 1, 1, None, 6, 0, None, None, 1, 1)]

Superset Source Code:
image

@bm8836900 bm8836900 added the #bug Bug report label Mar 18, 2021
@junlincc junlincc added need:more-info Requires more information from author and removed #bug Bug report labels Mar 18, 2021
@bm8836900
Copy link
Author

superset version:1.0.1
mysql databse:test
mysql table name:country
在mysql自带测试库test中的country表中,有一个字段“Continent”是用enum类型创建的。在superset创建数据集时,superset会将源表的表结构保存在“table”表中。其中“type”字段是将源表字段数据类型以字符串的形式保存的。所以在遇到较长字符串时,因为“type”字段长度的限制,导致无法保存源表数据结构,导致superset创建数据集失败。例如:
field name:Continent
field data type:ENUM('ASIA','EUROPE','NORTH AMERICA','AFRICA','OCEANIA','ANTARCTICA','SOUTH AMERICA')

@ganczarek
Copy link
Contributor

#13572 is the same issue.

@stale
Copy link

stale bot commented Apr 17, 2022

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 .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 17, 2022
@rusackas
Copy link
Member

rusackas commented Feb 2, 2023

Closed by #17360

@rusackas rusackas closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Inactive for >= 30 days need:more-info Requires more information from author
Projects
None yet
Development

No branches or pull requests

4 participants