• Getting started
  • API Documentation
  • Pricing
  • Contact
Show / Hide Table of Contents
  • ETLBox.Connection
    • AccessOdbcConnectionManager
    • AdomdConnectionManager
    • ConnectionManagerType
    • Db2ConnectionManager
    • Db2ConnectionString
    • DbConnectionManager<Connection>
    • DbConnectionString<T, TBuilder>
    • IConnectionManager
    • IDbConnectionString
    • MariaDbConnectionManager
    • MariaDbConnectionString
    • MySqlConnectionManager
    • MySqlConnectionString
    • MySqlOdbcConnectionManager
    • OdbcConnectionManager
    • OdbcConnectionString
    • OleDbConnectionManager
    • OleDbConnectionString
    • OracleConnectionManager
    • OracleConnectionString
    • OracleOdbcConnectionManager
    • PostgresConnectionManager
    • PostgresConnectionString
    • PostgresOdbcConnectionManager
    • SqlConnectionManager
    • SqlConnectionString
    • SQLiteConnectionManager
    • SQLiteConnectionString
    • SqlOdbcConnectionManager
    • SqlOleDbConnectionManager
  • ETLBox.ControlFlow
    • ControlFlow
    • ControlFlowTask
    • DbTask
    • DropTask<T>
    • IfExistsTask
    • ILoggableTask
    • ITableData
    • LoggableTask
    • ProcedureDefinition
    • ProcedureParameter
    • QueryParameter
    • TableColumn
    • TableData
    • TableData<T>
    • TableDefinition
  • ETLBox.ControlFlow.Tasks
    • CalculateDatabaseHashTask
    • CleanUpSchemaTask
    • CreateDatabaseTask
    • CreateIndexTask
    • CreateProcedureTask
    • CreateSchemaTask
    • CreateTableTask
    • CreateViewTask
    • DropDatabaseTask
    • DropIndexTask
    • DropProcedureTask
    • DropSchemaTask
    • DropTableTask
    • DropViewTask
    • GetDatabaseListTask
    • IfDatabaseExistsTask
    • IfIndexExistsTask
    • IfProcedureExistsTask
    • IfSchemaExistsTask
    • IfTableOrViewExistsTask
    • RecoveryModel
    • RowCountOptions
    • RowCountTask
    • SqlTask
    • TruncateTableTask
    • XmlaTask
  • ETLBox.DataFlow
    • AggregateColumn
    • ChangeAction
    • ColumnMap
    • CompareColumn
    • DataFlow
    • DataFlowBatchDestination<TInput>
    • DataFlowComponent
    • DataFlowDestination<TInput>
    • DataFlowExecutableSource<TOutput>
    • DataFlowJoinTarget<TInput>
    • DataFlowSource<TOutput>
    • DataFlowStreamDestination<TInput>
    • DataFlowStreamSource<TOutput>
    • DataFlowTransformation<TInput, TOutput>
    • DeleteColumn
    • DistinctColumn
    • ErrorSource
    • ETLBoxError
    • ExcelColumn
    • ExcelRange
    • GroupColumn
    • ICacheManager<TInput, TCache>
    • IDataFlowBatchDestination
    • IDataFlowBatchDestination<TInput>
    • IDataFlowComponent
    • IDataFlowDestination
    • IDataFlowDestination<TInput>
    • IDataFlowExecutableSource
    • IDataFlowExecutableSource<TOutput>
    • IDataFlowLogging
    • IDataFlowSource
    • IDataFlowSource<TOutput>
    • IDataFlowStreamDestination
    • IDataFlowStreamDestination<TInput>
    • IDataFlowStreamSource
    • IDataFlowStreamSource<TOutput>
    • IDataFlowTransformation<TInput, TOutput>
    • IDataFlowTransformation<TOutput>
    • IdColumn
    • IMergeableRow
    • JoinTarget<TInput>
    • MatchColumn
    • MemoryCache<TInput, TCache>
    • MergeableRow
    • MergeMode
    • MergeProperties
    • Network
    • ResourceType
    • RetrieveColumn
    • StreamMetaData
    • TypeInfo
    • UpdateColumn
  • ETLBox.DataFlow.Connectors
    • ConcurrentMemoryDestination
    • ConcurrentMemoryDestination<TInput>
    • CsvDestination
    • CsvDestination<TInput>
    • CsvSource
    • CsvSource<TOutput>
    • CustomBatchDestination
    • CustomBatchDestination<TInput>
    • CustomBatchSource
    • CustomBatchSource<TOutput>
    • CustomDestination
    • CustomDestination<TInput>
    • CustomSource
    • CustomSource<TOutput>
    • DbDestination
    • DbDestination<TInput>
    • DbMerge
    • DbMerge<TInput>
    • DbSource
    • DbSource<TOutput>
    • ExcelSource
    • ExcelSource<TOutput>
    • JsonDestination
    • JsonDestination<TInput>
    • JsonSource
    • JsonSource<TOutput>
    • MemoryDestination
    • MemoryDestination<TInput>
    • MemorySource
    • MemorySource<TOutput>
    • TextDestination
    • TextDestination<TInput>
    • TextSource
    • TextSource<TOutput>
    • VoidDestination
    • VoidDestination<TInput>
    • XmlDestination
    • XmlDestination<TInput>
    • XmlSource
    • XmlSource<TOutput>
  • ETLBox.DataFlow.Transformations
    • Aggregation
    • Aggregation<TInput, TOutput>
    • AggregationMethod
    • BatchTransformation
    • BatchTransformation<TInput, TOutput>
    • BatchTransformation<TInput>
    • BlockTransformation
    • BlockTransformation<TInput, TOutput>
    • BlockTransformation<TInput>
    • CachedBatchTransformation
    • CachedBatchTransformation<TInput, TOutput, TCache>
    • CachedBatchTransformation<TInput, TOutput>
    • CachedBatchTransformation<TInput>
    • CachedRowTransformation
    • CachedRowTransformation<TInput, TOutput, TCache>
    • CachedRowTransformation<TInput, TOutput>
    • CachedRowTransformation<TInput>
    • CacheMode
    • ColumnRename
    • ColumnRename<TInput>
    • CrossJoin
    • CrossJoin<TInput>
    • CrossJoin<TInput1, TInput2, TOutput>
    • CrossJoin<TInput1, TInput2, TOutput>.InMemoryDestination<TInput>
    • Distinct<TInput>
    • LookupTransformation
    • LookupTransformation<TInput, TSource>
    • LookupTransformation<TInput, TSource>.PartialDbCacheSettings
    • MergeJoin
    • MergeJoin<TInput>
    • MergeJoin<TInput1, TInput2, TOutput>
    • Multicast
    • Multicast<TInput>
    • RowDuplication
    • RowDuplication<TInput>
    • RowMultiplication
    • RowMultiplication<TInput, TOutput>
    • RowMultiplication<TInput>
    • RowTransformation
    • RowTransformation<TInput, TOutput>
    • RowTransformation<TInput>
    • Sort
    • Sort<TInput>
    • XmlSchemaValidation
    • XmlSchemaValidation<TInput>
  • ETLBox.Exceptions
    • ETLBoxException
    • ETLBoxFaultedBufferException
    • ETLBoxNotSupportedException
  • ETLBox.Helper
    • BatchLinq
    • BulkSqlGenerator<T>
    • DataTypeConverter
    • ExpandoJsonPathConverter
    • HashHelper
    • IDataTypeConverter
    • JsonPathConverter
    • JsonProperty2JsonPath
    • JsonProperty2JsonPath.MultipleResultsInPath
    • ObjectNameDescriptor
    • PropertyInfoExtension
    • SqlParser
    • StringExtension
  • ETLBox.Logging
    • AbortLoadProcessTask
    • CreateErrorTableTask
    • CreateLoadProcessTableTask
    • CreateLogTableTask
    • CustomTask
    • EndLoadProcessTask
    • ETLLogLayoutRenderer
    • GetLoadProcessAsJSONTask
    • GetLogAsJSONTask
    • LoadProcess
    • LogEntry
    • Logging
    • LogHierarchyEntry
    • LogTask
    • Package
    • ReadLoadProcessTableTask
    • ReadLogTableTask
    • ReadOptions
    • Sequence
    • Sequence<T>
    • StartLoadProcessTask

Class CreateIndexTask

Creates an index if the index doesn't exists, otherwise the index is dropped and recreated.

Inheritance
System.Object
LoggableTask
ControlFlowTask
CreateIndexTask
Implements
ILoggableTask
Inherited Members
ControlFlowTask.ConnectionManager
ControlFlowTask.ConnectionType
ControlFlowTask.QB
ControlFlowTask.QE
LoggableTask.TaskType
LoggableTask._disableLogging
LoggableTask.DisableLogging
LoggableTask.TaskHash
LoggableTask.CopyLogTaskProperties(ILoggableTask)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.ControlFlow.Tasks
Assembly: ETLBox.dll
Syntax
public sealed class CreateIndexTask : ControlFlowTask, ILoggableTask
Examples
CreateIndexTask.Create("indexname","tablename", indexColumns)

Constructors

CreateIndexTask()

Declaration
public CreateIndexTask()

CreateIndexTask(String, String, IList<String>)

Declaration
public CreateIndexTask(string indexName, string tableName, IList<string> indexColumns)
Parameters
Type Name Description
System.String indexName
System.String tableName
System.Collections.Generic.IList<System.String> indexColumns

CreateIndexTask(String, String, IList<String>, IList<String>)

Declaration
public CreateIndexTask(string indexName, string tableName, IList<string> indexColumns, IList<string> includeColumns)
Parameters
Type Name Description
System.String indexName
System.String tableName
System.Collections.Generic.IList<System.String> indexColumns
System.Collections.Generic.IList<System.String> includeColumns

Properties

IN

The formatted name of the index

Declaration
public ObjectNameDescriptor IN { get; }
Property Value
Type Description
ObjectNameDescriptor

IncludeColumns

A list of included column names for the index.

Declaration
public IList<string> IncludeColumns { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>

IndexColumns

A list of column names for the index

Declaration
public IList<string> IndexColumns { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>

IndexName

The name of the index

Declaration
public string IndexName { get; set; }
Property Value
Type Description
System.String

IsClustered

Set the index as a clustered index

Declaration
public bool IsClustered { get; set; }
Property Value
Type Description
System.Boolean

IsUnique

Set the index as Unique.

Declaration
public bool IsUnique { get; set; }
Property Value
Type Description
System.Boolean

Sql

The sql code used to generate the index

Declaration
public string Sql { get; }
Property Value
Type Description
System.String

TableName

The name of the table the index is based on.

Declaration
public string TableName { get; set; }
Property Value
Type Description
System.String

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
public override string TaskName { get; set; }
Property Value
Type Description
System.String
Overrides
LoggableTask.TaskName

TN

The formatted name of the table.

Declaration
public ObjectNameDescriptor TN { get; }
Property Value
Type Description
ObjectNameDescriptor

Methods

CreateOrRecrate()

Runs the sql to (re)create the index on a table.

Declaration
public void CreateOrRecrate()

CreateOrRecreate(IConnectionManager, String, String, IList<String>)

Creates an index. If the index exists, it is dropped and recreated.

Declaration
public static void CreateOrRecreate(IConnectionManager connectionManager, string indexName, string tableName, IList<string> indexColumns)
Parameters
Type Name Description
IConnectionManager connectionManager

The connection manager of the database you want to connect

System.String indexName

The name of the index

System.String tableName

The name of the table the index is based on

System.Collections.Generic.IList<System.String> indexColumns

The name of the columns for the index

CreateOrRecreate(IConnectionManager, String, String, IList<String>, IList<String>)

Creates an index. If the index exists, it is dropped and recreated.

Declaration
public static void CreateOrRecreate(IConnectionManager connectionManager, string indexName, string tableName, IList<string> indexColumns, IList<string> includeColumns)
Parameters
Type Name Description
IConnectionManager connectionManager

The connection manager of the database you want to connect

System.String indexName

The name of the index

System.String tableName

The name of the table the index is based on

System.Collections.Generic.IList<System.String> indexColumns

The name of the columns for the index

System.Collections.Generic.IList<System.String> includeColumns

The name of the columns that are included in the index.

CreateOrRecreate(String, String, IList<String>)

Creates an index. If the index exists, it is dropped and recreated.

Declaration
public static void CreateOrRecreate(string indexName, string tableName, IList<string> indexColumns)
Parameters
Type Name Description
System.String indexName

The name of the index

System.String tableName

The name of the table the index is based on

System.Collections.Generic.IList<System.String> indexColumns

The name of the columns for the index

CreateOrRecreate(String, String, IList<String>, IList<String>)

Creates an index. If the index exists, it is dropped and recreated.

Declaration
public static void CreateOrRecreate(string indexName, string tableName, IList<string> indexColumns, IList<string> includeColumns)
Parameters
Type Name Description
System.String indexName

The name of the index

System.String tableName

The name of the table the index is based on

System.Collections.Generic.IList<System.String> indexColumns

The name of the columns for the index

System.Collections.Generic.IList<System.String> includeColumns

The name of the columns that are included in the index

Execute()

Runs the sql to (re)create the index on a table.

Declaration
public void Execute()

Implements

ILoggableTask
Back to top Crafted with <3 in Berlin
Contact & legal notice