GetTraits
See javadoc - uk.gov.gchq.gaffer.store.operation.GetTraits
Available since Gaffer version 1.5.0
Gets the traits of the current store.
Required fields
No required fields
Examples
Get all traits
Using this directed graph:
--> 4 <--
/ ^ \
/ | \
1 --> 2 --> 3
\
--> 5
Java
JSON
Full JSON
Python
final GetTraits operation = new GetTraits.Builder()
.currentTraits(false)
.build();
{
"class" : "GetTraits",
"currentTraits" : false
}
{
"class" : "uk.gov.gchq.gaffer.store.operation.GetTraits",
"currentTraits" : false
}
g.GetTraits(
current_traits=False
)
Result:
Java
JSON
POST_TRANSFORMATION_FILTERING
TRANSFORMATION
POST_AGGREGATION_FILTERING
VISIBILITY
QUERY_AGGREGATION
INGEST_AGGREGATION
PRE_AGGREGATION_FILTERING
MATCHED_VERTEX
[ "POST_TRANSFORMATION_FILTERING", "TRANSFORMATION", "POST_AGGREGATION_FILTERING", "VISIBILITY", "QUERY_AGGREGATION", "INGEST_AGGREGATION", "PRE_AGGREGATION_FILTERING", "MATCHED_VERTEX" ]
Get current traits
This will only return traits that are applicable to your current schema. This schema doesn't have a visibility property, so the VISIBILITY trait is not returned.
Using this directed graph:
--> 4 <--
/ ^ \
/ | \
1 --> 2 --> 3
\
--> 5
Java
JSON
Full JSON
Python
final GetTraits operation = new GetTraits.Builder()
.currentTraits(true)
.build();
{
"class" : "GetTraits",
"currentTraits" : true
}
{
"class" : "uk.gov.gchq.gaffer.store.operation.GetTraits",
"currentTraits" : true
}
g.GetTraits(
current_traits=True
)
Result:
Java
JSON
POST_TRANSFORMATION_FILTERING
TRANSFORMATION
POST_AGGREGATION_FILTERING
QUERY_AGGREGATION
INGEST_AGGREGATION
PRE_AGGREGATION_FILTERING
MATCHED_VERTEX
[ "POST_TRANSFORMATION_FILTERING", "TRANSFORMATION", "POST_AGGREGATION_FILTERING", "QUERY_AGGREGATION", "INGEST_AGGREGATION", "PRE_AGGREGATION_FILTERING", "MATCHED_VERTEX" ]