Class TruncateTableTask
Truncates a table.
Implements
Inherited Members
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 TruncateTableTask : ControlFlowTask, ILoggableTask
Examples
TruncateTableTask.Truncate("demo.table1");
Constructors
TruncateTableTask()
Declaration
public TruncateTableTask()
TruncateTableTask(String)
Declaration
public TruncateTableTask(string tableName)
Parameters
Type | Name | Description |
---|---|---|
System.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 |
---|---|
System.String |
TableName
Name of the table that should be truncated
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
TN
The formatted table table name
Declaration
public ObjectNameDescriptor TN { get; }
Property Value
Type | Description |
---|---|
ObjectNameDescriptor |
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 |
System.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 |
---|---|---|
System.String | tableName | Table that should be truncated |