DISTRIBUTED(recordset [, expression [, ASSERT] ] )
| recordset | The set of distributed records. |
| expression | Optional. An expression that specifies how the recordset is distributed. |
| ASSERT | Optional. Creates a light-weight activity that ensures the dataset really is distributed as expected; if not, the workunit fails with an exception. |
| Return: | DISTRIBUTED returns a set of records. |
The DISTRIBUTED function is a compiler directive indicating that the records from the recordset are already distributed across the nodes of the Data Refinery based on the specified expression. Records for which the expression evaluates the same are on the same node.
If the expression is omitted, the function just suppresses a warning that is sometimes generated that the recordset hasn't been distributed
If ASSERT is specified, the compiler creates a light-weight activity that validates that the data is distributed as claimed by the expression and fails the workunit if it is not.
Example:
MySet := DISTRIBUTED(Person,HASH32(Person.per_ssn),ASSERT);
//all people with the same SSN are already on the same node
//and ASSERT verifies the claimed distributionSee Also: HASH32, DISTRIBUTE