yougov / mongo-connector

MongoDB data stream pipeline tools by YouGov (adopted from MongoDB)
Apache License 2.0
1.88k stars 478 forks source link

Ingest node #607

Open metanav opened 7 years ago

metanav commented 7 years ago

Can we use ingest node pipeline when dump or sync data in Elasticsearch?

AlJohri commented 7 years ago

👍 I'm very curious about this.

I found this on SO asking a similar question: http://stackoverflow.com/questions/36772351/does-mongo-connector-supports-adding-fields-before-inserting-to-elasticsearch

ShaneHarvey commented 7 years ago

The StackOverflow question is asking how to remove the "alt" field from a subdocument before sending it to Elasticsearch. That can be done with mongo-connector 2.5.0 by filtering fields on a collection via the "namespaces" configuration option. The following config will cause mongo-connector to include only collections in the my_db database and exclude the geopoint.alt field from all documents.

{
    "other options...":"",
    "namespaces": {
        "my_db.*": {
            "excludeFields": ["geopoint.alt"]
        },
    },
}

With this config a document such as {"geopoint": {"lat": 1.0, "lon": 2.0, "alt": 0.0}, "foo": "bar"} will be replicated without "alt": {"geopoint": {"lat": 1.0, "lon": 2.0}, "foo": "bar"}

rathisekaran commented 7 years ago

Adding a test comment. Checking Github-Jira plugin

Mozcatel commented 7 years ago

+1, would like to see support to add pipelines during mongo-connector lifecycle

htandra04 commented 7 years ago

+1, I am also interested in seeing ingest pipelines as an option in mongo-connector. Is there any update on this ?