Class TruncateTableTask
Truncates a table.
Implements
Inherited Members
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
public sealed class TruncateTableTask : ControlFlowTask, ILoggableTaskExamples
TruncateTableTask.Truncate("demo.table1");Constructors
TruncateTableTask()
Declaration
public TruncateTableTask()TruncateTableTask(string)
Declaration
public TruncateTableTask(string tableName)Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Sets the TableName |
Properties
Sql
Sql code that is used when the task is executed.
Declaration
public string Sql { get; }Property Value
| Type | Description |
|---|---|
| string |
TN
The formatted table table name
Declaration
public ObjectNameDescriptor TN { get; }Property Value
| Type | Description |
|---|---|
| ObjectNameDescriptor |
TableName
Name of the table that should be truncated
Declaration
public string TableName { get; set; }Property Value
| Type | Description |
|---|---|
| string |
Methods
Truncate(IConnectionManager, string)
Execute a table truncation
Declaration
public static void Truncate(IConnectionManager connection, string tableName)Parameters
| Type | Name | Description |
|---|---|---|
| IConnectionManager | connection | Database connection manager to connect with the database |
| string | tableName | Table name that should be truncated |
Truncate(string)
Execute a table truncation
Declaration
public static void Truncate(string tableName)Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Table that should be truncated |
TruncateAsync(IConnectionManager, string)
Declaration
public static void TruncateAsync(IConnectionManager connection, string tableName)Parameters
| Type | Name | Description |
|---|---|---|
| IConnectionManager | connection | |
| string | tableName |