You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add merge statement
* ideas taken from snowflake-sqlalchemy
* Fix Merge statement so a table, select or subquery may be used as source
* Fix get_table_names, get_view_names for server update
* Quote target table
* Quote field name in update
Copy file name to clipboardExpand all lines: README.rst
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,3 +40,32 @@ Compatibility
40
40
41
41
- If databend version >= v0.9.0 or later, you need to use databend-sqlalchemy version >= v0.1.0.
42
42
- The databend-sqlalchemy use [databend-py](https://github.com/datafuselabs/databend-py) as internal driver when version < v0.4.0, but when version >= v0.4.0 it use [databend driver python binding](https://github.com/datafuselabs/bendsql/blob/main/bindings/python/README.md) as internal driver. The only difference between the two is that the connection parameters provided in the DSN are different. When using the corresponding version, you should refer to the connection parameters provided by the corresponding Driver.
43
+
44
+
45
+
Merge Command Support
46
+
---------------------
47
+
48
+
Databend SQLAlchemy supports upserts via its `Merge` custom expression.
49
+
See [Merge](https://docs.databend.com/sql/sql-commands/dml/dml-merge) for full documentation.
50
+
51
+
The Merge command can be used as below::
52
+
53
+
from sqlalchemy.orm import sessionmaker
54
+
from sqlalchemy import MetaData, create_engine
55
+
from databend_sqlalchemy.databend_dialect import Merge
0 commit comments