# Pipeline aggs buckets\_path using Integer.valueOf()

**URL:** <https://discuss.elastic.co/t/pipeline-aggs-buckets-path-using-integer-valueof/99464>\
**Category:** Elasticsearch\
**Created:** [September 5, 2017, 4:56pm UTC](https://discuss.elastic.co/t/pipeline-aggs-buckets-path-using-integer-valueof/99464 "2017-09-05T16:56:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Orsi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gustavo_orsi/32/33161_2.png) [@Gustavo\_Orsi](https://discuss.elastic.co/u/Gustavo_Orsi)\
**Post date:** [September 5, 2017, 4:56pm UTC](https://discuss.elastic.co/t/pipeline-aggs-buckets-path-using-integer-valueof/99464/1 "2017-09-05T16:56:41Z")

</div>

I want to use the "\_key" from a terms aggregation (where I know all bucket keys are numbers represented as String) in the buckets\_path.  
There is no way of using "\_key" in the buckets\_path because we will get: "buckets\_path must reference either a number value or a single value numeric metric aggregation, got: java.lang.String".... but we can't use Integer.valueOf(\_key) neither.

Anyone knows any other way ?

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [September 11, 2017, 8:00am UTC](https://discuss.elastic.co/t/pipeline-aggs-buckets-path-using-integer-valueof/99464/2 "2017-09-11T08:00:09Z")

</div>

Pointing a pipeline aggregation at the key of the terms aggregation is not currently possible. Could you maybe explain what you are trying to achieve, such as what you want the pipeline aggregation to do and why?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 9, 2017, 8:00am UTC](https://discuss.elastic.co/t/pipeline-aggs-buckets-path-using-integer-valueof/99464/3 "2017-10-09T08:00:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
