ExtractProperty
See javadoc - uk.gov.gchq.gaffer.data.element.function.ExtractProperty
Available since Gaffer version 1.4.0
Extracts a property from an element
Examples
Extract property from element
If present, the function will extract the value of the specified property, otherwise returning null.
Java
JSON
Full JSON
Python
final ExtractProperty function = new ExtractProperty("prop1");
{
"class" : "ExtractProperty",
"name" : "prop1"
}
{
"class" : "uk.gov.gchq.gaffer.data.element.function.ExtractProperty",
"name" : "prop1"
}
g.ExtractProperty(
name="prop1"
)
Input type:
uk.gov.gchq.gaffer.data.element.Element
Example inputs:
Input Type | Input | Result Type | Result |
---|---|---|---|
uk.gov.gchq.gaffer.data.element.Edge | Edge[source=dest,destination=src,directed=false,group=edge,properties=Properties[prop2=<java.lang.String>test,prop1=<java.lang.Integer>3]] | java.lang.Integer | 3 |
uk.gov.gchq.gaffer.data.element.Entity | Entity[vertex=vertex,group=entity,properties=Properties[prop2=<java.lang.Integer>2,prop1=<java.lang.Integer>12,prop3=<java.lang.String>test]] | java.lang.Integer | 12 |
uk.gov.gchq.gaffer.data.element.Edge | Edge[directed=false,group=UNKNOWN,properties=Properties[]] | null |