[ERROR] Could not execute SQL statement. Reason: org.apache.flink.table.api.ValidationException: Column types of query result and sink for 'default_catalog.default_database.enriched_orders1' do not match. Cause: Incompatible types for sink column 'email' at position 4. Query schema: [order_id: INT NOT NULL, user_id: STRING, product_id: STRING, address_id: STRING, number: INT, oder_time: TIMESTAMP(6), order_status: STRING, user_name: STRING, gender: STRING, telephone: STRING, email: STRING, code: STRING, province: STRING, city: STRING, product_name: STRING, price: STRING, type: STRING, factory: STRING] Sink schema: [user_id: INT, user_name: STRING, gender: STRING, telephone: STRING, email: STRING, address_id: INT, code: STRING, province: STRING, city: STRING, product_id: INT, product_name: STRING, price: STRING, type: STRING, factory: STRING, order_id: INT, number: INT, order_time: TIMESTAMP(6), order_status: STRING]
时间: 2024-04-07 20:29:51 浏览: 217
这是一个错误信息,看起来是数据表的列类型不匹配导致的。具体来说,查询结果的列类型与目标表不一致,其中 'email' 列的类型不兼容。查询结果的列类型包括 [order_id: INT NOT NULL, user_id: STRING, product_id: STRING, address_id: STRING, number: INT, oder_time: TIMESTAMP(6), order_status: STRING, user_name: STRING, gender: STRING, telephone: STRING, email: STRING, code: STRING, province: STRING, city: STRING, product_name: STRING, price: STRING, type: STRING, factory: STRING],而目标表的列类型包括[user_id: INT, user_name: STRING, gender: STRING, telephone: STRING, email: STRING, address_id: INT, code: STRING, province: STRING, city: STRING, product_id: INT, product_name: STRING, price: STRING, type: STRING, factory: STRING, order_id: INT, number: INT, order_time: TIMESTAMP(6), order_status: STRING]。需要确认这两个表的列类型是否一致,并作出相应的调整。
阅读全文