fluent-plugin-mongo icon indicating copy to clipboard operation
fluent-plugin-mongo copied to clipboard

Specify values types in a MongoDB collection

Open ghost opened this issue 2 years ago • 2 comments

hello, Is there a way to specify values types in a MongoDB collection according to MongoDB Datatypes? I could spot this in README

Specify date fields in record to use MongoDB's Date object (Optional) default: nil Supported data types are String/Integer/Float/Fuentd EventTime. For Integer type, milliseconds epoch and seconds epoch are supported. eg: updated_at: "2020-02-01T08:22:23.780Z" or updated_at: 1580546457010 date_keys updated_at

and it looks like specific to date fields So I can't see how to use them for other fields...

I think at least basic types like numbers are very useful to have, in order to improve logging size on database (and queries performance).

Thanks a lot for your consideration

ghost avatar Apr 10 '22 14:04 ghost

We are also looking for this functionality. Only date type transformation is available in the plugin now. It would be great if we can specify "bsonInt32_keys", "bsonInt64_keys" for fields like we have "date_keys".

jeevamanivel avatar Jan 27 '23 07:01 jeevamanivel

We are also need this functionality.

haobohuiying avatar Feb 24 '23 12:02 haobohuiying