Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nenjotsu/817dc18ce0a385bac073833e730eb0dc to your computer and use it in GitHub Desktop.
Save nenjotsu/817dc18ce0a385bac073833e730eb0dc to your computer and use it in GitHub Desktop.
Transporter Mongodb Elasticsearch pipeline
var source = mongodb({
"uri": "${MONGODB_URI}"
// "timeout": "30s",
// "tail": false,
// "ssl": false,
// "cacerts": ["/path/to/cert.pem"],
// "wc": 1,
// "fsync": false,
// "bulk": false,
// "collection_filters": "{}",
// "read_preference": "Primary"
})
var sink = elasticsearch({
"uri": "${ELASTICSEARCH_URI}"
// "timeout": "10s", // defaults to 30s
// "aws_access_key": "ABCDEF", // used for signing requests to AWS Elasticsearch service
// "aws_access_secret": "ABCDEF" // used for signing requests to AWS Elasticsearch service
// "parent_id": "elastic_parent" // defaults to "elastic_parent" parent identifier for Elasticsearch
})
t.Source("source", source, "/.*/").Save("sink", sink, "/.*/")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment