@@ -56,19 +56,19 @@ def start_query_execution(
56
56
57
57
Parameters
58
58
----------
59
- sql : str
59
+ sql
60
60
SQL query.
61
- database : str, optional
61
+ database
62
62
AWS Glue/Athena database name.
63
- s3_output : str, optional
63
+ s3_output
64
64
AWS S3 path.
65
- workgroup : str
65
+ workgroup
66
66
Athena workgroup. Primary by default.
67
- encryption : str, optional
67
+ encryption
68
68
None, 'SSE_S3', 'SSE_KMS', 'CSE_KMS'.
69
- kms_key : str, optional
69
+ kms_key
70
70
For SSE-KMS and CSE-KMS , this is the KMS key ARN or ID.
71
- params: Dict[str, any] | List[str], optional
71
+ params
72
72
Parameters that will be used for constructing the SQL query.
73
73
Only named or question mark parameters are supported.
74
74
The parameter style needs to be specified in the ``paramstyle`` parameter.
@@ -81,39 +81,38 @@ def start_query_execution(
81
81
For ``paramstyle="qmark"``, this value needs to be a list of strings.
82
82
The formatter will be applied server-side.
83
83
The values are applied sequentially to the parameters in the query in the order in which the parameters occur.
84
- paramstyle: str, optional
84
+ paramstyle
85
85
Determines the style of ``params``.
86
86
Possible values are:
87
87
88
88
- ``named``
89
89
- ``qmark``
90
- boto3_session : boto3.Session(), optional
91
- Boto3 Session. The default boto3 session will be used if boto3_session receive None.
92
- client_request_token : str, optional
90
+ boto3_session
91
+ The default boto3 session will be used if ** boto3_session** receive `` None`` .
92
+ client_request_token
93
93
A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once).
94
94
If another StartQueryExecution request is received, the same response is returned and another query is not created.
95
95
If a parameter has changed, for example, the QueryString , an error is returned.
96
96
If you pass the same client_request_token value with different parameters the query fails with error
97
97
message "Idempotent parameters do not match". Use this only with ctas_approach=False and unload_approach=False
98
98
and disabled cache.
99
- athena_cache_settings: typing.AthenaCacheSettings, optional
99
+ athena_cache_settings
100
100
Parameters of the Athena cache settings such as max_cache_seconds, max_cache_query_inspections,
101
101
max_remote_cache_entries, and max_local_cache_entries.
102
102
AthenaCacheSettings is a `TypedDict`, meaning the passed parameter can be instantiated either as an
103
103
instance of AthenaCacheSettings or as a regular Python dict.
104
104
If cached results are valid, awswrangler ignores the `ctas_approach`, `s3_output`, `encryption`, `kms_key`,
105
105
`keep_files` and `ctas_temp_table_name` params.
106
106
If reading cached data fails for any reason, execution falls back to the usual query run path.
107
- athena_query_wait_polling_delay: float, default: 1.0 seconds
107
+ athena_query_wait_polling_delay
108
108
Interval in seconds for how often the function will check if the Athena query has completed.
109
- data_source : str, optional
109
+ data_source
110
110
Data Source / Catalog name. If None, 'AwsDataCatalog' will be used by default.
111
- wait : bool, default False
111
+ wait
112
112
Indicates whether to wait for the query to finish and return a dictionary with the query execution response.
113
113
114
114
Returns
115
115
-------
116
- Union[str, Dict[str, Any]]
117
116
Query execution ID if `wait` is set to `False`, dictionary with the get_query_execution response otherwise.
118
117
119
118
Examples
@@ -177,15 +176,10 @@ def stop_query_execution(query_execution_id: str, boto3_session: boto3.Session |
177
176
178
177
Parameters
179
178
----------
180
- query_execution_id : str
179
+ query_execution_id
181
180
Athena query execution ID.
182
- boto3_session : boto3.Session(), optional
183
- Boto3 Session. The default boto3 session will be used if boto3_session receive None.
184
-
185
- Returns
186
- -------
187
- None
188
- None.
181
+ boto3_session
182
+ The default boto3 session will be used if **boto3_session** receive ``None``.
189
183
190
184
Examples
191
185
--------
@@ -207,16 +201,15 @@ def wait_query(
207
201
208
202
Parameters
209
203
----------
210
- query_execution_id : str
204
+ query_execution_id
211
205
Athena query execution ID.
212
- boto3_session : boto3.Session(), optional
213
- Boto3 Session. The default boto3 session will be used if boto3_session receive None.
214
- athena_query_wait_polling_delay: float, default: 1.0 seconds
206
+ boto3_session
207
+ The default boto3 session will be used if ** boto3_session** receive `` None`` .
208
+ athena_query_wait_polling_delay
215
209
Interval in seconds for how often the function will check if the Athena query has completed.
216
210
217
211
Returns
218
212
-------
219
- Dict[str, Any]
220
213
Dictionary with the get_query_execution response.
221
214
222
215
Examples
@@ -247,14 +240,13 @@ def get_query_execution(query_execution_id: str, boto3_session: boto3.Session |
247
240
248
241
Parameters
249
242
----------
250
- query_execution_id : str
243
+ query_execution_id
251
244
Athena query execution ID.
252
- boto3_session : boto3.Session(), optional
253
- Boto3 Session. The default boto3 session will be used if boto3_session receive None.
245
+ boto3_session
246
+ The default boto3 session will be used if ** boto3_session** receive `` None`` .
254
247
255
248
Returns
256
249
-------
257
- Dict[str, Any]
258
250
Dictionary with the get_query_execution response.
259
251
260
252
Examples
0 commit comments