Add ETL Operation
-
Use the
AddEtlOperation
method to add a new ongoing ETL task to your database. -
To learn about ETL (Extract, Transfer, Load) ongoing tasks, see article ETL Basics.
To learn how to manage ETL tasks from the Studio, see Ongoing tasks - overview. -
In this page:
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(operationOlap);
Syntax
const operation = new AddEtlOperation(etlConfiguration);
Parameter | Type | Description |
---|---|---|
configuration | EtlConfiguration object |
The ETL task configuration to add |
class EtlConfiguration {
taskId?; // number
name; // string
mentorNode?: // string
connectionStringName; // string
transforms; // Transformation[]
disabled?; // boolean
allowEtlOnNonEncryptedChannel?; // boolean
}