Using components: Rank

Use the Rank component to sort the input by one or more field and assign a rank to each record that reflects the sort order that will be available in the component's output. The calculated value is a numeric rank according to the order by which the data is sorted.

If multiple records have the same values in the sort keys (a tie), they will have the same rank value and there will be a gap between them and the next record's rank. To avoid the gap, use the dense option. For example:
sorted field rank dense rank
'a' 1 1
'a' 1 1
'b' 3 2

To define a Rank component:

  1. Add a rank component where required in your package.
  2. Open the component and name it.
  3. In the rank field name, type a name for the field that will contain the rank values.
  4. Select Dense to assign a consecutive value to the next record that follows records with the same rank.
  5. Add the first field you want to sort by, and define the sort order (ascending or descending).
  6. If required, add additional fields to sort by and define their sort order.
  7. Change the field order as required.
  8. Validate the package to make sure that the rank field name is unique.

Creating packages

  1. Creating a new package
  2. Create a package from a template
  3. Working in the package designer
  4. Using Components: Facebook Ads Insights Source (Beta)
  5. Using components: File Storage Source
  6. Using components: Database Source
  7. Using components: Google AdWords Source
  8. Using components: NetSuite Source
  9. Using Components: Google Analytics Source
  10. Using Components: Google BigQuery Source
  11. Using components: Google Cloud Spanner Source
  12. Using Components: Bing Ads Source
  13. Using components: MongoDB Source
  14. Using components: Amazon Redshift Source
  15. Using Components: Rest API Source
  16. Using Components: Salesforce Source
  17. Using components: Select
  18. Using components: Sort
  19. Using components: Rank
  20. Using components: Limit
  21. Using components: Sample
  22. Using components: Join
  23. Using components: Cross Join
  24. Using components: Clone
  25. Using components: Cube and Rollup
  26. Using components: Union
  27. Using components: Filter
  28. Using Components: Window
  29. Using components: Assert
  30. Using components: Aggregate
  31. Using components: Distinct
  32. Using components: File Storage Destination
  33. Using components: Amazon Redshift Destination
  34. Using Components: Salesforce Destination
  35. Using components: Google BigQuery Destination
  36. Using components: Google Cloud Spanner Destination
  37. Using components: Database Destination
  38. Using components: MongoDB Destination
  39. Using components: Snowflake Destination (beta)
  40. Using and setting variables in your packages
  41. System and pre-defined variables
  42. Validating a package
  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