# Accessing Subbuckets in Vega

**URL:** https://discuss.elastic.co/t/accessing-subbuckets-in-vega/137700
**Category:** Kibana
**Created:** [June 27, 2018, 10:14pm UTC](https://discuss.elastic.co/t/accessing-subbuckets-in-vega/137700 "2018-06-27T22:14:28Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jen-huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jen-huang/32/74327_2.png) [@jen-huang](https://discuss.elastic.co/u/jen-huang)
#### Post date: [June 27, 2018, 11:19pm UTC](https://discuss.elastic.co/t/accessing-subbuckets-in-vega/137700/2 "2018-06-27T23:19:50Z")

</div>

Check out Yuri's suggestions in this thread, as well as his note about flatten transform further down:

> [@Kibana vega viz plug-in:multiple aggregations: how-to?](https://discuss.elastic.co/t/kibana-vega-viz-plug-in-multiple-aggregations-how-to/121893/2):
>
> @nielsen-at-cgt Vega-Lite does not have a good built-in handling of nested data results, so I would advise you use [composite aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-composite-aggregation.html). See an example in the video linked from the recent [Vega blog post](https://www.elastic.co/blog/custom-vega-visualizations-in-kibana). If you need to process nested data, you can use full Vega language instead - the ["group" mark](https://vega.github.io/vega/docs/marks/) can be used to draw pre-faceted data.

---

_[View the full topic](https://discuss.elastic.co/t/accessing-subbuckets-in-vega/137700)._
