-
Notifications
You must be signed in to change notification settings - Fork 215
Namespaces #78
Comments
Namespaces are covered here - http://docs.mongodb.org/manual/faq/developers/#what-is-a-namespace-in-mongodb |
What about replication all collections from a database? |
With namespace as tf.* it does exit 0 without replicating anything |
The Transporter has been designed to synchronise data collections rather than entire databases. The Transporter currently uses singular collections as a source from MongoDB. You cannot give a wildcard namespace as the Transporter currently has no way of mapping the source collection to a destination namespace in another type of database. There are Transporter based commands like "Seed" (see https://github.com/compose/transporter-examples/tree/master/go/cmd ) which query the available collections and copy them across. If you are copying a single collection to an ES index then setting tail:true in the mongodb part of the config.yaml will activate the oplog tailing, providing you have configured your Mongodb locally to act as a single noded replica set. |
So I need to create a pipline for every collection I'm going to have even if I don't know that? |
For something like copying data to Elasticsearch, most users tend to only want to copy particular collections into Elasticsearch after transforming the content to something more searchable. We have more extensive mapping on the roadmap for Transporter. |
So if I need to replicate all the collections to an index, is it possible to put them all in the same index but with different _type? |
Hi! var pipeline = Source({name:"mongodb", namespace:"tf.user"}).save({name:"es", namespace:"tf.user"});
var pipeline = Source({name:"mongodb", namespace:"tf.section"}).save({name:"es", namespace:"tf.section"});
var pipeline = Source({name:"mongodb", namespace:"tf.investment"}).save({name:"es", namespace:"tf.investment"}); Now the index is created but there is no documents replicated |
I try to put only the 1st line to check if I can't use it like above but it doesn't create any doc there |
This line has showed up in the logs: |
I noticed I can wget the elasticsearch server from the transporter container so no connection issues here |
@Garito, I would really like to get some sort of wild card matching happening on namespaces, so a glob like "tf.*" would work, or perhaps a regex. That's not in place though yet. The bulk insertion error means that elasticsearch rejected one of the documents that it was trying to insert. the elasticsearch logs might have more information? |
Same issue than here: #73 |
Same here
I'm not using a custom _id My config
My app
My env
|
@lvidarte are you using a transformer? |
closed via #101 |
Hi!
I'm trying to use this library to sync mongodb with elasticsearch but I have a malformed mongo namespace
This is my config.yaml:
and this is my application.js
Obviously I don't understand namespaces (perhaps the lack of documentation has its part on this)
What are namespaces?
How can I configure transporter to replicate a whole database?
Thanks!
The text was updated successfully, but these errors were encountered: