luozihen commented on issue #11878:
URL: https://github.com/apache/seatunnel/issues/11878#issuecomment-5342713876
@DanielLeens Thanks for your recognition—I appreciate that. Your suggestion
is very helpful, and I agree that directly overloading the semantics of
primary_keys was indeed ill-considered.
I think introducing a separate configuration option for table‑level primary
key mapping is a feasible approach. I can adapt my use case to this design, and
I’d be happy to give it a try if that’s okay.
My initial thoughts are:
Add a new config option – tentatively named multi-table_config. The
structure would be:
"multi-table_config": {
"primary_keys": {
"table_name_1": "id",
"table_name_2": "id_txn_ctrl"
}
}
This keeps the mapping explicit and also leaves room under the same
multi-table_config object for other multi‑table related settings in the future.
Precedence logic – when multi-table_config.primary_keys is present, the
primary key for each table should be taken from this new option first.
Otherwise, fall back to the existing primary_keys logic as before.
I’m open to any better ideas or suggestions from the community.
Additionally, regarding the mixed usage of placeholders and concrete field
names mentioned in #11273: without forcibly changing the semantics of the
existing primary_keys option, do you have any good recommendations on how to
handle that? I'd love to hear your thoughts.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]