Skip to main content
Version: v0.18.0

EntityValidateRelations

Alias:EntityValidateRelations, ValidateRelations

Output:Array<T>

For each entity in the stream, check that the value of the ParentIdProperty is the value of the IdProperty for at least one entity in the stream.

ParameterTypeRequiredPositionDefault ValueSummary
EntityStreamarray<entity>✔1The stream of entities to validate
IdProperty
ExistsIn
string✔2The entity property which will be used to create a lookup table.
ParentIdProperty
LookupThat
string✔3The step will check that the value of this entity property exists in the lookup table.
ErrorBehaviorErrorBehavior4ErrorHow to behave if an error occurs.
IgnoreEmptybool5trueIf true, empty values will be ignored

Examples​

Example 1​

SCL​

EntityValidateRelations [('id': 1), ('id': 2 'parentid': 1), ('parentid': 1), ('id': 3 'parentid': 100), ('id': 4 'parentid': "")] 'id' 'parentid' 'Error'

Expected Logs​

The id '100' does not exist.

Expected Output​

[('id': 1), ('id': 2 'parentid': 1), ('parentid': 1), ('id': 4 'parentid': "")]

Example 2​

SCL​

EntityValidateRelations [('id': 1), ('id': 2 'parentid': 1), ('parentid': 1), ('id': 3 'parentid': 100), ('id': 4 'parentid': "")] 'id' 'parentid' 'Warning'

Expected Logs​

The id '100' does not exist.

Expected Output​

[('id': 1), ('id': 2 'parentid': 1), ('parentid': 1), ('id': 3 'parentid': 100), ('id': 4 'parentid': "")]

Example 3​

SCL​

EntityValidateRelations [('id': 1), ('id': 2 'parentid': 1), ('parentid': 1), ('id': 3 'parentid': 100), ('id': 4 'parentid': "")] 'id' 'parentid' 'Skip'

Expected Output​

[('id': 1), ('id': 2 'parentid': 1), ('parentid': 1), ('id': 4 'parentid': "")]

Example 4​

SCL​

EntityValidateRelations [('id': 1), ('id': 2 'parentid': 1), ('parentid': 1), ('id': 3 'parentid': 100), ('id': 4 'parentid': "")] 'id' 'parentid' 'Ignore'

Expected Output​

[('id': 1), ('id': 2 'parentid': 1), ('parentid': 1), ('id': 3 'parentid': 100), ('id': 4 'parentid': "")]