I am trying to truncate Athena table using boto3, it is failing with error :
File "staging_layer_schema.py", line 142, in <module>
ResultConfiguration = config
File "/usr/local/lib/python3.6/dist-packages/botocore/client.py", line 316, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.6/dist-packages/botocore/client.py", line 635, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: Queries of this type are not supported
Please find below code snippet as well :
truncate_staging_table_query = "truncate table pratik_test_staging.temp"
response_truncate_staging_table_query = client_athena.start_query_execution(
QueryString = truncate_staging_table_query,
ResultConfiguration = config
)