Query operators¶
simdb simulation query (local) and simdb remote query (remote) find
simulations by matching against their metadata.
This page lists the available comparison operators. For worked examples, see
Query simulations.
Constraint syntax¶
Each constraint has the form:
NAME=[modifier:]VALUE
NAMEis the metadata field to match. Nested fields use dotted names, for examplecode.name.modifieris one of the operators below. If omitted, equality (eq) is used.String comparisons are case-insensitive.
Passing several constraints matches simulations that satisfy all of them (logical AND).
simdb simulation query code.name=SOLPS-ITER
simdb simulation query pulse=gt:1000 run=0
simdb remote iter query machine=ITER
Operators¶
These operators are available for both local and remote queries:
Modifier |
Meaning |
|---|---|
|
Equal to |
|
Not equal to |
|
Field contains |
|
Field does not contain |
|
Greater than |
|
Greater than or equal to |
|
Less than |
|
Less than or equal to |
|
The field exists, regardless of its value. Provide no value: |
Range operators¶
These operators apply to a metadata value shaped as a range object with min
and max keys, for example time: {min: 2.0, max: 8.5}. The a prefix stands
for “any”: the comparison succeeds if any value in the range satisfies it, which
is tested against the range’s max (for agt/age) or min (for
alt/ale). They work for both local and remote queries.
Modifier |
Meaning |
|---|---|
|
The range’s |
|
The range’s |
|
The range’s |
|
The range’s |
Examples¶
# Exact match (eq is implied)
simdb simulation query responsible_name=j.smith
# Substring match, case-insensitive
simdb simulation query workflow.name=in:test
# Numeric comparison combined with an exact match
simdb simulation query pulse=gt:1000 run=0
# Simulations that have a "sequence" metadata field at all
simdb simulation query sequence=exist:
# Range query: the time range's upper bound is above 5.0
simdb simulation query time=agt:5.0
Use -m/--meta-data NAME to add extra metadata columns to the output, and
--uuid to include the simulation UUID. See the CLI reference for all
options.