ravendb4

How do we create a RavenETL Task programatically in RavenDB 4?


here is my scenario,

I have 2 databases

Db1 has many collections but I want to replicate "Products" collection to another database DataStaging_Db1

in RavenDB 3.5 I was able to achieve that by adding a system document

Raven/Replication/Destinations

programatically to RavenDB database DB1 with the following details

enter image description here

Can anyone please point out how I can achieve this in RavenDB 4?

Many Thanks


Solution

  • You can do it using the Raven Studio: https://ravendb.net/docs/article-page/4.2/Csharp/studio/database/tasks/ongoing-tasks/ravendb-etl-task

    Or the Client API: https://ravendb.net/docs/article-page/4.2/Csharp/client-api/operations/maintenance/etl/add-etl#example---add-raven-etl