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: awswrangler/athena/_spark.py
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,7 @@ def create_spark_session(
94
94
default_executor_dpu_size: int=1,
95
95
additional_configs: dict[str, Any] |None=None,
96
96
spark_properties: dict[str, Any] |None=None,
97
+
notebook_version: str='Athena notebook version 1',
97
98
idle_timeout: int=15,
98
99
boto3_session: boto3.Session|None=None,
99
100
) ->str:
@@ -116,6 +117,9 @@ def create_spark_session(
116
117
spark_properties: Dict[str, Any], optional
117
118
Contains SparkProperties in the form of key-value pairs.Specifies custom jar files and Spark properties
118
119
for use cases like cluster encryption, table formats, and general Spark tuning.
120
+
notebook_version: str
121
+
The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access.
122
+
The only valid notebook version is Athena notebook version 1. If you specify a value for NotebookVersion, you must also specify a value for NotebookId
119
123
idle_timeout : int, optional
120
124
The idle timeout in minutes for the session. The default is 15.
121
125
boto3_session : boto3.Session(), optional
@@ -146,6 +150,7 @@ def create_spark_session(
146
150
WorkGroup=workgroup,
147
151
EngineConfiguration=engine_configuration,
148
152
SessionIdleTimeoutInMinutes=idle_timeout,
153
+
NotebookVersion=notebook_version,
149
154
)
150
155
_logger.info("Session info:\n%s", response)
151
156
session_id: str=response["SessionId"]
@@ -166,6 +171,7 @@ def run_spark_calculation(
166
171
default_executor_dpu_size: int=1,
167
172
additional_configs: dict[str, Any] |None=None,
168
173
spark_properties: dict[str, Any] |None=None,
174
+
notebook_version: str='Athena notebook version 1',
169
175
idle_timeout: int=15,
170
176
boto3_session: boto3.Session|None=None,
171
177
) ->dict[str, Any]:
@@ -192,6 +198,9 @@ def run_spark_calculation(
192
198
spark_properties: Dict[str, Any], optional
193
199
Contains SparkProperties in the form of key-value pairs.Specifies custom jar files and Spark properties
194
200
for use cases like cluster encryption, table formats, and general Spark tuning.
201
+
notebook_version: str
202
+
The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access.
203
+
The only valid notebook version is Athena notebook version 1. If you specify a value for NotebookVersion, you must also specify a value for NotebookId
195
204
idle_timeout : int, optional
196
205
The idle timeout in minutes for the session. The default is 15.
0 commit comments