Failed to Save Log Parsing Results Due to Long Query
Symptom
During SQL task parsing, the query statement is long and the query field exceeds 64 KB, which exceeds the maximum storage length of the MySQL TEXT type. As a result, after the log parsing module successfully parses the query statement and saves the parsing results to the database, the following error information is displayed:
javax.persistence.PersistenceException: Error[Data truncation: Data too long for column 'query' at row 1]

Key Process and Cause Analysis
None
Conclusion and Solution
Manually change the type of the query field in the history_config table to LONGTEXT. Compared with the TEXT type, the LONGTEXT type can store a maximum of 4 GB text, which meets basic requirements.
- Access the database used by OmniAdvisor.
# Connect to the database. mysql -u username -p password # Access the database. use my_database;
- Change the type of the query field in the history_config table to LONGTEXT.
ALTER TABLE history_config MODIFY query LONGTEXT;
- Parse the logs of the task again.
Parent topic: Troubleshooting