awswrangler.athena.get_query_columns_types

awswrangler.athena.get_query_columns_types(query_execution_id: str, boto3_session: Optional[Session] = None) Dict[str, str]

Get the data type of all columns queried.

https://docs.aws.amazon.com/athena/latest/ug/data-types.html

Parameters
  • query_execution_id (str) – Athena query execution ID.

  • boto3_session (boto3.Session(), optional) – Boto3 Session. If none, the default boto3 session is used.

Returns

Dictionary with all data types.

Return type

Dict[str, str]

Examples

>>> import awswrangler as wr
>>> wr.athena.get_query_columns_types('query-execution-id')
{'col0': 'int', 'col1': 'double'}