Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

Info

NOTE: When added to a transform, the COUNT function calculates the number of rows displayed in the current sample and are not applied to the entire dataset until you run the job. If you change your sample or run the job, the computed values for this function are updated. Transforms that change the number of rows in subsequent recipe steps do not affect the value for the already computed instance of COUNT.

D s
snippetBasic

COUNT
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextpivot value:
count() group:postal_code limit:1

...

count()

Output: Returns the count of records for the dataset.

D s
snippetSyntax

There are no arguments for this function.

For You can use the group and limit parameters to specify the scope of the count. For more information on the group and limit parameters, see Pivot Transform.

...

RowNum
Row 1
Row 2
Row 3
Row 4
Row 5

TransformTransformation:

d-

...

trans
RawWrangletrue
p03Value'row_count'
Typestep
WrangleTextderive type:single value:

...

count() as:'row_count'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Valuecount()
p03NameNew column name
SearchTermNew formula

sourcerow_count
Row 15
Row 25
Row 35
Row 45
Row 55

...