You are currently browsing legacy 4.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Operations: How to Update ETL

You can modify ETL task by using UpdateEtlOperation.

Syntax

public UpdateEtlOperation(long taskId, EtlConfiguration<T> configuration)

Parameters
taskId long Current ETL task ID
configuration EtlConfiguration<T> ETL configuration where T is connection string type

Example

// AddEtlOperationResult addEtlResult = store.Maintenance.Send(new AddEtlOperation<RavenConnectionString>() { ... });

UpdateEtlOperation<RavenConnectionString> operation = new UpdateEtlOperation<RavenConnectionString>(
    addEtlResult.TaskId,
    new RavenEtlConfiguration
    {
        ConnectionStringName = "raven-connection-string-name",
        Name = "Employees ETL",
        Transforms =
        {
            new Transformation
            {
                Name = "Script #1",
                Collections =
                {
                    "Employees"
                },
                Script = @"loadToEmployees ({
                        Name: this.FirstName + ' ' + this.LastName,
                        Title: this.Title
                });"
            }
        }
    });

UpdateEtlOperationResult result = store.Maintenance.Send(operation);