Package io.openlineage.client.utils
Class TransformationInfo
java.lang.Object
io.openlineage.client.utils.TransformationInfo
Stores information about transformation type of the dependency between two expressions. The
transformation is described by 3 attributes: type, subtype and masking.
type indicate whether the transformation is direct (target value was derived
from source value) or indirect (target value was influenced by source value). subType further divide the transformations. masking indicates whether the transformation obfuscated the source value-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionTransformationInfo(TransformationInfo.Types type, TransformationInfo.Subtypes subType, String description, Boolean masking) -
Method Summary
Modifier and TypeMethodDescriptionstatic TransformationInfoMethod that simplifies the creation of anTransformationInfoobject representing non-masking,TransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.AGGREGATIONtransformation.static TransformationInfoaggregation(Boolean isMasking) Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.AGGREGATIONtransformation.static TransformationInfoaggregation(String description) Method that simplifies the creation ofTransformationInfoobject representing non-masking,TransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.AGGREGATIONtransformation with a description.static TransformationInfoaggregation(String description, Boolean isMasking) Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.AGGREGATIONtransformation with a description.booleangetType()inthashCode()static TransformationInfoidentity()Method that simplifies the creation of anTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.IDENTITYtransformation.static TransformationInfoMethod that simplifies the creation of anTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.IDENTITYtransformation with a description.static TransformationInfoindirect(TransformationInfo.Subtypes subType) Method that simplifies the creation ofTransformationInfoobject representing non-masking,TransformationInfo.Types.INDIRECTtransformation.static TransformationInfoindirect(TransformationInfo.Subtypes subType, Boolean isMasking) Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.INDIRECTtransformation.static TransformationInfoindirect(TransformationInfo.Subtypes subType, String description) Method that simplifies the creation ofTransformationInfoobject representing non-masking,TransformationInfo.Types.INDIRECTtransformation with a description.static TransformationInfoindirect(TransformationInfo.Subtypes subType, String description, Boolean isMasking) Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.INDIRECTtransformation with a description.merge(TransformationInfo another) merge(TransformationInfo another, BinaryOperator<String> descriptionMerger) Merges currentTransformationInfowith another e.g.toString()static TransformationInfoMethod that simplifies the creation of anTransformationInfoobject representing non-masking,TransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.TRANSFORMATIONtransformation.static TransformationInfotransformation(Boolean isMasking) Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.TRANSFORMATIONtransformation.static TransformationInfotransformation(String description) Method that simplifies the creation ofTransformationInfoobject representing non-masking,TransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.TRANSFORMATIONtransformation with a description.static TransformationInfotransformation(String description, Boolean isMasking) Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.TRANSFORMATIONtransformation with a description.withDescription(String description) Returns aTransformationInfoidentical to this one, except for the description.
-
Constructor Details
-
TransformationInfo
public TransformationInfo(TransformationInfo.Types type, TransformationInfo.Subtypes subType, String description, Boolean masking)
-
-
Method Details
-
identity
Method that simplifies the creation of anTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.IDENTITYtransformation. -
identity
Method that simplifies the creation of anTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.IDENTITYtransformation with a description.- Parameters:
description- - description of the transformation
-
transformation
Method that simplifies the creation of anTransformationInfoobject representing non-masking,TransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.TRANSFORMATIONtransformation. -
transformation
Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.TRANSFORMATIONtransformation.- Parameters:
isMasking- - is transformation masking
-
transformation
Method that simplifies the creation ofTransformationInfoobject representing non-masking,TransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.TRANSFORMATIONtransformation with a description.- Parameters:
description- - description of the transformation
-
transformation
Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.TRANSFORMATIONtransformation with a description.- Parameters:
description- - description of the transformationisMasking- - is transformation masking
-
aggregation
Method that simplifies the creation of anTransformationInfoobject representing non-masking,TransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.AGGREGATIONtransformation. -
aggregation
Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.AGGREGATIONtransformation.- Parameters:
isMasking- - is transformation masking
-
aggregation
Method that simplifies the creation ofTransformationInfoobject representing non-masking,TransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.AGGREGATIONtransformation with a description.- Parameters:
description- - description of the transformation
-
aggregation
Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.DIRECT,TransformationInfo.Subtypes.AGGREGATIONtransformation with a description.- Parameters:
description- - description of the transformationisMasking- - is transformation masking
-
indirect
Method that simplifies the creation ofTransformationInfoobject representing non-masking,TransformationInfo.Types.INDIRECTtransformation.- Parameters:
subType- - the subtype of the transformation viable subtypes:TransformationInfo.Subtypes.CONDITIONAL,TransformationInfo.Subtypes.SORT,TransformationInfo.Subtypes.GROUP_BY,TransformationInfo.Subtypes.JOIN,TransformationInfo.Subtypes.FILTER,
-
indirect
Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.INDIRECTtransformation.- Parameters:
subType- - the subtype of the transformation viable subtypes:TransformationInfo.Subtypes.CONDITIONAL,TransformationInfo.Subtypes.SORT,TransformationInfo.Subtypes.GROUP_BY,TransformationInfo.Subtypes.JOIN,TransformationInfo.Subtypes.FILTER,isMasking- - is transformation masking (no indirect transformation is masking, but their dependencies can be)
-
indirect
Method that simplifies the creation ofTransformationInfoobject representing non-masking,TransformationInfo.Types.INDIRECTtransformation with a description.- Parameters:
subType- - the subtype of the transformation viable subtypes:TransformationInfo.Subtypes.CONDITIONAL,TransformationInfo.Subtypes.SORT,TransformationInfo.Subtypes.GROUP_BY,TransformationInfo.Subtypes.JOIN,TransformationInfo.Subtypes.FILTER,description- - description of the transformation
-
indirect
public static TransformationInfo indirect(TransformationInfo.Subtypes subType, String description, Boolean isMasking) Method that simplifies the creation ofTransformationInfoobject representingTransformationInfo.Types.INDIRECTtransformation with a description.- Parameters:
subType- - the subtype of the transformation viable subtypes:TransformationInfo.Subtypes.CONDITIONAL,TransformationInfo.Subtypes.SORT,TransformationInfo.Subtypes.GROUP_BY,TransformationInfo.Subtypes.JOIN,TransformationInfo.Subtypes.FILTER,description- - description of the transformationisMasking- - is transformation masking (no indirect transformation is masking, but their dependencies can be)
-
withDescription
Returns aTransformationInfoidentical to this one, except for the description. Returnsthiswhen the description is already equal, so cached instances are preserved.- Parameters:
description- - description of the transformation
-
equals
-
hashCode
public int hashCode() -
merge
public TransformationInfo merge(TransformationInfo another, BinaryOperator<String> descriptionMerger) Merges currentTransformationInfowith another e.g. given two dependencies with transformation types a -> b, t1 and b -> c, t2 the result of merge is transformation type for dependency a -> cRules applied here are: 1. if current transformation is indirect, new type and subtype is taken from current 2. if current is not indirect and another is null we can't deduce result so we return null 3. if another is indirect, new type and subtype is taken from another 4. otherwise the the type and subtype are taken from the one with lower
Enum.ordinal()5. if anyTransformationInfohas masking set to true, the result has masking set to true- Parameters:
another- -TransformationInfoobject to be merged with
-
merge
-
toInputFieldsTransformations
-
toString
-
getType
-
getSubType
-
getDescription
-
getMasking
-