Skip to content

Athena error for column rootcause #365

@man-jiteshm-myob

Description

@man-jiteshm-myob

I get the following issue in Athena for the cost_anomaly_data table when running CID data collection

HIVE_PARTITION_SCHEMA_MISMATCH: There is a mismatch between the table and partition schemas. The types are incompatible and cannot be coerced. The column 'rootcauses' in table 'optimization_data.cost_anomaly_data' is declared as type 'array<struct<service:string,region:string,linkedaccount:string,linkedaccountname:string,usagetype:string,impact:struct<contribution:double>>>', but partition 'payer_id=562791833499/year=2025/month=04/day=18' declared column 'rootcauses' as type 'array<struct<service:string,impact:struct<contribution:double>>>'.
This query ran against the "optimization_data" database, unless qualified by the query. Please post the error 
message on our forum  or contact customer support  with Query Id: adf72b1e-c759-4b8e-adc4-c831c24bb622

I believe it is to do with the wrong array ordering:

array<struct<service:string,region:string,linkedaccount:string,usagetype:string,linkedaccountname:string,impact:struct<contribution:double>>>

vs

'array<struct<service:string,impact:struct<contribution:double>>>'

possibly related to #341 but the workaround provided here is temporary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions