config
How to configure graph options for a Classic graph using the Schema API.
Synopsis
config().option(arg).[ set(value) | unset(value) | get() | exists() | describe() ]
Description
Schema configuration is only available for Classic Graph, and is deprecated in DataStax Graph 6.8.
Schema can be configured per graph using the
config().option(arg)
command. An option and value can be set()
or
unset()
. An option's value can be retrieved with the
get()
command. Whether or not the option is configured can be discovered
with the exists()
command. The describe()
command returns
a value if the option has been set manually.
Examples
schema_mode
:schema.config().option('graph.schema_mode').set('Development')
schema.config().option('graph.allow_scan').set('TRUE')
restrict_lambda
to
false
in order to test lambda functions (only appropriate for
non-production
systems):schema.config().option('graph.traversal_sources.g.restrict_lambda').set('FALSE')
get()
command with the traversal source type
option:schema.config().option('graph.traversal_sources.*.type').get()resulting in a list of values for the option that have been manually set:
REAL_TIME
indicating that a real-time
evaluation timeout is set.external_vertex_verify()
option:schema.config().option('graph.tx_groups.default.external_vertex_verify').set('TRUE')If this setting is true, then a vertex will not be returned if it doesn't exist. However, if
external_vertex_verify()
is set to false, then a vertex will be returned
even if the vertex does not exist given an id. Applications should ensure that vertices
exist using the exists()
method for expected behavior. The
internal_vertex_verify()
setting is similarly used for auto-generated
vertex ids.ALL
in the
currently aliased
graph:schema.config().option('graph.tx_groups.default.write_consistency').set('ALL')
schema.config().option('graph.tx_groups.default.write_consistency').get()
schema.config().option('graph.tx_groups.default.write_consistency').exists()This command will return:
true
if the setting has been
set to a value, otherwise it returns false
.schema.config().option('graph.tx_groups.default.deep_profiling').set('TRUE')
describe()
command:schema.config().describe()resulting in a list of all options that have been manually set:
==>graph.schema_mode: Development graph.allow_scan: true graph.tx_groups.*.write_consistency: ALL graph.default_property_key_cardinality: Multiple
If any options have been set in the dse.yaml
file , use the
schema.getEffective*
commands instead of the describe command.