@Beta public final class Relation extends Object implements Serializable
Relation class represents a relation between a list of sources to a list of targets.
The relation can have 4 different types and can be many-to-many, many-to-one, one-to-many or one-to-one.
A relation can be of four different types namely:
DROP type - This type represents relation with a non-existential destination - one-to-none
type. This type is used when the column wouldn't be present after the transformation is performed.
ALL - This type represents a relation with many, one-to-many or many-to-many relation. This
type is generally used when the transformation is unclear about what columns would be generated.
CREATE - This type represents a relation in which a transformation creates a target without
having any source.
GENERATE - This type represents a relation with many, one-to-many or many-to-many relation. This
type is generaly used when the transformation is unclear about the input columns
STANDARD - This type represents all standard relations like many-to-many, many-to-one and
one-to-many.
Lineage,
Many,
Mutation,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
Relation.Type
Specifies the type of relations that can exist between source and target.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getSources() |
List<String> |
getTargets() |
Relation.Type |
getType() |
String |
id()
Deprecated.
this id is no longer needed to construct the relation, the wrangler transform will generate id for
the relation
|
@Deprecated public String id()
String representation of an id for uniquely identifying the relation.public Relation.Type getType()
Relation.Type this relation represents.Copyright © 2020 CDAP Licensed under the Apache License, Version 2.0.