How to create tables from nesteded document and join them using Kusto?

I have a dataset that looks as follows

data_set = {
    "set_a": {
        "a":1,
        "b":2,
        "c":3 

    },
    "set_b" {
        "x":5,
        "y":6,
        "z":7 
    }
}

I want to create separate tables then join them together using KUSTO ( KQL ). How can I do that?

If I want to create a table with a and b from set_a and x from set_b, How can I do that?

Upvotes: 0

Views: 170

Answers (1)

Yoni L.
Yoni L.

Reputation: 25895

If I understood your question correctly, this could work:

print data_set = dynamic({
    "set_a": {
        "a":1,
        "b":2,
        "c":3 
    },
    "set_b": {
        "x":5,
        "y":6,
        "z":7 
    }
})
| project a = data_set.set_a.a, b = data_set.set_a.b, x = data_set.set_b.x
a b x
1 2 5

Upvotes: 1

Related Questions