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
Copy file name to clipboardExpand all lines: README.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,42 @@ engine = create_engine(
46
46
)
47
47
```
48
48
49
+
### Connection URL parameters and `connect_args`
50
+
51
+
The Databricks SQLAlchemy dialect accepts dialect-specific options in the
52
+
SQLAlchemy connection URL query string:
53
+
54
+
| Parameter | Required | Default | Description |
55
+
|-|-|-|-|
56
+
|`http_path`| Yes || HTTP path for the Databricks SQL warehouse or compute resource. |
57
+
|`catalog`| Yes || Initial catalog for the connection. |
58
+
|`schema`| Yes || Initial schema for the connection. |
59
+
|`enable_multirow_insert_casts`| No |`true`| Enables targeted casts for mixed scalar values in SQLAlchemy-generated multi-row `INSERT ... VALUES` statements. This avoids Spark inline-table type errors for pandas `to_sql(method="multi")` with mixed scalar/object columns. Set to `false` to disable this rewrite. |
60
+
61
+
For example, to disable targeted multi-row insert casts:
connect_args={"user_agent_entry": "My SQLAlchemy App"},
79
+
)
80
+
```
81
+
82
+
Dialect URL parameters control SQLAlchemy compilation behavior and are not
83
+
forwarded to the DBAPI connector.
84
+
49
85
## Types
50
86
51
87
The [SQLAlchemy type hierarchy](https://docs.sqlalchemy.org/en/20/core/type_basics.html) contains backend-agnostic type implementations (represented in CamelCase) and backend-specific types (represented in UPPERCASE). The majority of SQLAlchemy's [CamelCase](https://docs.sqlalchemy.org/en/20/core/type_basics.html#the-camelcase-datatypes) types are supported. This means that a SQLAlchemy application using these types should "just work" with Databricks.
0 commit comments