# Can Logstash output Mongo 3.4's new type Decimal128?

**URL:** <https://discuss.elastic.co/t/can-logstash-output-mongo-3-4s-new-type-decimal128/80889>\
**Category:** Logstash\
**Created:** [April 1, 2017, 6:05am UTC](https://discuss.elastic.co/t/can-logstash-output-mongo-3-4s-new-type-decimal128/80889 "2017-04-01T06:05:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddxv](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@ddxv](https://discuss.elastic.co/u/ddxv)\
**Post date:** [April 1, 2017, 6:05am UTC](https://discuss.elastic.co/t/can-logstash-output-mongo-3-4s-new-type-decimal128/80889/1 "2017-04-01T06:05:30Z")

</div>

Mongo 3.4 has a new BSON Type: Decimal128 ("decimal") along with a new constructor NumberDecimal().

An example field looks like:  
`NumberDecimal("123.456")`

I can not find any documentation on filters that would support outputting this type.

I found this information on GitHub:

> **Serializing and writing BSON**
> 
> Drivers MUST provide a way of constructing the Value Object, as the driver representation of the BSON Decimal128 is an immutable Value Object by default.
> 
> A driver MUST have a way to construct this Value Object from a string. For example, Java MUST provide a method similar to `Decimal128.valueOf("2.000")`

Is this possible with logstash? Any work arounds?

GitHub Mongo BSON Decimal128 Spec:

> <https://github.com/mongodb/specifications/blob/master/source/bson-decimal128/decimal128.rst>

Mongo Documentation:

> **[BSON Types — MongoDB Manual](https://www.mongodb.com/docs/manual/reference/bson-types/)**

BSON Specs:  
[http://bsonspec.org/spec.html](http://bsonspec.org/spec.html)

Thanks. Am very new to logstash, and first post, so sorry if it's in the wrong section.

---

<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:** [April 29, 2017, 6:06am UTC](https://discuss.elastic.co/t/can-logstash-output-mongo-3-4s-new-type-decimal128/80889/2 "2017-04-29T06:06:00Z")

</div>

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