|
4 | 4 | import pprint |
5 | 5 | import time |
6 | 6 | import warnings |
7 | | -from datetime import datetime |
8 | 7 | from decimal import Decimal |
9 | 8 | from typing import Any, Dict, List, NamedTuple, Optional, Union |
10 | 9 |
|
|
22 | 21 |
|
23 | 22 | class _QueryMetadata(NamedTuple): |
24 | 23 | execution_id: str |
25 | | - query: str |
26 | | - statement_type: str |
27 | | - encryption_configuration: Optional[Dict[str, str]] |
28 | | - query_execution_context: Optional[Dict[str, str]] |
29 | | - athena_submission_datetime: datetime |
30 | | - athena_completion_datetime: datetime |
31 | | - athena_statistics: Dict[str, Union[int, str]] |
32 | | - workgroup: str |
33 | 24 | dtype: Dict[str, str] |
34 | 25 | parse_timestamps: List[str] |
35 | 26 | parse_dates: List[str] |
@@ -214,30 +205,14 @@ def _get_query_metadata( # pylint: disable=too-many-statements |
214 | 205 | dtype[col_name] = pandas_type |
215 | 206 |
|
216 | 207 | output_location: Optional[str] = None |
217 | | - encryption_configuration: Optional[Dict[str, str]] = {} |
218 | 208 | if "ResultConfiguration" in _query_execution_payload: |
219 | 209 | output_location = _query_execution_payload["ResultConfiguration"].get("OutputLocation") |
220 | | - encryption_configuration = _query_execution_payload["ResultConfiguration"].get("EncryptionConfiguration", {}) |
221 | 210 |
|
222 | 211 | athena_statistics: Dict[str, Union[int, str]] = _query_execution_payload.get("Statistics", {}) |
223 | 212 | manifest_location: Optional[str] = str(athena_statistics.get("DataManifestLocation")) |
224 | | - athena_submission_datetime: datetime = _query_execution_payload["Status"].get("SubmissionDateTime") |
225 | | - athena_completion_datetime: datetime = _query_execution_payload["Status"].get("CompletionDateTime") |
226 | | - query_execution_context: Optional[Dict[str, str]] = _query_execution_payload.get("QueryExecutionContext") |
227 | | - query: str = _query_execution_payload["Query"] |
228 | | - statement_type: str = _query_execution_payload["StatementType"] |
229 | | - workgroup: str = _query_execution_payload["WorkGroup"] |
230 | 213 |
|
231 | 214 | query_metadata: _QueryMetadata = _QueryMetadata( |
232 | 215 | execution_id=query_execution_id, |
233 | | - query=query, |
234 | | - statement_type=statement_type, |
235 | | - encryption_configuration=encryption_configuration, |
236 | | - query_execution_context=query_execution_context, |
237 | | - athena_submission_datetime=athena_submission_datetime, |
238 | | - athena_completion_datetime=athena_completion_datetime, |
239 | | - athena_statistics=athena_statistics, |
240 | | - workgroup=workgroup, |
241 | 216 | dtype=dtype, |
242 | 217 | parse_timestamps=parse_timestamps, |
243 | 218 | parse_dates=parse_dates, |
|
0 commit comments