• 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 RowCountTask

Count the row in a table. This task normally uses the COUNT(*) method (could take some time on big tables). You can pass a a filter condition for the count.

Inheritance
System.Object
LoggableTask
ControlFlowTask
RowCountTask
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 RowCountTask : ControlFlowTask, ILoggableTask
Examples
int count = RowCountTask.Count("tableName").Value;

Constructors

RowCountTask()

Declaration
public RowCountTask()

RowCountTask(String)

Declaration
public RowCountTask(string tableName)
Parameters
Type Name Description
System.String tableName

RowCountTask(String, RowCountOptions)

Declaration
public RowCountTask(string tableName, RowCountOptions options)
Parameters
Type Name Description
System.String tableName
RowCountOptions options

RowCountTask(String, String)

Declaration
public RowCountTask(string tableName, string condition)
Parameters
Type Name Description
System.String tableName
System.String condition

RowCountTask(String, String, RowCountOptions)

Declaration
public RowCountTask(string tableName, string condition, RowCountOptions options)
Parameters
Type Name Description
System.String tableName
System.String condition
RowCountOptions options

Properties

Condition

Part of the sql where condition which restrict which rows are counted

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

HasRows

Indicates if the table contains rows - only has a value after the execution

Declaration
public bool? HasRows { get; }
Property Value
Type Description
System.Nullable<System.Boolean>

NoLock

NoLock does a normal COUNT(*) using the nolock - option which avoid tables locks when reading from the table (but while counting the tables new data could be inserted, which could lead to wrong results).

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

QuickQueryMode

For Sql Server, you can set the QuickQueryMode to true. This will query the sys.partition table which can be much faster.

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

Rows

Will hold the number of counted rows after execution

Declaration
public int? Rows { get; }
Property Value
Type Description
System.Nullable<System.Int32>

Sql

The sql that is executed to count the rows in the table - will change depending on your parameters.

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

TableName

Name of the table on which the rows are counted

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 table table name

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

Methods

Count()

Declaration
public RowCountTask Count()
Returns
Type Description
RowCountTask

Count(IConnectionManager, String)

Declaration
public static int? Count(IConnectionManager connectionManager, string tableName)
Parameters
Type Name Description
IConnectionManager connectionManager
System.String tableName
Returns
Type Description
System.Nullable<System.Int32>

Count(IConnectionManager, String, RowCountOptions)

Declaration
public static int? Count(IConnectionManager connectionManager, string tableName, RowCountOptions options)
Parameters
Type Name Description
IConnectionManager connectionManager
System.String tableName
RowCountOptions options
Returns
Type Description
System.Nullable<System.Int32>

Count(IConnectionManager, String, String)

Declaration
public static int? Count(IConnectionManager connectionManager, string tableName, string condition)
Parameters
Type Name Description
IConnectionManager connectionManager
System.String tableName
System.String condition
Returns
Type Description
System.Nullable<System.Int32>

Count(IConnectionManager, String, String, RowCountOptions)

Declaration
public static int? Count(IConnectionManager connectionManager, string tableName, string condition, RowCountOptions options)
Parameters
Type Name Description
IConnectionManager connectionManager
System.String tableName
System.String condition
RowCountOptions options
Returns
Type Description
System.Nullable<System.Int32>

Count(String)

Declaration
public static int? Count(string tableName)
Parameters
Type Name Description
System.String tableName
Returns
Type Description
System.Nullable<System.Int32>

Count(String, RowCountOptions)

Declaration
public static int? Count(string tableName, RowCountOptions options)
Parameters
Type Name Description
System.String tableName
RowCountOptions options
Returns
Type Description
System.Nullable<System.Int32>

Count(String, String)

Declaration
public static int? Count(string tableName, string condition)
Parameters
Type Name Description
System.String tableName
System.String condition
Returns
Type Description
System.Nullable<System.Int32>

Count(String, String, RowCountOptions)

Declaration
public static int? Count(string tableName, string condition, RowCountOptions options)
Parameters
Type Name Description
System.String tableName
System.String condition
RowCountOptions options
Returns
Type Description
System.Nullable<System.Int32>

Execute()

Performs the row count

Declaration
public void Execute()

Implements

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