Creating a Partition

Partition an existing delta stream, stream, window, or module in the Visual editor.

Prerequisites
(Optional) To use a parameter to specify the number of partitions you wish to create, create a global parameter first. See Declaring a Parameter for detailed steps on creating a parameter.
Task
  1. Click Add Partition PolicyAdd Partition Policy icon.
  2. Select a partition policy.
  3. In the Properties view, specify a value or parameter for the Number of Partitions to create. To use a parameter, either enter the parameter name or click Select and select the parameter from the list.
  4. Select the new partition and edit its properties in the Properties view:
    Partition Policy Steps
    ROUNDROBIN
    1. Select a source for the partition.
    HASH
    1. Select a source for the partition.
    2. Select the columns to use for the HASH function and click Add.
    CUSTOM
    1. Select a source for the partition.
    2. On the Expression tab, edit the partition function. To show syntax completion proposals, press Ctrl+Space.
    3. To ensure that the function returns a valid partition ID, apply a modulo operation in the return statement and use the implicit global parameter of the partition as its divisor. For example, for an output window called maxPriceW, use maxPriceW_partitions as the divisor:
      BY priceW 
      {
           integer hashValue := ascii(substr(priceW.isin,1,1));
           return hashValue % maxPriceW_partitions;	
      }
Related tasks
Declaring a Parameter