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: changelog.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@
6
6
7
7
-`sessions.get_or_create()` now supports passing additional configuration options for the Arrow Flight Client
8
8
9
-
10
9
## Bug fixes
11
10
12
11
- Fix reporting error based on http responses from the Aura-API with an invalid JSON body. Earlier the client would report JSONDecodeError instead of showing the actual issue.
@@ -17,6 +16,6 @@
17
16
18
17
-`GraphDataScience::run_query` now supports setting the `mode` of the query to be used for routing. Previously queries would always route the leader of the cluster, assuming write mode.
19
18
-`GraphDataScience::run_query` now support setting `retryable` to enable a retry-mechanism for appropriate errors. This requires `neo4j>=5.5.0`.
20
-
19
+
-`GDsSessions.get_or_create` now allows to specify the `aura_instance_id`. This is required if the instance id could not be derived from the provided database connection URI.
| db_connection | https://neo4j.com/docs/graph-data-science-client/{docs-version}/api/sessions/DbmsConnectionInfo[DbmsConnectionInfo] | yes | None | Bolt server URL, username, and password to a Neo4j DBMS. Required for the Attached and Self-managed types. Alternatively to username and password, you can provide a `neo4j.Auth` https://neo4j.com/docs/python-manual/current/connect-advanced/#authentication-methods[object].
111
112
| ttl | datetime.timedelta | yes | 1h | Time-to-live for the session.
112
113
| cloud_location | https://neo4j.com/docs/graph-data-science-client/{docs-version}/api/sessions/cloud_location[CloudLocation] | yes | None | Aura-supported cloud provider and region where the GDS Session will run. Required for the Self-managed and Standalone types.
114
+
| aura_instance_id | str | yes | None | Aura instance ID for the session. Required for the Attached type, if the id could not be derived from the DB connection.
113
115
| timeout | int | yes | None | Seconds to wait for the session to enter Ready state. If the time is exceeded, an error will be returned.
114
116
| neo4j_driver_options | dict[str, any] | yes | None | Additional options passed to the Neo4j driver to the Neo4j DBMS. Only relevant if `db_connection` is specified.
115
117
| arrow_client_options | dict[str, any] | yes | None | Additional options passed to the Arrow Flight Client used to connect to the Session.
raiseValueError("cloud_location must be provided for sessions against a self-managed DB.")
83
+
ifdb_connection.hosted_in_aura():
84
+
raiseValueError(
85
+
f"Could not derive Aura instance id from the URI `{db_connection.uri}`. Please provide the instance id via the `aura_instance_id` argument, or specify a cloud location if the DBMS is self-managed."
86
+
)
87
+
else:
88
+
raiseValueError("cloud_location must be provided for sessions against a self-managed DB.")
Retrieves an existing session with the given session name and database connection,
@@ -121,8 +122,9 @@ def get_or_create(
121
122
db_connection (Optional[DbmsConnectionInfo]): The database connection information.
122
123
ttl: (Optional[timedelta]): The sessions time to live after inactivity in seconds.
123
124
cloud_location (Optional[CloudLocation]): The cloud location. Required if the GDS session is for a self-managed database.
125
+
aura_instance_id (Optional[str]): The Aura instance id. Required if the database is in Aura but its instance id cannot be inferred from the connection information.
124
126
timeout (Optional[int]): Optional timeout (in seconds) when waiting for session to become ready. If unset the method will wait forever. If set and session does not become ready an exception will be raised. It is user responsibility to ensure resource gets cleaned up in this situation.
125
-
neo4j_driver_config (Optional[dict[str, Any]]): Optional configuration for the Neo4j driver to the Neo4j DBMS. Only relevant if `db_connection` is specified..
127
+
neo4j_driver_config (Optional[dict[str, Any]]): Optional configuration for the Neo4j driver to the Neo4j DBMS. Only relevant if `db_connection` is specified..
126
128
arrow_client_options (Optional[dict[str, Any]]): Optional configuration for the Arrow Flight client.
"Could not derive Aura instance id from the URI `neo4j+s://06cba79f.databases.neo4j.io`. Please provide the instance id via the `aura_instance_id` argument, or specify a cloud location if the DBMS is self-managed."
0 commit comments