You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "022706231111 (via GitHub)" <gi...@apache.org> on 2026/04/09 06:09:58 UTC
[I] schema_save_mode [seatunnel]
022706231111 opened a new issue, #10736:
URL: https://github.com/apache/seatunnel/issues/10736
When using SeaTunnel 2.1.13 for data migration from MySQL to MySQL, the tables automatically created in the target database are missing a lot of information compared with the source database tables, such as table comments, column comments, and indexes other than the primary key index. I am not sure if this is normal. If I want the automatically generated tables in the target database to be more complete, what should I do?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "022706231111 (via GitHub)" <gi...@apache.org>.
022706231111 commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4219094430
1.Yes, I made a typo; it’s version 2.3.13
2.[test.txt](https://github.com/user-attachments/files/26617564/test.txt)
3.Keep the default behavior
4.I hadn’t added this parameter before. After I added it for testing today, there was no noticeable difference in the results
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #10736: [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation
URL: https://github.com/apache/seatunnel/issues/10736
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4220824233
Thanks for taking the time to retest this with `table_path` — that extra verification is very helpful.
Yes, from the current code path, what you are seeing now is much closer to the existing MySQL catalog auto-create issue than to the earlier `query`-only metadata limitation. Once `table_path` is present, SeaTunnel can already carry most source metadata forward. The remaining gap is very likely the MySQL-side metadata path that PR #10738 is fixing on `dev`, especially table comment / ENGINE / CHARSET / COLLATE and related DDL details.
So the picture is much clearer now:
1. `query`-only source path: metadata-source limitation
2. `table_path` / catalog path: real bug, current fix track is PR #10738
Since `#10738` is still open, it is expected that `2.3.13` can still show this gap today.
If you have a moment, please also list which exact fields are still missing after adding `table_path` (for example: table comment, ENGINE, CHARSET/COLLATE, or a specific secondary index type). That will help us confirm whether your remaining case is fully covered by #10738 or whether we need a follow-up.
Thanks again for continuing the thread. This retest narrowed the issue a lot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4219671327
Thanks for the follow-up and for sharing the config.
I checked both the current JDBC metadata path and the linked dev PR #10738.
There are actually two different cases here:
1. If the source side is built from a real table path, or from `table_path + query`, SeaTunnel can load the source `CatalogTable` and try to carry comments / indexes / table options forward.
2. If the source side is only a plain `query`, SeaTunnel only gets `ResultSetMetaData` for the projected columns. In that path, table comment / ENGINE / CHARSET / COLLATE / secondary index metadata are not available from the query result itself, so they cannot be preserved automatically.
The `test.txt` you attached currently shows query-based JDBC config and does not show `table_path` or `schema_save_mode`, so that file alone does not hit the full metadata-preservation path.
Separately, there is also a real MySQL-side gap on current `dev`: the auto-create DDL builder still drops some MySQL table metadata, and PR #10738 is already addressing that path.
So the most likely next step is:
1. please confirm whether your real job uses `table_path` on the source side and `schema_save_mode = CREATE_SCHEMA_WHEN_NOT_EXIST` on the sink side
2. if yes, PR #10738 looks like the right fix track for this issue
3. if your job is intentionally query-only, then missing comments / non-PK indexes are currently closer to a metadata-source limitation than a pure sink bug
If you can share the actual source/sink config that creates the target table, we can confirm which branch your case belongs to. Thanks again for continuing the thread.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "022706231111 (via GitHub)" <gi...@apache.org>.
022706231111 commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4221279772
The missing information observed so far is as follows: 1. Character set and collation rules; 2. Row format.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "022706231111 (via GitHub)" <gi...@apache.org>.
022706231111 commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4222272504
Alright, thank you again for your patient guidance in resolving the issue. I look forward to a more proper solution to this problem moving forward.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "022706231111 (via GitHub)" <gi...@apache.org>.
022706231111 commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4219863657
Thank you very much for your careful reply. I have understood what you mean. After adding table_path to the source configuration and testing again, most of the information is included in the automatically created table. However, from my observation, some information is still missing, as shown in the figure below:
<img width="545" height="410" alt="Image" src="https://github.com/user-attachments/assets/ef6be094-054a-4bd5-881a-4f116ef2eb4f" />
<img width="549" height="423" alt="Image" src="https://github.com/user-attachments/assets/1025376b-1fe9-46d7-b478-ee16ffced228" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4214308294
Thanks for raising this.
I checked the current MySQL/JDBC schema-creation path on `dev`. In the current code, table comments, column comments, and non-primary-key constraint keys are part of the `CatalogTable` / `TableSchema` model, and the MySQL create-table SQL builder can emit table comments plus non-primary indexes when `create_index = true`.
So this does not look like a general "MySQL sink can never preserve them" limitation in the current code base.
The missing piece is which exact path you are using. Could you please confirm:
1. the exact SeaTunnel version (the body says `2.1.13` — did you mean `2.3.13`?)
2. the source connector and sink connector you are using
3. whether the target table is created via `schema_save_mode`
4. whether `create_index` is left at its default value
If this is an older branch/version gap, the explanation may simply be that the newer schema path is not present there yet. If you are already on current 2.3.x / `dev` and the comments or secondary indexes are still missing, then this would be worth treating as a real bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4222250148
Thanks for taking the time to retest this and for narrowing the remaining gap down.
From the current `dev` path, the new details are useful and they change the diagnosis in a meaningful way:
1. `CHARSET` / `COLLATE` are very likely part of the metadata-preservation gap that PR #10738 is already addressing.
2. `ROW_FORMAT` looks different. In the current MySQL auto-create path, I do not see it modeled in the same builder path yet, so even after #10738 it may still need separate handling.
So at this point this still looks like a real issue, but it is no longer a broad “auto-create loses everything” case. It is now much closer to:
- one active `dev` fix for comments / indexes / ENGINE / CHARSET / COLLATE
- one possible remaining follow-up for `ROW_FORMAT`
I suggest we keep this issue open until the `dev` fix lands. After that, if you verify that `CHARSET` / `COLLATE` are fixed but `ROW_FORMAT` is still missing, we can either extend the same fix path or split that last part into a small follow-up issue.
Thanks again for the careful retest. This kind of narrowing is very helpful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Connector-V2][MySQL] Target tables missing comments and non-primary-key indexes in schema auto-creation [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10736:
URL: https://github.com/apache/seatunnel/issues/10736#issuecomment-4227769898
Thanks for the careful retest. At this point the issue is actually in a good state: after adding `table_path`, the remaining gap is now narrow and actionable.
I rechecked the current `dev` situation, and PR #10738 is still the active fix track for comment / index / ENGINE / CHARSET / COLLATE preservation. The only part that still looks potentially outside that PR is `ROW_FORMAT`.
So from my side, we do not need more reproduction details right now. The most useful next step is to keep this issue open until #10738 lands. After that, if you verify that `CHARSET` / `COLLATE` are fixed but `ROW_FORMAT` is still missing, we can either extend the same path or split a very small follow-up.
Thanks again for helping narrow this down so carefully. That made the issue much easier to move forward.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org