Skip to content

[bug] visualizations not loadion #69

@sholzhauer-es

Description

@sholzhauer-es

Got a bug report in slack:

Hi team, Pepsi installed chargeback integration 0.2.9, and some visualizations aren't loading.

It seems that the runtime fields, like indexing are returning 0 even though they shouldn't:

ROM billing_cluster_cost_lookup
| LOOKUP JOIN chargeback_conf_lookup ON @timestamp >= conf_start_date AND @timestamp <= conf_end_date
| LOOKUP JOIN cluster_deployment_contribution_lookup ON composite_key
| LOOKUP JOIN cluster_tier_contribution_lookup ON composite_key
| EVAL
    indexing = CASE (deployment_sum_indexing_time > 0, tier_sum_indexing_time / deployment_sum_indexing_time * total_ecu) * conf_ecu_rate,
    querying = CASE (deployment_sum_query_time > 0, tier_sum_query_time / deployment_sum_query_time * total_ecu) * conf_ecu_rate,
    data_set = CASE (deployment_sum_data_set_store_size > 0, tier_sum_data_set_store_size / deployment_sum_data_set_store_size * total_ecu),
    store = CASE (deployment_sum_store_size > 0, tier_sum_store_size / deployment_sum_store_size * total_ecu),
    storage = CASE (store == 0, data_set, store) * conf_ecu_rate,
    total_weight_hot = conf_storage_weight + conf_query_weight + conf_indexing_weight,
    total_weight_cold = conf_storage_weight + conf_query_weight,
    blended = CASE (
        tier == "hot/content",
        ((storage / conf_ecu_rate * conf_storage_weight) + (querying / conf_ecu_rate * conf_query_weight) + (indexing / conf_ecu_rate * conf_indexing_weight)) / total_weight_hot,
        ((storage / conf_ecu_rate * conf_storage_weight) + (querying / conf_ecu_rate * conf_query_weight)) / total_weight_cold
    ) * conf_ecu_rate
| STATS
    agg_indexing = sum(indexing),
    agg_querying = sum(querying),
    agg_storage = sum(storage),
    agg_blended = sum(blended)
    BY
        tier
| WHERE agg_blended > 0

I could workaround it by adding TO_DOUBLE:

indexing = CASE (deployment_sum_indexing_time > 0, TO_DOUBLE(tier_sum_indexing_time) / deployment_sum_indexing_time * total_ecu) * conf_ecu_rate

How could we fix this in the integration?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions