ROWS

ROWS(array)[source]

The ROWS function returns the number of rows in a specified table or array. If the input is blank or in an error state, the formula evaluates to an error. Only valid tables or array types are accepted.

Parameters:

array (Table | Operand) –

The table or array for which to count the number of rows. Must be a valid table or array type. If the input is blank or in an error state, the formula evaluates to an error.

Supported types:

  • INTEGER_ARRAY

  • DECIMAL_ARRAY

  • STRING_ARRAY

  • BOOLEAN_ARRAY

  • DATE_ARRAY

  • DATETIME_ARRAY

  • TIME_ARRAY

  • OBJECT_ARRAY

Return type:

Formula

Returns:

The total number of rows in the specified table or array. If the input is invalid, blank, or in an error state, the formula evaluates to an error.

Supported types:

  • INTEGER

Raises:

ValueError – if the input is not a valid table or array type.

Examples

ROWS(my_table)
# Returns the number of rows in my_table