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 function calculates the number of distinct values in the specified column, as displayed in the current sample. Counts 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 COUNTDISTINCT.

D s
snippetBasic

COUNTDISTINCT
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextpivot value:
countdistinct(name) group:postal_code limit:1

...

countdistinct(name)

Output: Returns the count of distinct values in the name

...

column.

D s
snippetSyntax

pivot value:COUNTDISTINCT
d-code
lang-syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextpivot value:countdistinct(function_col_ref) [group:group_col_ref] [limit:limit_count]

countdistinct(function_col_ref) [group:group_col_ref] [limit:limit_count]


ArgumentRequired?Data TypeDescription
function_col_refYstringName of column to which to apply the function

...