WeBankFinTech / Qualitis

Qualitis is a one-stop data quality management platform that supports quality verification, notification, and management for various datasource. It is used to solve various data quality problems caused by data processing. https://github.com/WeBankFinTech/Qualitis
Apache License 2.0
710 stars 304 forks source link

Create rule failed #6

Closed MLikeWater closed 3 years ago

MLikeWater commented 4 years ago

Describe the bug

2019-12-10 05:10:03,888 INFO [Monitor Thread] monitor: Start to monitor application
2019-12-10 05:10:03,889 INFO [Monitor Thread] monitor: Trying to acquire lock of zk, lock_path: /qualitis/tmp/monitor, lock: 97826494
2019-12-10 05:10:03,898 INFO [Monitor Thread] monitor: Succeed to acquire lock of zk, lock_path: /qualitis/tmp/monitor, lock: 97826494
2019-12-10 05:10:03,906 INFO [Monitor Thread] monitor: Succeed to find applications that are not end. Application: []
2019-12-10 05:10:03,906 INFO [Monitor Thread] monitor: Finish to monitor application
2019-12-10 05:10:05,526 WARN [DefaultQuartzScheduler_Worker-1] spi.SqlExceptionHelper: SQL Error: 1406, SQLState: 22001
2019-12-10 05:10:05,528 ERROR [DefaultQuartzScheduler_Worker-1] spi.SqlExceptionHelper: Data truncation: Data too long for column 'column_type' at row 1
2019-12-10 05:10:05,544 ERROR [DefaultQuartzScheduler_Worker-1] core.JobRunShell: Job Meta data refresh job group.Meta data refresh job threw an unhandled Exception:

To Reproduce

在 “添加技术规则” 中配置库名和表名长度大于 50 个字符时,会无法创建规则。

The Root Reason

MariaDB [qualitis]> desc rule_variable;
+-----------------------------------+--------------+------+-----+---------+----------------+
| Field                             | Type         | Null | Key | Default | Extra          |
+-----------------------------------+--------------+------+-----+---------+----------------+
| id                                | bigint(20)   | NO   | PRI | NULL    | auto_increment |
| cluster_name                      | varchar(50)  | YES  |     | NULL    |                |
| db_name                           | varchar(50)  | YES  |     | NULL    |                |
| input_action_step                 | int(11)      | YES  |     | NULL    |                |
| origin_value                      | varchar(100) | YES  |     | NULL    |                |
| table_name                        | varchar(50)  | YES  |     | NULL    |                |
| value                             | varchar(500) | YES  |     | NULL    |                |
| rule_id                           | bigint(20)   | YES  | MUL | NULL    |                |
| template_mid_table_input_meta_id  | bigint(20)   | YES  | MUL | NULL    |                |
| template_statistics_input_meta_id | bigint(20)   | YES  | MUL | NULL    |                |
+-----------------------------------+--------------+------+-----+---------+----------------+

rule_variable 表里面设置了长度为50,可以根据实际情况,进行修改,再执行创建规则即可成功。

howeye commented 4 years ago

You are right! We will fix it soon. Thank you for using Qualitis.

Tangjiafeng commented 3 years ago

Increase field length.