I'm trying to setup this project using the CloudFormation template (PR is coming if i have it working) and in the StepFunction the following error is raised:
'VarCharValue': KeyError
Traceback (most recent call last):
File "/var/task/functions/init-athena-queries.py", line 37, in handler
result_dict['getTotalCost']['resultset'] = apiprocessor.getTotalCost()
File "/var/task/awscostusageprocessor/api.py", line 50, in getTotalCost
return self.getResultSet(consts.ACTION_GET_TOTAL_COST)
File "/var/task/awscostusageprocessor/api.py", line 42, in getResultSet
response['results'] = self.athena.get_query_execution_results(queryexecutionid)
File "/var/task/awscostusageprocessor/sql/athena.py", line 148, in get_query_execution_results
row_dict[rowheaders[columnindex]['VarCharValue']] = columnvalue['VarCharValue']
KeyError: 'VarCharValue'
{
"ResultSet": {
"Rows": [
{
"Data": [
{
"VarCharValue": "sum_unblendedcost"
}
]
},
{
"Data": [
{}
]
}
],
"ResultSetMetadata": {
"ColumnInfo": [
{
"Scale": 0,
"Name": "sum_unblendedcost",
"Nullable": "UNKNOWN",
"TableName": "",
"Precision": 17,
"Label": "sum_unblendedcost",
"CaseSensitive": false,
"SchemaName": "",
"Type": "double",
"CatalogName": "hive"
}
]
}
},
"ResponseMetadata": {
"RetryAttempts": 0,
"HTTPStatusCode": 200,
"RequestId": "9bdc5156-****-****-****-************",
"HTTPHeaders": {
"date": "Fri, 19 Jan 2018 09:24:54 GMT",
"x-amzn-requestid": "9bdc5156-****-****-****-************",
"content-length": "619",
"content-type": "application/x-amz-json-1.1",
"connection": "keep-alive"
}
}
}