ElasticSearch Nested Aggregation more than level 2 Visualization is not correct

I am trying an aggregation which is nested upto 3 levels.

{
    "index": "demo_report",
    "aggs": {
        "client": {
            "terms": {
                "field": "client_id",
                "size": 10000
            },
            "aggs": {
                "source_d": {
                    "terms": {
                        "field": "source_d",
                        "size": 10000
                    },
                    "aggs": {
                        "type": {
                            "terms": {
                                "field": "type",
                                "size": 10000
                            }
                        }
                    }
                }
            }
        }
    }
}

Which is clearly not showing the expected data.

The ES connector is in bad shape. It was a community contribution from several years ago and it needs to be rewritten. Work on this is currently underway but its release date is TBD. If ES support is fundamental for you then Redash is probably the wrong tool.