ExtractId

See javadoc - uk.gov.gchq.gaffer.data.element.function.ExtractId

Available since Gaffer version 1.4.0

Examples

Extract source from edge

The function will simply extract the value of the provided Id, for a given Element. This Id can either be an IdentifierType, or a String representation, eg "SOURCE".

Java
JSON
Full JSON
Python
final ExtractId function = new ExtractId(IdentifierType.SOURCE);
{
  "class" : "ExtractId",
  "id" : "SOURCE"
}
{
  "class" : "uk.gov.gchq.gaffer.data.element.function.ExtractId",
  "id" : "SOURCE"
}
g.ExtractId( 
  id="SOURCE" 
)

Input type:

uk.gov.gchq.gaffer.data.element.Element

Example inputs:

Input TypeInputResult TypeResult
uk.gov.gchq.gaffer.data.element.EdgeEdge[source=src,destination=dest,directed=true,group=edge,properties=Properties[]]java.lang.Stringsrc
uk.gov.gchq.gaffer.data.element.EdgeEdge[source=13.2,destination=15.642,directed=true,group=otherEdge,properties=Properties[]]java.lang.Double13.2

Extract vertex from entity

This example simply demonstrates the same functionality but on an Entity.

Java
JSON
Full JSON
Python
final ExtractId function = new ExtractId(IdentifierType.VERTEX);
{
  "class" : "ExtractId",
  "id" : "VERTEX"
}
{
  "class" : "uk.gov.gchq.gaffer.data.element.function.ExtractId",
  "id" : "VERTEX"
}
g.ExtractId( 
  id="VERTEX" 
)

Input type:

uk.gov.gchq.gaffer.data.element.Element

Example inputs:

Input TypeInputResult TypeResult
uk.gov.gchq.gaffer.data.element.EntityEntity[vertex=v1,group=entity,properties=Properties[]]java.lang.Stringv1

results matching ""

    No results matching ""