New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for MERGE DDL #428
Comments
A MERGE statement is a DML statement that can combine INSERT, UPDATE, and DELETE operations into a single statement and perform the operations atomically. This commit introduces support for generating MERGE statements programmatically with SQLAlchemy. Refs: googleapis#428
Since the BiqQuery SQLalchemy dialect is based on the PostgreSQL dialect, would this implementation most likely follow the UPSERT syntax? https://docs.sqlalchemy.org/en/20/dialects/postgresql.html#insert-on-conflict-upsert |
NVM, I now see the failed merge request that would just use more native BQ MERGE syntax. |
For anyone else waiting on this support that does not mind using the failed merge code above, I just copied that code to a folder and added it to my sqlalchemy_bigquery module by importing the folder (module) with the following init.py code:
|
yea it's just for BQ— don't quote me but if BQ & PG's I am using the code in production, but ya I hadn't signed the CLA so it got dropped (my bad) |
Is your feature request related to a problem? Please describe.
Yes, programmatically generating MERGE statements.
Describe the solution you'd like
Adding support
MERGE
DDL operation in BigQuery.https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#merge_statement
Describe alternatives you've considered
Directly writing SQL code
Additional context
None
The text was updated successfully, but these errors were encountered: