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: |
Array operators (remote only)¶
When a metadata value is an array, these operators match if any element satisfies the comparison. They are available on remote queries:
Modifier |
Meaning |
|---|---|
|
Any element greater than |
|
Any element greater than or equal to |
|
Any element less than |
|
Any element less than or equal to |
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:
# Remote array query: any time slice above 5.0
simdb remote iter 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.