config

How to configure graph options using the Schema API.

Synopsis

config().option(arg).[ set(value) | unset(value) | get() | exists() | describe() ]

Description

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

Set the current graph to use the Development schema_mode:
schema.config().option('graph.schema_mode').set('Development')
Set the current graph to allow full graph scans in the currently aliased graph:
schema.config().option('graph.allow_scan').set('TRUE')
To set 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')
To retrieve all traversal sources that have been set, use the 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.
To verify that user-defined vertex ids exist during data loading, set the 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.
Set the default write consistency for all transactions to ALL in the currently aliased graph:
schema.config().option('graph.tx_groups.default.write_consistency').set('ALL')
Get the current write consistency for all transactions in the currently aliased graph:
schema.config().option('graph.tx_groups.default.write_consistency').get()
To confirm that an option setting has been set manually, use the exists() command:
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.
To enable CQL tracing during traversal query profiling, set the deep_profiling() option:
schema.config().option('graph.tx_groups.default.deep_profiling').set('TRUE')
To retrieve a list of configuration options that have been set, use the 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.