Skip to content

Predictable naming when joining #135

@Bouke

Description

@Bouke

Say I have an Application Insights query like the following:

dependencies
| join kind=leftouter (traces | summarize take_any(customDimensions) by operation_ParentId) on $left.id == $right.operation_ParentId
| join kind=leftouter (traces | where condition | summarize take_any(customDimensions) by operation_ParentId) on $left.id == $right.operation_ParentId
| where customDimensions2['foo'] == 'bar'

My resultset will have columns customDimensions, customDimensions1 and customDimensions2.

However when I make a change to the first join so that it doesn't return a column named customDimensions, my resultset will no longer have a column customDimensions2 and what was customDimensions2 will now be in customDimensions1. As a user this is very confusing. Making a change to the first join affects other parts of the query that didn't operate on the data from this join, like customDimensions2.

This makes writing and refactoring queries very hard and error-prone. I'd like to see a way to refer to a column by some stable identifier. For example give the columns from a join a user-defined prefix: join ... as join_2 -> join2_customDimensions.

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