WrenAI icon indicating copy to clipboard operation
WrenAI copied to clipboard

The name of the data table imported into MYSQL is incorrect.

Open leap233 opened this issue 7 months ago • 2 comments

When I connect to an existing MySQL database, the data tables are imported with the database name automatically added as a prefix to each table, resulting in errors in the generated SQL. For example:

This is my original table name Image

This is the table name generated automatically by MySQL Image

Here is an example of my issue:

Top 10 retrieved data tables Image

Generated SQL statements

SELECT "g"."age_rating" AS "age_rating", "g"."app_size" AS "app_size", "g"."categories" AS "categories", "g"."game_tag" AS "game_tag", "g"."game_type" AS "game_type", "g"."rating" AS "rating", "g"."review_count" AS "review_count", "g"."release_date" AS "release_date", "g"."last_updated" AS "last_updated", "g"."region" AS "region", "g"."description" AS "description", "g"."last_description" AS "last_description", "g"."developer" AS "developer", "g"."download_url" AS "download_url", "g"."screenshot_urls" AS "screenshot_urls", "g"."version" AS "version", "g"."status" AS "status", "g"."min_os_version" AS "min_os_version" FROM "jeecg_boot_game_info" AS "g" WHERE LOWER("g"."name_zh") = LOWER('金铲铲之战')

It can be observed that the table name in the query has changed to jeecg_boot_game_info, instead of the original game_info.

This issue will cause all generated SQL to be incorrect!

I am using the latest version, please guide me on how to resolve this issue, thank you!

leap233 avatar May 15 '25 03:05 leap233

@leap233 could you share ibis and ai service container logs? thank you

cyyeh avatar May 15 '25 03:05 cyyeh

@leap233 could you share ibis and ai service container logs? thank you

wrenai-wren-ai-service.log ibis.log

Is this the one?

leap233 avatar May 15 '25 04:05 leap233