Using components: Aggregate Transformation

Use the Aggregate transformation to group the input dataset by one or more fields and use aggregate functions such as Count, Average, Minimum, Maximum, etc. For example, you may want to count the number of unique users and impressions in each country.

Grouping fields

Select Treat entire input as one group to output a single record for the entire input data with aggregate functions or Group input data by field values to select the grouping key fields.

Aggregate functions

Select the aggregate function and input arguments (see below) and assign each an output alias. The names of the grouping fields and output aliases must be unique.

Aggregate functions list

  • Count - returns the number of non-null values in the field you specify in the field column, according to the groupings. Return value data type is long.
  • Count Distinct - returns the number of unique values in the field you specify in the field column, according to the groupings. Return value data type is long.
  • Count All - returns the number of records, according to the groupings. Return value data type is long.
  • HLL - uses the HyperLogLog++ algorithm to return a cardinality estimate or an approximate number of distinct values in the field you specify, according to the groupings. Return value data type is long.
  • Average - returns the average for numeric fields you specify in the field column, according to the groupings. See the following table for return value data types:
    Argument field data typeReturn value data type
    int, longlong
    float, doubledouble
  • Sum - returns the sum for numeric fields you specify in the field column, according to the groupings. See the following table for return value data types:
    Argument field data typeReturn value data type
    int, longlong
    float, doubledouble
  • Min - returns the minimum value for the field you specify in the field column, according to the groupings. Return value data type is the same as the input argument's data type.
  • Min By - for the minimum value in the field you specify in the field column, and according to the groupings, returns the value defined by projected field. Return value data type is the same as the projected field's data type.
  • Max - calculates the maximum value for the field you specify in the field column, according to the groupings. Return value data type is the same as the input argument's data type.
  • Max By - for the maximum value in the field you specify in the field column, and according to the groupings, returns the value defined by projected field. Return value data type is the same as the projected field's data type.
  • VAR - returns the statistical variance for all values in the field you specify in the field column and according to the groupings. Return value data type is double.
  • VARP - returns the statistical variance for the population of all values in the field you specify in the field column and according to the groupings. Return value data type is double.
  • STDEV - returns the statistical standard deviation for all values in the field you specify in the field column and according to the groupings. Return value data type is double.
  • STDEVP - returns the statistical standard deviation for the population of all values in the field you specify in the field column and according to the groupings. Return value data type is double.
  • Collect - returns a collection (bag) of the values in the field you specify in the field column, according to the groupings. The bag can be manipulated further in a Select component using bag functions. Returned data type is bag.

Creating packages

  1. Creating a new package in New Xplenty
  2. Creating a workflow
  3. Working in the new package designer
  4. Validating a package
  5. Using components: Amazon Redshift Source
  6. Using components: Bing Ads Source
  7. Using components: Database Source
  8. Using components: Facebook Ads Insights Source
  9. Using components: File Storage Source
  10. Using components: Google Adwords source
  11. Using components: Google Analytics Source
  12. Using components: Google BigQuery Source
  13. Using components: Google Cloud Spanner Source
  14. Using components: MongoDB Source
  15. Using components: NetSuite Source
  16. Using components: Salesforce source
  17. Using components: Rest API Source
  18. Using components: Aggregate Transformation
  19. Using components: Assert Transformation
  20. Using components: Clone transformation
  21. Using components: Cross Join Transformation
  22. Using components: Distinct Transformation
  23. Using components: Filter Transformation
  24. Using components: Join Transformation
  25. Using components: Limit Transformation
  26. Using components: Rank Transformation
  27. Using components: Select Transformation
  28. Using components: Sort Transformation
  29. Using components: Union Transformation
  30. Using components: Window Transformation
  31. Using components: Sample Transformation
  32. Using components: Cube transformation
  33. Using components: Amazon Redshift Destination
  34. Using components: Database Destination
  35. Using components: File Storage Destination
  36. Using components: Google BigQuery Destination
  37. Using components: Google Spanner Destination
  38. Using components: MongoDB Destination
  39. Using components: Salesforce Destination
  40. Using components: Snowflake Destination (beta)
  41. Using and setting variables in your packages
  42. System and pre-defined variables
  43. Using pattern-matching in source component paths
  44. Using ISO 8601 string functions
  45. Using Expressions in Xplenty
  46. Xplenty Functions

Feedback and Knowledge Base