ksh24865 commented on PR #48547: URL: https://github.com/apache/airflow/pull/48547#issuecomment-2769426483
@ashb Thank you very much for your feedback. :) I'm already aware of the ON CONFLICT DO UPDATE and ON DUPLICATE KEY UPDATE syntax supported by PostgreSQL, MySQL, and SQLite. However, since SQLAlchemy ORM does not offer a DB-agnostic way to express upserts using these features, I believe the current approach—checking whether the variable exists and then choosing between update or add—is the most universal and reliable solution at the ORM level. In summary, while your suggestion to leverage a DB-level upsert is certainly valid, given the lack of a DB-agnostic upsert mechanism in SQLAlchemy ORM, I believe the current implementation is the most appropriate choice. -- 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]
