Language
C# Java
Article For
5.3

Operations: How to Add ETL

You can add ETL task by using AddEtlOperation.

Usage

const operation = new AddEtlOperation(etlConfiguration);
Parameters
configuration EtlConfiguration<T> ETL configuration where T is connection string type

Example - Add Raven ETL

const etlConfigurationRvn = Object.assign(new RavenEtlConfiguration(), {
    connectionStringName: "raven-connection-string-name",
    disabled: false,
    name: "etlRvn"
});

const transformationRvn = {
    applyToAllDocuments: true,
    name: "Script #1"
};

etlConfigurationRvn.transforms = [transformationRvn];

const operationRvn = new AddEtlOperation(etlConfigurationRvn);
const etlResultRvn = await store.maintenance.send(operationRvn);

Example - Add Sql ETL

const transformation = {
    applyToAllDocuments: true,
    name: "Script #1"
};

const table1 = {
    documentIdColumn: "Id",
    insertOnlyMode: false,
    tableName: "Users"
};

const etlConfigurationSql = Object.assign(new SqlEtlConfiguration(), {
    connectionStringName: "sql-connection-string-name",
    disabled: false,
    name: "etlSql",
    transforms: [transformation],
    sqlTables: [table1]
});

const operationSql = new AddEtlOperation(etlConfigurationSql);
const etlResult = await store.maintenance.send(operationSql);

Example - Add OLAP ETL

const transformationOlap = {
    applyToAllDocuments: true,
    name: "Script #1"
};

const etlConfigurationOlap = Object.assign(new OlapEtlConfiguration(), {
    connectionStringName: "olap-connection-string-name",
    disabled: false,
    name: "etlOlap",
    transforms: [transformationOlap],
});

const operationOlap = new AddEtlOperation(etlConfigurationOlap);
const etlResultOlap = await store.maintenance.send(operation);