ord_schema.search#
Searching the ORD corpus: a query grammar, its compiler, and an executor.
A query is stated as a Query rather than as SQL, so
what the grammar can express bounds what a search can cost. Everything needed to turn an
intent into one lives here: the schema description a model is given to write against,
the checks a query has to pass, name resolution, and the executor that answers it over
the projection and structures artifacts.
The consumer this was built for is an agent, which is why the schema is rendered for a prompt and why compounds are named rather than spelled. Nothing here is specific to one, though: a search is a search.
It sits in ord-schema rather than in a serving repository because these pieces
describe the data, not a deployment. A description that tells a model which columns
exist has to be versioned alongside the code that generates them, or it silently drifts
from a schema it cannot see; ord_schema.search.schema and
ord_schema.search.sql both read the schemas in ord_schema.search.query
for exactly that reason.
For the same reason nothing here does HTTP or owns a cache; a server supplies those and
maps library exceptions onto its own protocol. The one connection held is DuckDB’s
embedded one, opened by ord_schema.search.execute over local artifact files –
part of reading the data, not of serving it.
Requires the search extra (pip install ord-schema[search]).
ord_schema.search.check#
Checking a built corpus before anyone publishes it.
The unit tests say the deriving code is right. They say nothing about a corpus someone actually built, which is what gets published and what a wrong answer comes out of. Three questions, and a command that answers them:
Is it faithful to its sources? Every dataset has a projection, every projection holds exactly the reactions its source does, and a sample of rows re-projects to what is stored. A projection that quietly dropped a field would pass every other check here.
Would a rebuild answer the same? A baseline records what a set of queries returned, one digest per query over the reactions it found. Rerun against a new build and any answer that moved is named. The baseline also records which corpus it was taken from, so running it against a different corpus reports that rather than reporting every query as broken – an ID from one corpus is not evidence about another, and a check that forgets so becomes a check nobody believes.
What is in it? Counts that decide what a release can promise: how many reactions carry a temperature, a yield, a solvent; how many structures RDKit cannot read; what the yields actually range over. These never fail. They are here because the answer to “should we publish this” is not a boolean, and the numbers belong beside the checks rather than in someone’s terminal history.
- class ord_schema.search.check.Finding(check: str, passed: bool, detail: str)#
Bases:
objectOne thing checked, and how it came out.
- Variables:
check (str) – What was checked, in a few words.
passed (bool) – Whether it holds. A coverage count is always True; it reports rather than judges.
detail (str) – What was found, whether it passed or not.
- check: str#
- detail: str#
- passed: bool#
- ord_schema.search.check.check_answers(measured: dict[str, Any], baseline: dict[str, Any]) list[Finding]#
Returns whether a corpus answers as the baseline recorded.
- Parameters:
measured – What
measurefound.baseline – A baseline file’s contents.
- Returns:
One finding per query, plus one naming any query the baseline does not carry. A baseline taken from another corpus produces a single finding saying so: its digests are not evidence about this corpus, and comparing them anyway would report every query as broken.
- ord_schema.search.check.check_coverage(corpus: Corpus, *, timeout_seconds: float) list[Finding]#
Returns counts describing what the corpus holds.
These never fail. What a release can promise is a judgment about the numbers, and the numbers belong beside the checks rather than in someone’s terminal history.
- Parameters:
corpus – The corpus to describe.
timeout_seconds – Bounds each query.
- Returns:
One finding per count, all passing.
- ord_schema.search.check.check_sources(projection_pattern: str, source_pattern: str, *, datasets: int, rows: int, seed: int) list[Finding]#
Returns whether the projections restate the datasets they were derived from.
- Parameters:
projection_pattern – Glob matching the projections.
source_pattern – Glob matching the source datasets.
datasets – How many datasets to sample rows from. Re-projecting a row costs what projecting it did, so this is the knob between a check and a rebuild.
rows – How many rows to re-project per sampled dataset.
seed – Fixes which datasets and rows are sampled, so a failure can be rerun.
- Returns:
One finding for the pairing, one for the reaction IDs, and one for the sampled rows.
- ord_schema.search.check.check_structures(structures_pattern: str) list[Finding]#
Returns counts of what RDKit could and could not read.
- Parameters:
structures_pattern – Glob matching the structures artifacts.
- Returns:
One finding for the readable share, one for the hashed share. Both pass; a corpus with unreadable structures is normal and the number is what matters.
- ord_schema.search.check.corpus_digest(projection_pattern: str) str#
Returns a digest of which datasets a corpus is built from.
Recorded beside a baseline so that running it against another corpus is reported as another corpus rather than as every answer having changed.
- Parameters:
projection_pattern – Glob matching the projections.
- Returns:
A hex digest over the sorted source hashes the projections stamp.
- ord_schema.search.check.digest(reaction_ids: Iterable[str]) str#
Returns a digest of a result, independent of the order it came back in.
- Parameters:
reaction_ids – The reactions a query returned.
- Returns:
A hex digest over the sorted IDs. Sorted because two runs of one query need not agree on order and a difference in order is not a difference in the answer.
- ord_schema.search.check.load_baseline(path: Path) dict[str, Any]#
Returns a baseline file’s contents.
- Parameters:
path – The file to read.
- Returns:
The parsed baseline.
- Raises:
FileNotFoundError – If no baseline has been recorded yet, which is a different thing from a corpus that answers differently.
- ord_schema.search.check.main(argv: Sequence[str] | None = None) int#
Checks a built corpus and prints what it found.
- Parameters:
argv – Command-line arguments;
sys.argvwhen omitted.- Returns:
Zero if every check passed, one otherwise, so a pipeline can gate on it.
- ord_schema.search.check.measure(corpus: Corpus, *, timeout_seconds: float) dict[str, Any]#
Returns what each canonical query answers on this corpus.
- Parameters:
corpus – The corpus to ask.
timeout_seconds – Bounds each query, so a slow one fails the run rather than stopping it.
- Returns:
A mapping from query name to the reactions found and their digest.
ord_schema.search.execute#
Running a compiled query against a corpus of projections and structures base.
The compiler (ord_schema.search.query) leaves two kinds of work undone on
purpose, and this module is where both happen:
Names become structures. Compound names bind as resolved SMILES, through
ord_schema.resolversby default or any injected resolver. The corpus keeps what each name resolved to, and a result states it underRESOLVED.Structure predicates become bitmaps. Each compiles to a bitmap test on the element’s
structure_id, and the chemistry runs here. Substructure goes through an RDKitSubstructLibrarybuilt over the corpus: it screens on the pattern fingerprints the artifact already stores and matches the survivors exactly, across its own threads with the GIL released, so a server can share one corpus between concurrent requests without forking. Similarity stays in SQL and has no verification step at all – Tanimoto is defined on the Morgan fingerprint, so the screen is the whole answer.
Structure IDs are dataset-local, so a corpus-wide bitmap needs an offset per file.
Corpus pairs every projection with its structures artifact, refuses a pair whose
stamps disagree about the source dataset – the two files are two statements of one
derivation, and a mismatched pair would join IDs to the wrong molecules silently –
and publishes a reactions relation carrying each row’s offset in the column the
compiled SQL expects.
A Corpus is safe to share between concurrent searches. A DuckDBPyConnection
holds the pending result of its last execute, so two threads stepping on one read
each other’s rows rather than raising; each search therefore takes its own cursor. A
cursor in turn sees only the catalog, not the objects register attaches to the
connection that registered them, so every relation here is a catalog table or view.
Finding the reactions that hold a match is a scan of every reaction, which costs more
than the chemistry for all but the narrowest queries. An occurrence index – one row
per structure occurrence, carrying the corpus-wide ID and the path it sat at – turns
that scan into a semi-join against a narrow table. It is spent through the compiler’s
ElementIndex hook, one quantifier at a time: an exists whose body is one
structure predicate on the element’s own smiles and nothing else becomes a condition
on the row, and everything around it compiles exactly as it would have. An aggregate
over the quantifier, a scalar beside it, an ordering, a limit, a negation, a
disjunction, or a second quantifier each compose with the condition rather than
disqualifying it.
What still compiles over the elements, and so reads the level’s pivot where there is
one and the projection where there is not: a quantifier whose body binds any element
field beside the structure – reaction_role as much as any other – reaches a nested
one, holds no structure predicate or more than one, or is not a plain conjunction, and
every forall, since the index shows the elements that match, never that every
element does. Either one reads the whole element, so “pyridine as the solvent” stays a
condition on one element rather than an intersection of two reaction sets, which
over-returns.
An occurrence and a pivot row each name their reaction by ID, so neither is read over a corpus that states a reaction twice; two files carrying one reaction would have each copy’s elements answering for the other.
Reading the projection at all costs a re-parse of every file’s footer, and over a schema
this wide that parse is most of what a query spends however few leaves it goes on to
read. The corpus keeps the parsed footers instead; see _cache_footers.
The index is a view over occurrence artifacts covering every indexed path, and the
pivots are views over pivot artifacts: the corpus builds neither, and a level or a path
with no artifact is answered from the projection’s own lists, which is slower and
nothing else. The substructure library is the one thing built, at open unless the corpus
was given warm=False, which leaves it to the first substructure predicate.
The grammar bounds what a query can cost (one pass and a sort), and search
takes a wall-clock timeout over the whole call, bounding when the caller is answered
rather than when work stops; see _Deadline for which phases can be interrupted and
which are only checked.
Given the source datasets, a corpus also serves what a search found. A search returns
reaction IDs, and Corpus.reactions reads each one’s serialized Reaction out of
the source file it came from, so the search and the records are one snapshot: every
source is paired with the projection whose ord.source_md5 stamp names its hash, and
sources and projections that do not pair one to one are refused at open.
- class ord_schema.search.execute.Corpus(projection_pattern: str, structures_pattern: str, *, resolver: Callable[[str], str] | None = None, threads: int = -1, require_current: bool = True, pivots_dir: str | None = None, require_pivots: bool = False, occurrences_dir: str | None = None, require_occurrences: bool = False, arrivals_pattern: str | None = None, memory_limit: str | None = None, warm: bool = True, max_rows: int | None = 1000, sources_pattern: str | None = None)#
Bases:
objectA searchable pairing of projections with their structures base.
Opens one DuckDB connection over both artifact sets and publishes the relation a compiled query runs against. Given the source datasets, it also serves the reactions a search finds; see
reactions. The connection reaches the corpus’s own directories and nothing else; see_confine. Use as a context manager, or callclose.- check_index() dict[str, int]#
Publishes the occurrence index and returns what it reached, per path.
The sibling of
check_pivots, and for the same reason: a corpus opened withoutwarmpublishes the index on the first query that can spend it, so a corpus it refuses – a reaction stated twice, a structure no artifact reaches, an artifact of another corpus – fails that query rather than the deployment. A corpus opened withwarmhas published it already, and the call is then its counts. Leaving a corpus cold suits one asked only for scalar or similarity queries, which never spend the librarywarmwould also build.- Returns:
The number of occurrences found per indexed path, including the paths that hold none – most corpora record no authentic standards, and a zero there is ordinary rather than a sign the walk missed something. Empty when the corpus has no index: it was opened without
occurrences_dir, or with one that does not cover every indexed path.- Raises:
PairingError – If the corpus states a reaction more than once, the index does not reach every structure the corpus holds, or an occurrence artifact belongs to another corpus or carries a structure ID its dataset does not hold.
- check_pivots() dict[str, int]#
Publishes every pivot artifact this corpus can read, and returns the counts.
Meant for startup. Artifacts are otherwise found by the first query that wants a level, so a tree derived from another corpus, filed under the wrong level, or left stale is a
PairingErrorraised at whatever hour that query arrives. Calling this makes the same refusal happen while a server is still starting, where it is a failed deployment rather than a failed request.Publishing is the check: a level whose artifacts are wrong cannot be published, and one that is fine is left ready, so the first real query does not pay the glob. Cheap either way – a view over Parquet reads footers, not rows.
- Returns:
The number of artifacts found per level, for the levels that have any. Empty when the corpus was opened without
pivots_dir, which is not an error: every level is then answered from the projection’s lists.- Raises:
PairingError – If any level’s artifacts were not derived from this corpus’s projections, hold a different level than the one they are filed under, carry a structure ID their dataset does not hold, or – with
require_current– are stale.
- close() None#
Closes the connection.
- datasets() Table#
Returns what each source dataset says about itself.
Read from the footers at open, so this reads no file.
- Returns:
dataset_id,name,description, andreactions, the row count its footer states. Ordered bydataset_id, with any source that recorded none last.- Return type:
One row per source
- Raises:
ValueError – If the corpus was opened without
sources_pattern.
- property fingerprint: str#
Returns a short digest naming the artifacts this corpus opened.
A question log records this beside the query rather than the rows the query returned, so an old record stays reproducible: the same query against the same fingerprint answers the same way, and a different fingerprint says why it does not.
- reactions(reaction_ids: Iterable[str] | Array | ChunkedArray) Table#
Returns the source records of the given reactions.
What a search returns is reaction IDs; this is how a caller reaches the reactions themselves, read from the files the searched projections restate. One ID is cheap, since only its record is decoded. A batch reaches the Parquet scan as the range its IDs span, which for IDs spread across the corpus decodes nearly every record, and costs about the same whether it names ten IDs or a thousand.
Runs on its own cursor, as
searchdoes, so concurrent fetches and searches sharing this corpus do not read each other’s rows.- Parameters:
reaction_ids – The reactions wanted, typically a search’s
reaction_idcolumn, as the pyarrow column or as a list.- Returns:
Columns
reaction_id,dataset_id, andreaction, the serializedReactionexactly as its source stores it. One row per distinct ID the corpus holds, in the order first asked; an ID it does not hold has no row, and an empty request returns an empty table with these columns.- Raises:
ValueError – If the corpus was opened without
sources_pattern, or the request names more distinct IDs thanmax_rows.PairingError – If the sources state one of the reactions more than once, so which record answers would be arbitrary.
- search(request: Query, *, timeout_seconds: float | None = None) Table#
Compiles and runs a query, returning the result as an Arrow table.
Runs on its own cursor, so concurrent searches sharing this corpus do not read each other’s results. Two searches wait on each other at the one-time library build and index check, and at a structure predicate one of them is already matching.
A quantifier the occurrence index can answer becomes a condition on the row rather than a filter over the elements, and the rest of the query – the clauses beside it, the aggregate, the ordering, the limit – compiles exactly as it would have. The screening and verification are the compiler’s either way, so an indexed query and a projection one differ only in how they reach the reactions holding a match. Which happened is logged, because it is the one thing about a search that the result does not show.
- Parameters:
request – The query to run.
timeout_seconds – Wall-clock bound on the whole call, not on the final query alone. The query is interrupted; a phase already running is not, and raises when it finishes instead – so a search can take longer than this and still report the overrun.
_Deadlinesays which phases those are and why. None runs unbounded.
- Returns:
reaction_idfor a plain query, and for an aggregated one a column pergroup_bypath, named by the whole path, then one per measure, named by itsname. At most this corpus’smax_rows, where it has one: an answer that reached the bound is logged as possibly cut and carriesTRUNCATEDin its schema metadata.Compiled.limitis what actually reached the SQL, for a caller that wants the number rather than the flag. A query naming a compound carriesRESOLVEDas well, whichresolutionsreads.- Return type:
The selected columns
- Raises:
query.QueryError – If the query does not compile.
ValueError – If a compound name cannot be resolved.
PairingError – If the corpus IDs do not come out one unbroken run; if the occurrence index refuses the corpus – a reaction stated by more than one row, or a structure no indexed path reaches; or, for a query reading the arrivals, if they name a reaction other than the corpus’s own or leave a field NULL.
TimeoutError – If the search exceeds
timeout_seconds, naming the phase that was running when the bound passed.
- exception ord_schema.search.execute.PairingError#
Bases:
ValueErrorThe artifacts, or the sources beside them, do not form a consistent corpus.
- ord_schema.search.execute.resolutions(table: Table) dict[str, str]#
Returns each compound name a search resolved, mapped to the SMILES it matched.
- Parameters:
table – What
Corpus.searchreturned.- Returns:
Each name mapped to the canonical SMILES the search matched it as, read from the
RESOLVEDstamp; empty for a query that named no compound.
- ord_schema.search.execute.sql_string(value: str) str#
Returns
valueas a SQL string literal, single quotes escaped.
ord_schema.search.nl#
Questions in English, translated into the search grammar and answered.
A model cannot be constrained to emit a valid Query. The grammar is recursive, and
both constrained-decoding paths refuse it – structured outputs and strict tools share
one validator, which rejects circular references and then, once the recursion is
removed, rejects what is left as too large. So translation is ordinary generation,
checked afterwards: the tool schema is documentation the model mostly follows rather
than a rule it cannot break.
Four things follow, and they are the whole design. The predicate tree usually arrives
JSON-encoded inside a string, so it is coerced before validation rather than after a
failure. The compiler’s errors name the offending path and suggest a real one, so a
query that does not compile is worth handing back exactly once. A model with no way to
decline invents a query for a question the grammar cannot express, so cannot_answer
is offered beside build_query. And the schema rendering and the grammar are ~15k
tokens of prompt that never change, so they are cached, which is most of what a query
costs.
The measurements behind those choices are in the ord-logbook entry “What constrains a natural-language layer over the search grammar”.
- class ord_schema.search.nl.Answer(question: str, query: Query, table: Table, text: str, record_id: str = '', resolved: dict[str, str]=<factory>)#
Bases:
objectWhat a question produced, including the query it became.
- Variables:
question (str) – The question as asked.
query (ord_schema.search.query.Query) – The query that ran, for showing the user what was searched and for running it again unchanged.
table (pyarrow.lib.Table) – What the search returned.
text (str) – A sentence or two describing that result.
record_id (str) – What this question was logged as. A caller hands it to the reader so a thumb has something to reference; without it the log records feedback nobody can attach to a question.
resolved (dict[str, str]) – Each compound name the query gives, mapped to the canonical SMILES the search matched it as. The query keeps the name, so this is where a reader sees the structure; empty for a query naming no compound.
- question: str#
- record_id: str = ''#
- resolved: dict[str, str]#
- table: Table#
- text: str#
- class ord_schema.search.nl.Description(text: str, usage: Usage, elapsed_ms: float)#
Bases:
objectA sentence about a result, and what writing it cost.
- Variables:
text (str) – The prose.
usage (ord_schema.search.nl_log.Usage) – What the call cost. The prose is a second model call, so a question’s price is not the translation’s.
elapsed_ms (float) – Wall time spent.
- elapsed_ms: float#
- text: str#
- exception ord_schema.search.nl.MalformedQueryError(*args: object, attempts: Sequence[Attempt] = (), turns: int = 0, usage: Usage | None = None, elapsed_ms: float = 0.0)#
Bases:
NLQueryErrorThe model’s query did not compile, and neither did its repair.
- exception ord_schema.search.nl.ModelRateLimitedError(*args: object, attempts: Sequence[Attempt] = (), turns: int = 0, usage: Usage | None = None, elapsed_ms: float = 0.0)#
Bases:
NLQueryErrorThe model refused the request because the caller is over its rate limit.
- exception ord_schema.search.nl.ModelRefusedError(*args: object, attempts: Sequence[Attempt] = (), turns: int = 0, usage: Usage | None = None, elapsed_ms: float = 0.0)#
Bases:
NLQueryErrorThe model’s safety classifiers declined the request.
Distinct from
UnanswerableError, where the model read the question and found the grammar lacking: here a classifier declined the request before any answer, and the category says which one.
Bases:
NLQueryErrorThe model could not be reached.
- exception ord_schema.search.nl.NLQueryError(*args: object, attempts: Sequence[Attempt] = (), turns: int = 0, usage: Usage | None = None, elapsed_ms: float = 0.0)#
Bases:
ExceptionA question could not be answered.
Carries what the failed attempt spent, because a record is most worth having exactly when the translation did not work – and an exception has no return value to put it in.
- Variables:
attempts – Every
build_querycall made before giving up, in order.turns – How many times the model was asked to translate before giving up, which exceeds the attempts where a turn wrote no query.
usage – What the whole failed translation cost, including turns that produced no attempt.
elapsed_ms – Wall time spent before the failure.
- class ord_schema.search.nl.Translation(query: Query, attempts: tuple[Attempt, ...], usage: Usage, elapsed_ms: float, turns: int = 1)#
Bases:
objectA question turned into a query, and what that took.
- Variables:
query (ord_schema.search.query.Query) – The query, validated and compiled.
attempts (tuple[ord_schema.search.nl_log.Attempt, ...]) – Every
build_querycall, in order, each with the compiler’s verdict and what the turn cost. The rejected query and the error rejecting it are what prompt work runs on, and what pricing a repair turn needs.usage (ord_schema.search.nl_log.Usage) – What the whole translation cost.
elapsed_ms (float) – Wall time spent translating.
turns (int) – How many times the model was asked: two where the first turn was handed back, whether or not it wrote a query to record as an attempt.
- elapsed_ms: float#
- turns: int = 1#
- exception ord_schema.search.nl.UnanswerableError(*args: object, attempts: Sequence[Attempt] = (), turns: int = 0, usage: Usage | None = None, elapsed_ms: float = 0.0)#
Bases:
NLQueryErrorThe question cannot be put to this grammar, and the model said so.
Distinct from a malformed query: nothing was wrong with the model’s reasoning, and retrying will not help. Comparing two columns is the standard case – a value is a literal, never another column – and a layer without a way to say so answers with a plausible query that means something else.
- property attempted: bool#
Returns whether a query came first and failed to compile.
A caller is served either way, so this changes nothing about the answer; a measurement wants it, because recognizing an inexpressible question is not the same as backing into it after the compiler refused a guess.
- ord_schema.search.nl.answer(question: str, table: Table, *, client: Anthropic | None = None, model: str = 'claude-haiku-5-5', effort: str | None = None) Description#
Returns a sentence or two saying what a result shows.
- Parameters:
question – The question the result answers.
table – What the search returned.
client – Anthropic client; one is built from the environment if omitted.
model – Which model writes the prose.
effort – How much the model thinks, or None for the model’s default.
- Returns:
The prose and what it cost. The model sees
summarize(table)rather than the rows, so it can describe only what the summary states.- Raises:
ModelRefusedError – If the model’s safety classifiers declined the request.
ModelRateLimitedError – If the caller is over its rate limit.
ModelUnavailableError – If the model cannot be reached.
- ord_schema.search.nl.ask(question: str, corpus: Corpus, *, structures: Mapping[str, Placeholder] | None = None, client: Anthropic | None = None, model: str = 'claude-haiku-5-5', effort: str | None = None, timeout_seconds: float = 60.0, sink: Sink | None = None, source: str | None = None, session_id: str | None = None) Answer#
Answers a question against a corpus, and records what happened.
The model’s own failures arrive as
NLQueryErrorsubclasses; the search’s arrive as themselves. Folding both into one taxonomy would cost a caller the distinction it answers with – an unresolvable compound is the question’s fault, a corpus whose artifacts disagree is the deployment’s.Every ending is recorded, not only the one where everything worked. A question that matched nothing, one the compiler refused twice, and one the model declined are the records worth reading, and a log written on the success path holds none of them.
- Parameters:
question – The question, in English.
corpus – The corpus to search.
structures – Each placeholder the question writes, mapped to the structure it stands for.
client – Anthropic client; one is built from the environment if omitted.
model – Which model translates and describes.
effort – How much the model thinks, or None for the model’s default.
timeout_seconds – Passed to the search, so a slow query fails rather than hangs.
sink – Where the record goes; nothing is recorded if omitted.
source – Which surface this arrived from –
"web","eval","api". One prefix holds all of them, and nothing else in the record separates a person rephrasing from a harness working through a case file.session_id – Groups this question with the rest of a visit, which is what makes a rephrasing readable as a correction of the question before it.
- Returns:
The query that ran, the reactions it found, a description of them, the identifier the record was written under, and what each compound the query named was searched as.
- Raises:
MalformedQueryError – If translation produces nothing that compiles.
UnanswerableError – If the grammar cannot express the question.
ModelRefusedError – If the model’s safety classifiers declined the request.
ModelRateLimitedError – If the caller is over its rate limit.
ModelUnavailableError – If the model cannot be reached.
ValueError – If a compound the query names cannot be resolved.
PlaceholderError – If the question and its placeholders do not fit each other, before the model is asked anything; nothing is recorded.
TimeoutError – If the search exceeds
timeout_seconds.QueryError – If the compiled query cannot be run against these artifacts.
PairingError – If the corpus and its structures do not line up.
- ord_schema.search.nl.get_client() Anthropic#
Returns a client reading its credentials from the environment.
- Returns:
A client authenticated with
ORD_ANTHROPIC_API_KEYwhere the environment sets it, and with whatever the SDK finds otherwise.
- ord_schema.search.nl.outcome_of(error: BaseException) Outcome#
Returns the outcome a failure is recorded as.
- Parameters:
error – What ended the ask.
- Returns:
The matching
nl_log.Outcome, orSEARCH_FAILEDfor anything the search raised that has no more specific name.
- ord_schema.search.nl.prompt_fingerprint() str#
Returns a short digest of the cached prefix.
Two things at once, which is why it is worth recording on every question. It names the translator a record was written by, so a query from months ago is not read as evidence about today’s prompt. And because the prefix is exactly what the cache keys on, the fingerprint changes when and only when a cache read would have missed – so a run where it moves unexpectedly is money already spent.
Cached: the prompt and the tools are module constants built at import, so a served process would otherwise digest the whole prefix again on every question it records. Anything that replaces one of them has to call
cache_clear.- Returns:
Twelve hex characters over the system prompt and both tool definitions.
- ord_schema.search.nl.summarize(table: Table, *, rows: int = 5) str#
Returns a description of a result small enough to put in a prompt.
- Parameters:
table – What the search returned.
rows – How many sample rows to show.
- Returns:
The row count, the column names, and up to
rowsrows. A result of a hundred thousand reactions costs the same prompt as one of three, which is the point: the model describes the shape of an answer rather than reading it.
- ord_schema.search.nl.translate(question: str, *, structures: Mapping[str, Placeholder] | None = None, client: Anthropic | None = None, model: str = 'claude-haiku-5-5', effort: str | None = None, repair: bool = True) Translation#
Returns the query a question asks for.
- Parameters:
question – The question, in English.
structures – Each placeholder the question writes, mapped to the structure it stands for. The model is told each one’s format and never its text, which is substituted into the query before it is validated.
client – Anthropic client; one is built from the environment if omitted.
model – Which model translates.
effort – How much the model thinks, one of
EFFORTS, or None for the model’s default. Models without effort levels reject anything but None.repair – Hand a failure back once, carrying the compiler’s error or, where the model called no tool, a reminder to. Turn it off to measure how often a model is right without help.
- Returns:
The query, every
build_querycall that led to it, and what they cost.- Raises:
MalformedQueryError – If the query does not compile, or the model calls no tool, after the repair turn where one was allowed.
UnanswerableError – If the model says the grammar cannot express the question.
ModelRefusedError – If the model’s safety classifiers declined the request.
ModelRateLimitedError – If the caller is over its rate limit.
ModelUnavailableError – If the model cannot be reached. Every one of these carries the attempts and the usage spent reaching it, because a failed translation is a record worth keeping and an exception has no return value.
PlaceholderError – If the question and its placeholders do not fit each other, before the model is asked anything.
ord_schema.search.nl_eval#
Scoring translations by the reactions they return.
A case states the question and one query that answers it. Scoring compares the reactions a translation returns against the reactions that reference returns, and they have to be the same set. That is not the same as pinning the query: several spellings of a question are right and pinning one would fail a better translation than the one written the day the case was added, but every right spelling answers with the same reactions, so the set is what a case can fairly hold a model to.
Both queries run against whatever corpus the command is pointed at, so a case carries
no reaction IDs and nothing in it goes stale when the corpus is rebuilt. The reference
names structures outright rather than by compound, so scoring reaches no resolver, and
it asks for a compound the way the prompt tells a model to – with same_compound
rather than an equality on a spelling, which would fail a translation for following its
instructions.
Running the cases costs money and reaches the network, so the suite covers the
scoring and the outcomes run_case maps a translation onto, with the model stubbed.
The measurement itself is a command.
- class ord_schema.search.nl_eval.CaseResult(case: EvalCase, passed: bool, detail: str)#
Bases:
objectHow one case came out.
- Variables:
case (ord_schema.search.nl_eval.EvalCase) – The case that ran.
passed (bool) – Whether it was satisfied.
detail (str) – What happened, in a line, whether it passed or not.
- detail: str#
- passed: bool#
- class ord_schema.search.nl_eval.EvalCase(*, question: str, why: str, reference: dict[str, Any] | None = None, compiles: bool = True, structures: dict[str, Placeholder] = {})#
Bases:
BaseModelOne question, and what any correct answer to it must satisfy.
- Variables:
question (str) – The question, in English.
why (str) – What this case is here to catch, for whoever reads a failure.
reference (dict[str, Any] | None) – One whole query that answers the question, whose result a translation’s has to match. Not what a translation has to produce – several spellings are right – but the definition of what the right ones return: the reactions, or, where the question asks for a number, the measured rows.
compiles (bool) – Whether the question should translate at all. False marks one the grammar cannot express, which the layer must refuse rather than fudge, and which therefore has no reference.
structures (dict[str, ord_schema.search.placeholders.Placeholder]) – Each placeholder the question writes, mapped to the structure it stands for, as a person’s interface would send them.
- compiles: bool#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- question: str#
- reference: dict[str, Any] | None#
- structures: dict[str, Placeholder]#
- why: str#
- ord_schema.search.nl_eval.load_cases(path: Path = PosixPath('/home/docs/checkouts/ord-schema/envs/latest/lib/python3.11/site-packages/ord_schema/search/nl_cases.json')) list[EvalCase]#
Returns the cases a file holds.
- Parameters:
path – A JSON file holding a list of cases.
- Returns:
The parsed cases.
- ord_schema.search.nl_eval.main(argv: Sequence[str] | None = None) None#
Runs the cases against a real model and prints the report.
- Parameters:
argv – Command-line arguments;
sys.argvwhen omitted.
- ord_schema.search.nl_eval.report(results: Sequence[CaseResult]) str#
Returns a summary of a run, failures spelled out.
- Parameters:
results – What the cases produced.
- Returns:
A count, then a line per failure naming the question and what went wrong.
- ord_schema.search.nl_eval.run_case(case: EvalCase, corpus: Corpus, *, client: Anthropic, model: str, repair: bool, effort: str | None = None, timeout_seconds: float = 300.0, sink: Sink | None = None, session_id: str | None = None) CaseResult#
Translates one case, runs it, and scores what came back.
- Parameters:
case – The case to run.
corpus – The corpus to search.
client – Anthropic client.
model – Which model translates.
repair – Whether a failure gets the repair turn.
effort – How much the model thinks, or None for the model’s default.
timeout_seconds – Bounds the search, so a case that translates into something slow fails the run rather than stopping it.
sink – Where each case’s record goes; nothing is recorded if omitted. A run is worth recording for the same reason a served question is: a real question against a real model, priced and timed.
session_id – Groups this run’s cases, the way a visit groups a reader’s.
- Returns:
The result. A case marked
compiles: falsepasses exactly when the model declines outright, since saying so is the right answer to what the grammar cannot express. Declining only after a query failed to compile does not pass: the case measures whether the model reads the question, not whether it eventually stops.- Raises:
ModelRateLimitedError – If the caller is over its rate limit.
ModelUnavailableError – If the model cannot be reached. Neither is scored as a failed translation: the measurement did not happen, and calling that a wrong answer would understate the model on the next run. Everything else – a query that names an unresolvable compound, a search past its timeout, a reference query the case file got wrong – fails its own case and lets the rest of the run finish.
- ord_schema.search.nl_eval.score(case: EvalCase, returned: Sequence[str], expected: Sequence[str]) CaseResult#
Returns whether a translation answered with the reactions the reference does.
- Parameters:
case – The case.
returned – Reaction IDs the translated query returned.
expected – Reaction IDs the case’s reference query returned.
- Returns:
The result, naming what the translation missed and what it added. Both directions matter: a query that is too narrow misses reactions, and one that drops a condition adds them.
- ord_schema.search.nl_eval.score_measures(case: EvalCase, returned: Table, expected: Table, *, ordered: bool, groups: int | None = None) CaseResult#
Returns whether a translation measured what the reference measures.
- Parameters:
case – The case.
returned – What the translated query returned.
expected – What the reference query returned.
ordered – Whether the reference sorts, in which case the sequence has to match and not only the rows. A question asking for the highest of something is answered wrongly by the right rows in the wrong order.
groups – How many leading columns are group_by paths, where the reference aggregates; None where it only sorts. A row whose every measure is null is dropped from both sides: a group with no value states nothing, so keeping it and narrowing it away are the same answer.
- Returns:
The result. Values compare within pandas’ default relative tolerance, which is what lets two spellings of one average agree, and dtypes are not compared: a count is the same answer whether it arrives as an integer or a double.
ord_schema.search.nl_log#
A durable record of every question, the query it became, and how that went.
The questions people ask are the only material that can refine a translator, and a prompt, a grammar, and an eval set are guesses until real ones land against them. This module is where a question goes after it has been answered.
The log is an append-only stream of events rather than a table of rows. Three kinds
share a record_id: the ask, written here; the thumb a reader leaves; the
label a maintainer applies. They are three assertions, by three parties, at three
times, and folding them onto one mutable row would lose which was which on the day a
label contradicts a thumb.
A record is a typed envelope around an opaque payload. Identifiers, outcome, usage,
timings, and fingerprints are fields; the question, resolved, structures, and
the whole attempts list are strings. They stay strings because a model-authored
Query is recursive and differently shaped record to record, because resolved
and structures are keyed by whatever compounds and placeholders a month’s
questions named, and because a month in which everything compiled carries
"error": null throughout, where a month holding one rejection carries text.
Either way, compacting into Parquet would leave DuckDB to infer a struct from whichever
shapes a month happened to hold, and whether two such months then read back together
depends on what it can coerce: measured cases lose a field silently – the rows still
count in every aggregate while the part worth recording is unreachable – or refuse the
read outright. As strings the months reconcile by construction, and no inference is
involved. The measurements are in the ord-logbook entry “Where the question log lives”.
Results are not recorded. A translation, the SMILES its compound names resolved to, the structures its placeholders stood for, and a corpus fingerprint reproduce them, and a question that returned a hundred thousand reactions should not cost a hundred thousand rows of log.
- class ord_schema.search.nl_log.Ask(question: str, model: str, corpus_fingerprint: str, outcome: Outcome, effort: str | None = None, prompt_fingerprint: str = '', attempts: Sequence[Attempt] = (), turns: int | None = None, row_count: int | None = None, resolved: Mapping[str, str] | None=None, structures: Mapping[str, ~collections.abc.Mapping[str, str]] | None=None, declined_reason: str | None = None, error: str | None = None, answer_text: str | None = None, usage: Usage = <factory>, translate_ms: float | None = None, search_ms: float | None = None, answer_ms: float | None = None, source: str | None = None, session_id: str | None = None, record_id: str = <factory>, timestamp: str = <factory>)#
Bases:
objectOne question, and what answering it did.
- Variables:
question (str) – The question, in English.
model (str) – Which model translated.
effort (str | None) – The effort level the model was asked to think at, or None where the request left it to the model’s default. Scores, costs, and times at two levels are different measurements.
corpus_fingerprint (str) – The corpus the query ran against, so the record stays reproducible without holding the rows.
prompt_fingerprint (str) – Which translator wrote this, so a record from months ago can be told apart from one written by today’s prompt.
outcome (ord_schema.search.nl_log.Outcome) – How the question ended.
attempts (collections.abc.Sequence[ord_schema.search.nl_log.Attempt]) – Every
build_querycall, in order. Empty where the model declined without writing a query, which is how “read the question and said no” is told apart from “backed off once the compiler refused a guess”.turns (int | None) – How many times the model was asked to translate: one, or two where the first turn was handed back. More than the attempts where a turn wrote no query – a reply in prose, or a decline – so it is what says a repair ran; None where it was not counted.
row_count (int | None) – How many reactions came back, where the search ran.
resolved (collections.abc.Mapping[str, str] | None) – Each compound name the query gives, mapped to the canonical SMILES the search matched it as; empty for a query naming none, and None where no search returned. The query keeps the name and a resolver can answer differently later, so this is what reproduces the structures searched.
structures (collections.abc.Mapping[str, collections.abc.Mapping[str, str]] | None) – Each placeholder the question wrote, mapped to its
formatandtext; None where the question carried none. The attempts keep the placeholders the model wrote, so this is what reproduces the structures those stood for.declined_reason (str | None) – What the model said the grammar lacks.
error (str | None) – The failure, where one ended the ask.
answer_text (str | None) – The prose the reader saw, which is what a thumb is a verdict on.
usage (ord_schema.search.nl_log.Usage) – What the whole question cost, every model call included. More than the attempts add up to, because a turn can spend tokens without producing one: declining costs a call, and so does writing the sentence describing the result.
translate_ms (float | None) – Wall time turning the question into a query.
search_ms (float | None) – Wall time running it, or None where it never ran.
answer_ms (float | None) – Wall time writing the prose, or None where none was written. A stage that did not run is None rather than an absent field, so every record carries the same keys whatever became of the question – which is what compaction infers a Parquet schema from.
source (str | None) – Which surface the question arrived from –
"web","eval","api". A served endpoint, an eval run, and a script all write to one prefix, and nothing else in the record tells them apart: a rephrasing after a bad answer and a harness marching through a case file look alike once they are mixed. Low cardinality on purpose, so it groups.session_id (str | None) – Groups a visit, so a rephrasing reads as a correction of what came before it. Minted by the client, which decides what it spans.
record_id (str) – What a thumb and a label reference.
timestamp (str) – When the question was asked, in UTC.
- answer_ms: float | None = None#
- answer_text: str | None = None#
- corpus_fingerprint: str#
- declined_reason: str | None = None#
- effort: str | None = None#
- error: str | None = None#
- model: str#
- prompt_fingerprint: str = ''#
- question: str#
- record_id: str#
- resolved: Mapping[str, str] | None = None#
- row_count: int | None = None#
- search_ms: float | None = None#
- session_id: str | None = None#
- source: str | None = None#
- structures: Mapping[str, Mapping[str, str]] | None = None#
- timestamp: str#
- translate_ms: float | None = None#
- turns: int | None = None#
- class ord_schema.search.nl_log.Attempt(translation: dict[str, ~typing.Any], error: str | None, usage: ~ord_schema.search.nl_log.Usage = <factory>)#
Bases:
objectOne
build_querycall, and what the compiler said about it.- Variables:
translation (dict[str, Any]) – The tool input, coerced but not necessarily valid. It is held as raw JSON rather than as a
Querybecause the attempt worth recording is usually the one that failed to validate, where there is noQueryto hold.error (str | None) – Why it was rejected, or None where it was not.
usage (ord_schema.search.nl_log.Usage) – What this turn cost.
- error: str | None#
- translation: dict[str, Any]#
- class ord_schema.search.nl_log.JsonlSink(path: str | PathLike[str])#
Bases:
objectAppends records to a local file, one JSON object per line.
Needs no credentials and no network, so an eval run on a laptop is recorded, and the file reads back through the same query as the bucket.
- write(event: Mapping[str, Any]) None#
Appends one event.
- class ord_schema.search.nl_log.ObjectStore(*args, **kwargs)#
Bases:
ProtocolThe one operation an object sink needs, which a boto3 S3 client satisfies.
Taking the client rather than building one keeps this package free of an AWS dependency: a deployment passes
boto3.client("s3"), and a test passes something that records what it was handed.- put_object(*, Bucket: str, Key: str, Body: bytes) Any#
Stores one object.
- class ord_schema.search.nl_log.Outcome(value)#
Bases:
StrEnumWhat became of a question.
The first two are the ordinary endings and the rest are the error taxonomy
nlraises, one outcome each, so a failure is queryable rather than a string someone has to grep. Members are strings, so a record serializes to ordinary JSON and a reader compares against ordinary text.- ANSWERED = 'answered'#
- DECLINED = 'declined'#
- EMPTY = 'empty'#
- MALFORMED = 'malformed'#
- RATE_LIMITED = 'rate_limited'#
- REFUSED = 'refused'#
- SEARCH_FAILED = 'search_failed'#
- TIMEOUT = 'timeout'#
- UNAVAILABLE = 'unavailable'#
- UNRESOLVED_COMPOUND = 'unresolved_compound'#
- class ord_schema.search.nl_log.S3Sink(store: ObjectStore, *, bucket: str, prefix: str = 'nl-log/raw')#
Bases:
objectWrites one object per record, partitioned by date.
The caller supplies both the store and the bucket, so this holds no opinion about where a record lands and this package carries no AWS dependency.
- write(event: Mapping[str, Any]) None#
Stores one event under
<prefix>/dt=<date>/<event_id>.json.Keyed by the event rather than by the question it concerns: an ask, the thumb left on it, and a maintainer’s label all carry one
record_id, so a key built from that would have each overwrite the last and the question itself would be the one lost.The date comes from the event’s own timestamp rather than from the clock, so a record lands in the partition it belongs to even when it is written late.
- class ord_schema.search.nl_log.Sink(*args, **kwargs)#
Bases:
ProtocolSomewhere a record goes.
- write(event: Mapping[str, Any]) None#
Records one event.
- class ord_schema.search.nl_log.StdoutSink#
Bases:
objectWrites records to stdout, for a container whose logs already go somewhere.
- write(event: Mapping[str, Any]) None#
Prints one event as a single line.
- class ord_schema.search.nl_log.Thumb(value)#
Bases:
StrEnumA reader’s verdict on an answer.
- DOWN = 'down'#
- UP = 'up'#
- class ord_schema.search.nl_log.Usage(input: int = 0, output: int = 0, cache_read: int = 0, cache_creation: int = 0)#
Bases:
objectWhat one call to the model cost, in tokens.
- Variables:
input (int) – Uncached input tokens.
output (int) – Generated tokens.
cache_read (int) – Input tokens served from the cached prefix, which is most of a query’s input and a fraction of its price.
cache_creation (int) – Input tokens written into the cache.
- cache_creation: int = 0#
- cache_read: int = 0#
- input: int = 0#
- output: int = 0#
- class ord_schema.search.nl_log.Verdict(value)#
Bases:
StrEnumA maintainer’s verdict on a translation.
- CORRECT = 'correct'#
- UNCLEAR = 'unclear'#
- WRONG = 'wrong'#
- ord_schema.search.nl_log.compact(pattern: str, output: str | PathLike[str], *, redact: bool = False) int#
Rewrites a stretch of the log into one Parquet file.
One object per question keeps writing simple and reading slow: a year of them is tens of thousands of files to open. Folding a month into one is what keeps the log queryable, and it is safe only because every model-authored payload is a string – nested ones would give each month its own inferred struct, and a field of one month would then be unreachable from a read spanning both.
This writes the folded copy and leaves the objects it read where they are.
readcounts an event once however many sources carry it, so the two can be read together until whoever owns the prefix decides the raw days can go.- Parameters:
pattern – Glob of the JSON objects to fold.
output – Parquet file to write.
redact – Empty the free-text fields, keeping the outcomes, timings, usage, and fingerprints. The columns are emptied rather than dropped, so a redacted month and an unredacted one share one schema and a query spanning both binds.
- Returns:
How many events were written.
- ord_schema.search.nl_log.emit(sink: Sink | None, ask: Ask) None#
Records an ask.
- Parameters:
sink – Where the record goes; None records nothing.
ask – What happened.
- ord_schema.search.nl_log.event(ask: Ask) dict[str, Any]#
Returns the JSON-ready ask event.
- Parameters:
ask – What happened.
- Returns:
A dict of JSON primitives, the model-authored payloads among them serialized to strings. It holds nothing
readcan derive: the translation is the last attempt no error rejected, and a repair fired when there was more than one turn.attemptsis one string rather than a list of structs for the same reason a translation is: a month in which every attempt compiled writes"error": nullthroughout, and DuckDB infers the field as JSON where a month holding one rejection infers it as text. The two then refuse to read together, and a compacted month has the wrong type baked in for good.
- ord_schema.search.nl_log.label(record_id: str, verdict: Verdict | str, *, reference: Mapping[str, Any] | None = None, note: str | None = None, promoted: bool = False) dict[str, Any]#
Returns a maintainer’s verdict on a translation.
- Parameters:
record_id – The ask this judges.
verdict – A
Verdict, or the string spelling one.reference – A query that answers the question, where the translation did not. This is what an eval case needs and what a thumb cannot supply.
note – Why.
promoted – Whether this became an eval case.
- Returns:
A JSON-ready label event.
- Raises:
ValueError – If
verdictis not one of the members; seethumb.
- ord_schema.search.nl_log.new_identifier() str#
Returns a fresh identifier, as hex rather than as a dashed UUID.
DuckDB infers a column of dashed UUIDs as
UUIDand one of anything else asVARCHAR, and a read spanning both refuses to union them. Hex is 32 characters of the same randomness that no source can infer as anything but text.
- ord_schema.search.nl_log.read(*sources: str, statement: str = 'SELECT * FROM log', connection: DuckDBPyConnection | None = None) DuckDBPyRelation#
Returns the log as one relation, thumbs and labels folded onto their asks.
- Parameters:
*sources – Globs of JSON or Parquet, mixed freely, so a compacted month and the days written since read as one table.
statement – SQL over the
logview this defines.connection – DuckDB connection; an in-process one is opened if omitted.
- Returns:
One row per question, carrying
translationderived from the attempts,repairedfrom the turns, and whatever verdicts were left on it. An event read twice – through overlapping globs, or a compacted month beside the days it folded – counts once.- Raises:
ValueError – If no source was given. A caller splatting a computed list has an empty one to answer for, and the alternative is a parser error naming SQL it never wrote.
- ord_schema.search.nl_log.thumb(record_id: str, value: Thumb | str, *, comment: str | None = None, session_id: str | None = None) dict[str, Any]#
Returns a reader’s verdict on an answer.
- Parameters:
record_id – The ask this judges.
value – A
Thumb, or the string spelling one.comment – Whatever the reader wanted to add.
session_id – The visit it came from.
- Returns:
A JSON-ready thumb event.
- Raises:
ValueError – If
valueis not one of the members. The log is append-only, so a typo can be superseded but never corrected, and a verdict spelled"Down"is invisible to every query that asks for"down".
- ord_schema.search.nl_log.write(sink: Sink | None, event: Mapping[str, Any]) None#
Records one event, and never lets the log cost the answer.
Every event goes through here – the ask this module builds and the thumb or label a caller builds alike. A sink reaches a file or a network, and a reader is waiting on the question rather than on the record of it, so a failure is warned about and dropped: an optimization, never a dependency, which is the contract the search cache holds too.
- Parameters:
sink – Where the record goes; None records nothing.
event – The event to record.
ord_schema.search.placeholders#
Structures a person drew or pasted into a question, named by placeholders.
A question can carry a structure that has no usable name – a drawn product, a scaffold,
a pattern with an atom list, a transformation. The person’s interface names each one
with a placeholder, @A, written into the question, and sends the structure beside
it. The model sees each placeholder’s name and format and never its text: it writes the
name where a structure goes, and substitute() puts the text there before the
query is validated.
Substituting rather than resolving keeps the grammar unaware of placeholders. The query
that runs names its structures outright, so it can be run again as it stands; the
grammar’s own checks apply to the text; and a placeholder never reaches a name
resolver, where @A would be looked up as a compound.
- class ord_schema.search.placeholders.Placeholder(*, format: StructureFormat, text: Annotated[str, MinLen(min_length=1), MaxLen(max_length=2000)])#
Bases:
BaseModelOne structure a question names by placeholder.
The text is held to what the grammar accepts for its format, so a placeholder that exists is one a query can use.
- format: StructureFormat#
- model_config = {'extra': 'forbid', 'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- text: str#
- exception ord_schema.search.placeholders.PlaceholderError#
Bases:
ValueErrorA placeholder, or a question’s use of one, does not fit.
- class ord_schema.search.placeholders.StructureFormat(value)#
Bases:
StrEnumWhat a placeholder’s text is.
- COMPOUND_SMARTS = 'compound_smarts'#
- COMPOUND_SMILES = 'compound_smiles'#
- REACTION_SMARTS = 'reaction_smarts'#
- property label: str#
Returns the format as a person reads it, such as “compound SMILES”.
- ord_schema.search.placeholders.check(question: str, structures: Mapping[str, Placeholder]) None#
Raises unless a question and its placeholders fit each other.
- Parameters:
question – The question, in English.
structures – Each placeholder’s name, mapped to its structure.
- Raises:
PlaceholderError – If a name is not a placeholder name, there are more than
MOST_PLACEHOLDERS, the question writes a name with no structure, or a structure’s name is not in the question.
- ord_schema.search.placeholders.classify(text: str) Placeholder#
Returns a structure as a placeholder, in the format its text is written in.
A reaction is a reaction SMARTS. A molecule RDKit reads as SMILES is a compound SMILES unless it holds a wildcard, and anything else RDKit reads as SMARTS is a compound SMARTS.
- Parameters:
text – The structure.
- Returns:
The placeholder.
- Raises:
PlaceholderError – If the text is none of the three.
ValueError – If the text is longer than
MOST_CHARACTERS, or reads as a reaction the grammar refuses, such as one with too many templates on a side.
- ord_schema.search.placeholders.conceal(message: str, structures: Mapping[str, Placeholder]) str#
Returns a message with each placeholder’s quoted text written as its name.
- Parameters:
message – An error about a query that had placeholders substituted into it.
structures – Each placeholder’s name, mapped to its structure.
- Returns:
The message, with every
reprof a placeholder’s text replaced by thereprof its name.
- ord_schema.search.placeholders.describe(structures: Mapping[str, Placeholder]) str#
Returns what the model is told about a question’s placeholders.
- Parameters:
structures – Each placeholder’s name, mapped to its structure.
- Returns:
A heading and one line per placeholder naming its format, never its text; empty for a question with none.
- ord_schema.search.placeholders.dump(structures: Mapping[str, Placeholder]) dict[str, dict[str, str]] | None#
Returns a question’s placeholders as JSON-ready values, for a record of it.
- Parameters:
structures – Each placeholder’s name, mapped to its structure.
- Returns:
Each name mapped to its
formatandtext, or None for a question with no placeholders.
- ord_schema.search.placeholders.is_name(value: object) bool#
Returns whether a value is a placeholder name, such as
@A.
- ord_schema.search.placeholders.markers(question: str) set[str]#
Returns the placeholder names a question writes.
- Parameters:
question – The question, in English.
- Returns:
Each name standing alone in the text, once.
- ord_schema.search.placeholders.substitute(value: Any, structures: Mapping[str, Placeholder]) Any#
Returns a query with each placeholder replaced by its structure.
A placeholder is the whole value of a structure predicate’s
compound,smiles, orsmarts, whichever the model wrote. Its text lands in the field the predicate takes –smartsforsubstructureandreaction_smarts,smilesfor the rest – and the key the model used is removed.- Parameters:
value – A query as the model wrote it, already decoded.
structures – Each placeholder’s name, mapped to its structure.
- Returns:
A new query. One that names no placeholder comes back equal to
value.- Raises:
PlaceholderError – If a placeholder has no structure, its format is not one the predicate takes, or a name appears anywhere but as a structure slot’s whole value.
ord_schema.search.query#
A query a model can emit, and its compilation to DuckDB SQL.
A model emits one of these rather than SQL. The reason is not safety alone – bound parameters already gave that – but cost. SQL’s expensive programs cannot be enumerated, so every guard on generated SQL is a blacklist someone has to keep adding to. This grammar has one relation, no join, no recursion, and no set-returning function, so the worst program expressible in it is one pass over the corpus and a sort. Expensive queries are not discouraged here; they are unwritable.
It reaches every column the projection has, because a column is a parameter rather than part of the grammar: adding a field upstream adds a queryable column and costs nothing here.
Two things the compiler settles that SQL leaves to whoever writes it:
Quantifiers are stated, never assumed. A path crossing a repeated level is refused in a predicate unless an
existsorforallbinds it. The same intent in SQL is spelledUNNEST, which silently means “any” and multiplies the row count. AReductionis the one reading that needs no quantifier, because it names what to do with the elements instead of asking which of them match.Repeated levels compile to list lambdas, never to
UNNESTin aFROMclause – far costlier for identical answers, and the idiom every SQL tutorial teaches. A compiler cannot reach for the wrong one.
Co-membership survives, which a reaction-keyed flat table cannot express:
exists(components, A and B) is one component that is both, while
exists(components, A) and exists(components, B) is a reaction containing each.
They are different nodes rather than a subtlety of join keys.
Compounds are named, never spelled, and compared by identity rather than by spelling. A
structure predicate takes "compound": "thf" in place of a SMILES, and the executor
resolves the name through ord_schema.resolvers, so the model never writes a
structure. A comparison takes literals only: a resolved SMILES equal to a stored one as
a string means one canonicalizer spelled the two alike, which misses the same compound
drawn as another tautomer or protonation state, and which another RDKit release need
not reproduce. same_compound compares registration hashes instead.
Structure predicates – substructure, similarity, same_compound, and
same_parent – compile to a bitmap test rather than to chemistry. The chemistry runs
outside the query, against the ord_schema.artifacts.structures artifact
(ord_schema.search.execute is the driver), and the match set re-enters as a
bitmap parameter indexed by the corpus-wide ID – the projection’s structure_id plus
its file’s offset: DuckDB permits no subquery inside a lambda expression, so the element
a quantifier binds cannot semi-join a match table, but it can test one integer against
a bitmap. The compiled SQL therefore references structure_offset, a column only the
executor’s relations carry – the reactions and each pivot view it publishes, whose
rows come from every dataset and so each carry their own. A raw projection cannot answer
a structure query, which is the point: the IDs are dataset-local and only the executor
knows the offsets that make them one corpus-wide space.
- class ord_schema.search.query.Aggregate(*, over: str | None = None, where: ~types.Annotated[~ord_schema.search.query.And | ~ord_schema.search.query.Or | ~ord_schema.search.query.Not | ~ord_schema.search.query.Quantifier | ~ord_schema.search.query.Comparison | ~ord_schema.search.query.NullCheck | ~ord_schema.search.query.Substructure | ~ord_schema.search.query.Similarity | ~ord_schema.search.query.SameCompound | ~ord_schema.search.query.SameParent | ~ord_schema.search.query.ReactionSmarts, FieldInfo(annotation=NoneType, required=True, discriminator='op')] | None = None, group_by: list[str] = <factory>, measures: ~typing.Annotated[list[~ord_schema.search.query.Measure], ~annotated_types.MinLen(min_length=1)])#
Bases:
_NodeGroup the matching rows and measure each group.
group_bypaths must be scalar, so the number of groups is bounded by the values a column holds rather than by an explosion over a repeated level.Each
group_bypath is one column of the result, named by the whole path as written, and each measure is one named by itsname. No two may share a name, whatever their case.overchanges what a row is. Without it the rows are reactions, and “how many reactions are automated” is a count of them. With it the rows are the elements of one repeated level, which is what “the most common solvent” asks for: solvents are not a column of a reaction, and no grouping of reactions can name one. Paths inside are then relative to the element, as they are inside a quantifier.Two filters, because there are two things to filter. This
whereselects the elements grouped – the components that are solvents. The query’swhereselects reactions, and says which reactions’ elements are counted at all. “The most common solvents in reactions run above 350 K” needs both, and neither can say what the other says.One level, never nested, so the rows are that level’s own cardinality rather than a product: the query stays one pass and a sort, over the pivot instead of over the projection.
reaction_idis reachable as a measure path and is how a question about reactions is answered from a relation of elements – a reaction using THF twice is one reaction and two rows.- group_by: list[str]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- over: str | None#
- where: Predicate | None#
- class ord_schema.search.query.And(*, op: Literal['and'], clauses: Annotated[list[Annotated[And | Or | Not | Quantifier | Comparison | NullCheck | Substructure | Similarity | SameCompound | SameParent | ReactionSmarts, FieldInfo(annotation=NoneType, required=True, discriminator='op')]], MinLen(min_length=1)])#
Bases:
_NodeEvery clause holds.
- clauses: list[Predicate]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['and']#
- class ord_schema.search.query.Comparison(*, op: Literal['eq', 'ne', 'lt', 'le', 'gt', 'ge', 'contains', 'starts_with', 'ends_with'], path: str, value: Value)#
Bases:
_NodeA leaf compared against a literal.
A compound is never a comparison’s value. What a resolved name could be compared against is a
smiles, and equal spellings are not what makes two compounds the same;same_compoundis that question.- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['eq', 'ne', 'lt', 'le', 'gt', 'ge', 'contains', 'starts_with', 'ends_with']#
- path: str#
- class ord_schema.search.query.Compiled(sql: str, structures: tuple[~ord_schema.search.query.StructureParameter, ...]=(), limit: int | None = None, literals: dict[str, bool | int | float | str | ~datetime.date]=<factory>)#
Bases:
objectA compiled query, and the parameters its execution still needs.
structuresare predicates the caller evaluates against the structures artifact, each bound as a bitmap over corpus-wide structure IDs; a query carrying any also references theSTRUCTURE_OFFSETcolumn, so it runs only against the executor’s relation.limitis the row bound the SQL carries, which is the query’s own where it asked for one withinmax_rowsandmax_rowswhere it did not. A caller comparing it againstQuery.limitlearns whether the answer was cut short.literalsmaps a parameter name to the value the caller binds under it, already typed: a day compared against a date or timestamp column is adaterather than its spelling. No literal reachessqlas text.- limit: int | None = None#
- literals: dict[str, bool | int | float | str | date]#
- sql: str#
- structures: tuple[StructureParameter, ...] = ()#
- class ord_schema.search.query.Measure(*, fn: Literal['count', 'count_distinct', 'sum', 'avg', 'min', 'max'], path: str | Reduction | None = None, name: str)#
Bases:
_NodeOne aggregate over the matching rows.
- fn: Literal['count', 'count_distinct', 'sum', 'avg', 'min', 'max']#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str#
- class ord_schema.search.query.Not(*, op: Literal['not'], clause: And | Or | Not | Quantifier | Comparison | NullCheck | Substructure | Similarity | SameCompound | SameParent | ReactionSmarts)#
Bases:
_NodeThe clause does not hold.
- clause: Predicate#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['not']#
- class ord_schema.search.query.NullCheck(*, op: Literal['is_null', 'not_null'], path: str)#
Bases:
_NodeWhether the source recorded the leaf at all.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['is_null', 'not_null']#
- path: str#
- class ord_schema.search.query.Or(*, op: Literal['or'], clauses: Annotated[list[Annotated[And | Or | Not | Quantifier | Comparison | NullCheck | Substructure | Similarity | SameCompound | SameParent | ReactionSmarts, FieldInfo(annotation=NoneType, required=True, discriminator='op')]], MinLen(min_length=1)])#
Bases:
_NodeAt least one clause holds.
- clauses: list[Predicate]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['or']#
- class ord_schema.search.query.Order(*, key: str | Reduction, descending: bool = False)#
Bases:
_NodeHow to sort the result.
- descending: bool#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ord_schema.search.query.Quantifier(*, op: Literal['exists', 'forall'], path: str, where: And | Or | Not | Quantifier | Comparison | NullCheck | Substructure | Similarity | SameCompound | SameParent | ReactionSmarts)#
Bases:
_NodeSome, or every, element at a repeated level satisfies
where.Paths inside
whereare relative to the element bound here, which is what lets a single component be required to satisfy several conditions at once.- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['exists', 'forall']#
- path: str#
- where: Predicate#
- class ord_schema.search.query.Query(*, where: ReactionSmarts, FieldInfo(annotation=NoneType, required=True, discriminator='op')] | None = None, aggregate: Aggregate | None = None, order_by: list[Order] = <factory>, limit: Annotated[int | None, ~annotated_types.Gt(gt=0)] = None)#
Bases:
_NodeA whole query: which reactions, optionally grouped and measured.
- limit: int | None#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- where: Annotated[And | Or | Not | Quantifier | Comparison | NullCheck | Substructure | Similarity | SameCompound | SameParent | ReactionSmarts, FieldInfo(annotation=NoneType, required=True, discriminator='op')] | None#
- exception ord_schema.search.query.QueryError#
Bases:
ValueErrorA query that cannot be compiled against the projection schema.
- class ord_schema.search.query.ReactionSmarts(*, op: Literal['reaction_smarts'], smarts: str, chirality: bool = True)#
Bases:
_NodeThe reaction matches a reaction SMARTS, each template on a molecule of its own.
Each reactant template has to match an input component whose role is
REACTANT, each product template a product, and each agent template an input component in any other role. Every template has to match, and two templates on one side have to match two different molecules:C(=O)O.Nnames an acid and an amine, and a Boc-protected amine holding both groups is not that, even recorded twice. Grouping with parentheses,(C(=O)O.N), makes one template of both pieces, matched within one molecule. The RDKit cartridge’s@>accepts any one template per side, which for a two-template query returns several times the reactions the query describes. Atom maps are ignored, as@>ignores them, so this says which molecules took part and not which atoms changed.chiralityapplies to every template, as it does to asubstructure.- chirality: bool#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['reaction_smarts']#
- smarts: str#
- class ord_schema.search.query.Reduction(*, reduce: Literal['min', 'max', 'avg', 'sum', 'count'], path: str, where: Annotated[And | Or | Not | Quantifier | Comparison | NullCheck | Substructure | Similarity | SameCompound | SameParent | ReactionSmarts, FieldInfo(annotation=NoneType, required=True, discriminator='op')] | None = None)#
Bases:
_NodeOne value per reaction, reduced from a path that crosses a repeated level.
An ordering key and an aggregate’s argument both have to be scalar, which leaves “the highest-yielding reactions” unwritable: a yield lives under outcomes, products, and measurements, so the path resolves to a list rather than a number. This reduces that list to the one value the reaction is judged by, leaving the aggregate to combine those across reactions.
whereselects which elements are reduced, and is what separates “the highest yield” from “the highest percentage anything was measured at”: a percentage is recorded for selectivity and purity too, so a reduction over the bare path answers a broader question than the one asked. Its paths are relative to the element, as they are inside a quantifier, and the element is the deepest repeated level the path crosses – foroutcomes.products.measurements.percentage.valuethat is a measurement, sotypethere means the measurement’s own.- Variables:
reduce (Literal['min', 'max', 'avg', 'sum', 'count']) – How to reduce the list.
countcounts the values that are present.path (str) – A dotted path crossing at least one repeated level.
where (Predicate | None) – Selects the elements to reduce; all of them when absent.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- path: str#
- reduce: Literal['min', 'max', 'avg', 'sum', 'count']#
- where: Predicate | None#
- class ord_schema.search.query.SameCompound(*, op: Literal['same_compound'], path: str, smiles: str | None = None, compound: Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A compound's name, resolved to a structure when the query runs. Any printable text with no whitespace around it.", metadata=[MinLen(min_length=1), MaxLen(max_length=500)]), AfterValidator(func=_compound_name)] | None = None)#
Bases:
_NodeThe element’s structure is the same compound, however either was drawn.
An
eqon asmilescompares spellings, and two drawings of one reagent are unequal: acetic acid and acetate, an amine and its ammonium, a 2-pyridone and its 2-hydroxypyridine tautomer. This compares themol_hashthe structures artifact derives, which ignores protonation state, tautomer, and atom-map labels, so those match. Fragments and stereochemistry are not ignored: sodium acetate stays distinct from acetic acid, and enantiomers from each other.pathnames a compound’ssmiles. The query is a SMILES, or a compound name resolved at execution; exactly one is given.- compound: Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A compound's name, resolved to a structure when the query runs. Any printable text with no whitespace around it.", metadata=[MinLen(min_length=1), MaxLen(max_length=500)]), AfterValidator(func=_compound_name)] | None#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['same_compound']#
- path: str#
- smiles: str | None#
- class ord_schema.search.query.SameParent(*, op: Literal['same_parent'], path: str, smiles: str | None = None, compound: Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A compound's name, resolved to a structure when the query runs. Any printable text with no whitespace around it.", metadata=[MinLen(min_length=1), MaxLen(max_length=500)]), AfterValidator(func=_compound_name)] | None = None)#
Bases:
_NodeThe element’s structure is the same compound once counterions are set aside.
What
same_compoundignores, this ignores too, and the salt a reagent was sold as besides: sodium acetate matches acetic acid, and triethylamine hydrochloride matches triethylamine. Reagents whose parents differ still differ, so sodium carbonate does not match sodium acetate; reagents that are the salt are left whole, so sodium hydride does not match hydrogen and palladium acetate does not match acetic acid.It is the looser question of the two, and the looseness is the point: sodium and potassium carbonate share a parent and match here, which is right for “which reactions used carbonate” and wrong for a question about the sodium. Ask
same_compoundfor that one.Only the counterions RDKit recognizes are set aside – the halides, lithium, sodium, potassium, calcium, magnesium, and the usual acid counterions. A salt of something else, cesium carbonate among them, is left whole and matches only itself.
pathnames a compound’ssmiles. The query is a SMILES, or a compound name resolved at execution; exactly one is given.- compound: Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A compound's name, resolved to a structure when the query runs. Any printable text with no whitespace around it.", metadata=[MinLen(min_length=1), MaxLen(max_length=500)]), AfterValidator(func=_compound_name)] | None#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['same_parent']#
- path: str#
- smiles: str | None#
- class ord_schema.search.query.Similarity(*, op: Literal['similarity'], path: str, smiles: str | None = None, compound: Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A compound's name, resolved to a structure when the query runs. Any printable text with no whitespace around it.", metadata=[MinLen(min_length=1), MaxLen(max_length=500)]), AfterValidator(func=_compound_name)] | None = None, threshold: Annotated[float, Gt(gt=0), Le(le=1)])#
Bases:
_NodeThe element’s structure is Tanimoto-similar to the query molecule.
Similarity is defined on the Morgan fingerprints in the structures artifact, so the screen is the whole answer and no verification step exists.
pathnames a compound’ssmiles. The query is a SMILES, or a compound name resolved at execution; exactly one is given.- compound: Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A compound's name, resolved to a structure when the query runs. Any printable text with no whitespace around it.", metadata=[MinLen(min_length=1), MaxLen(max_length=500)]), AfterValidator(func=_compound_name)] | None#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['similarity']#
- path: str#
- smiles: str | None#
- threshold: float#
- class ord_schema.search.query.StructureParameter(name: str, op: str, pattern: str | None, compound: str | None, threshold: float | None, chirality: bool = False)#
Bases:
objectA structure predicate the executor evaluates and binds as a bitmap.
Exactly one of
patternandcompoundis set.patternis a SMARTS for a substructure predicate and a SMILES for a similarity one, already validated;compoundis a name still to be resolved at execution.chiralityis a substructure predicate’s, and False for every other kind, which has no use for it.- chirality: bool = False#
- compound: str | None#
- name: str#
- op: str#
- pattern: str | None#
- threshold: float | None#
- class ord_schema.search.query.Substructure(*, op: Literal['substructure'], path: str, smarts: str | None = None, compound: Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A compound's name, resolved to a structure when the query runs. Any printable text with no whitespace around it.", metadata=[MinLen(min_length=1), MaxLen(max_length=500)]), AfterValidator(func=_compound_name)] | None = None, chirality: bool = True)#
Bases:
_NodeThe element’s structure contains the query as a subgraph.
pathnames a compound’ssmiles. The query is a SMARTS pattern, or a compound name resolved to a molecule at execution; exactly one is given.A stereocenter drawn in the query is respected, as RDKit respects it: a pattern drawn as one enantiomer matches that enantiomer, not its mirror image or the same molecule recorded without stereo.
chiralityfalse ignores stereocenters, for a question about the molecule whatever its configuration. A query with no stereocenters matches the same structures either way.CXSMILES stereo groups count too. A structure recorded as a racemate (
&) or as an unknown single enantiomer (o) matches a pattern drawn as either enantiomer, and a pattern drawn as a racemate matches only racemates.- chirality: bool#
- compound: Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A compound's name, resolved to a structure when the query runs. Any printable text with no whitespace around it.", metadata=[MinLen(min_length=1), MaxLen(max_length=500)]), AfterValidator(func=_compound_name)] | None#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- op: Literal['substructure']#
- path: str#
- smarts: str | None#
- class ord_schema.search.query.Value(*, literal: bool | int | float | str)#
Bases:
_NodeA comparison operand: a literal, bound as a parameter of its own type.
- literal: bool | int | float | str#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ord_schema.search.query.compile_query(query: ~ord_schema.search.query.Query, *, schema: ~pyarrow.lib.Schema = smiles: string identifiers: list<item: struct<type: string, details: string, value: string, is_mapped: bool>> child 0, item: struct<type: string, details: string, value: string, is_mapped: bool> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,REACTION_SMILES,REACTION_CXSMILES,RDF' + 24 child 1, details: string child 2, value: string child 3, is_mapped: bool inputs: map<string, struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: (... 2062 chars omitted) child 0, entries: struct<key: string not null, value: struct<components: list<item: struct<smiles: string, structure_i (... 2086 chars omitted) not null child 0, key: string not null child 1, value: struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: s (... 2049 chars omitted) child 0, components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 1105 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC' + 117 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORK' + 70 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED,DRI' + 14 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,N' + 98 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the times' + 4 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 1, crude_components: list<item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: stru (... 292 chars omitted) child 0, item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: struct<mass_gra (... 280 chars omitted) child 0, reaction_id: string child 1, includes_workup: bool child 2, has_derived_amount: bool child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 2, addition_order: int32 child 3, addition_time_seconds: double child 4, addition_time_precision_seconds: double child 5, addition_speed: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,ALL_AT_ONCE,FAST,SLOW,DROPWISE,CONTINUOU' + 13 child 1, details: string child 6, addition_duration_seconds: double child 7, addition_duration_precision_seconds: double child 8, flow_rate_milliliters_per_minute: double child 9, flow_rate_precision_milliliters_per_minute: double child 10, addition_device: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,SYRINGE,CANNULA,ADDITION_FUN' + 83 child 1, details: string child 11, addition_temperature_kelvin: double child 12, addition_temperature_precision_kelvin: double child 13, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SOLI' + 38 child 1, details: string setup: struct<vessel: struct<type: string, details: string, material: struct<type: string, details: string> (... 524 chars omitted) child 0, vessel: struct<type: string, details: string, material: struct<type: string, details: string>, preparations: (... 234 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,ROUND_BOTTOM_FLASK,VIAL,WELL_PLATE,MI' + 130 child 1, details: string child 2, material: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,GLASS,POLYPROPYLENE,PLASTIC,METAL,Q' + 5 child 1, details: string child 3, preparations: list<item: struct<type: string, details: string>> child 0, item: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,OVEN_DRIED,FLAME_DRIED,EVACU' + 22 child 1, details: string child 4, attachments: list<item: struct<type: string, details: string>> child 0, item: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,NONE,CUSTOM,SEPTUM,CAP,MAT,REFLUX_CONDEN' + 146 child 1, details: string child 5, volume_liters: double child 6, volume_precision_liters: double child 7, vessel_id: string child 8, position: string child 9, row: string child 10, col: string child 1, is_automated: bool child 2, automation_platform: string child 3, automation_code: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 4, environment: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,FUME_HOOD,BENCH_TOP,GLOVE_BOX,GLOVE_B' + 2 child 1, details: string conditions: struct<temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, (... 1761 chars omitted) child 0, temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, setpoint_precision_k (... 199 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,OIL_BATH,WATER_BATH,SAND_BA' + 77 child 1, details: string child 1, setpoint_kelvin: double child 2, setpoint_precision_kelvin: double child 3, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 69 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, temperat (... 57 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,THERMOCOUPLE_INTERNAL,THERMOCOUPL' + 19 child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, temperature_kelvin: double child 5, temperature_precision_kelvin: double child 1, pressure: struct<control: struct<type: string, details: string>, setpoint_kilopascals: double, setpoint_precis (... 264 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,SLIGHT_POSITIVE,SEALED,PRES' + 7 child 1, details: string child 1, setpoint_kilopascals: double child 2, setpoint_precision_kilopascals: double child 3, atmosphere: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AIR,NITROGEN,ARGON,OXYGEN,HYDROGEN,' + 71 child 1, details: string child 4, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 73 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, pressure (... 61 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,PRESSURE_TRANSDUCER' child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, pressure_kilopascals: double child 5, pressure_precision_kilopascals: double child 2, stirring: struct<type: string, details: string, rate: struct<type: string, details: string, rpm: int32>> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,STIR_BAR,OVERHEAD_MIXER,AGITATIO' + 25 child 1, details: string child 2, rate: struct<type: string, details: string, rpm: int32> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,HIGH,MEDIUM,LOW' child 1, details: string child 2, rpm: int32 child 3, illumination: struct<type: string, details: string, peak_wavelength_nanometers: double, peak_wavelength_precision_ (... 124 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,DARK,LED,HALOGEN_LAMP,DEUTERI' + 38 child 1, details: string child 2, peak_wavelength_nanometers: double child 3, peak_wavelength_precision_nanometers: double child 4, color: string child 5, distance_to_vessel_centimeters: double child 6, distance_to_vessel_precision_centimeters: double child 4, electrochemistry: struct<type: string, details: string, current_amperes: double, current_precision_amperes: double, vo (... 446 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,CONSTANT_CURRENT,CONSTANT_VOLTAGE' child 1, details: string child 2, current_amperes: double child 3, current_precision_amperes: double child 4, voltage_volts: double child 5, voltage_precision_volts: double child 6, anode_material: string child 7, cathode_material: string child 8, electrode_separation_centimeters: double child 9, electrode_separation_precision_centimeters: double child 10, measurements: list<item: struct<time_seconds: double, time_precision_seconds: double, current_amperes: double, cur (... 88 chars omitted) child 0, item: struct<time_seconds: double, time_precision_seconds: double, current_amperes: double, current_precis (... 76 chars omitted) child 0, time_seconds: double child 1, time_precision_seconds: double child 2, current_amperes: double child 3, current_precision_amperes: double child 4, voltage_volts: double child 5, voltage_precision_volts: double child 11, cell: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,DIVIDED_CELL,UNDIVIDED_CELL' child 1, details: string child 5, flow: struct<type: string, details: string, pump_type: string, tubing: struct<type: string, details: strin (... 73 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,PLUG_FLOW_REACTOR,CONTINUOUS_STIRRED_' + 31 child 1, details: string child 2, pump_type: string child 3, tubing: struct<type: string, details: string, diameter_centimeters: double, diameter_precision_centimeters: (... 7 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,STEEL,COPPER,PFA,FEP,TEFLONAF,PTFE,' + 25 child 1, details: string child 2, diameter_centimeters: double child 3, diameter_precision_centimeters: double child 6, reflux: bool child 7, ph: float child 8, conditions_are_dynamic: bool child 9, details: string notes: struct<is_heterogeneous: bool, forms_precipitate: bool, is_exothermic: bool, offgasses: bool, is_sen (... 133 chars omitted) child 0, is_heterogeneous: bool child 1, forms_precipitate: bool child 2, is_exothermic: bool child 3, offgasses: bool child 4, is_sensitive_to_moisture: bool child 5, is_sensitive_to_oxygen: bool child 6, is_sensitive_to_light: bool child 7, safety_notes: string child 8, procedure_details: string observations: list<item: struct<time_seconds: double, time_precision_seconds: double, comment: string, image: stru (... 139 chars omitted) child 0, item: struct<time_seconds: double, time_precision_seconds: double, comment: string, image: struct<float_va (... 127 chars omitted) child 0, time_seconds: double child 1, time_precision_seconds: double child 2, comment: string child 3, image: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string workups: list<item: struct<type: string, details: string, duration_seconds: double, duration_precision_second (... 2903 chars omitted) child 0, item: struct<type: string, details: string, duration_seconds: double, duration_precision_seconds: double, (... 2891 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,ADDITION,ALIQUOT,TEMPERATURE,CONCENTR' + 166 child 1, details: string child 2, duration_seconds: double child 3, duration_precision_seconds: double child 4, input: struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: s (... 2049 chars omitted) child 0, components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 1105 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC' + 117 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORK' + 70 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED,DRI' + 14 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,N' + 98 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the times' + 4 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 1, crude_components: list<item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: stru (... 292 chars omitted) child 0, item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: struct<mass_gra (... 280 chars omitted) child 0, reaction_id: string child 1, includes_workup: bool child 2, has_derived_amount: bool child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 2, addition_order: int32 child 3, addition_time_seconds: double child 4, addition_time_precision_seconds: double child 5, addition_speed: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,ALL_AT_ONCE,FAST,SLOW,DROPWISE,CONTINUOU' + 13 child 1, details: string child 6, addition_duration_seconds: double child 7, addition_duration_precision_seconds: double child 8, flow_rate_milliliters_per_minute: double child 9, flow_rate_precision_milliliters_per_minute: double child 10, addition_device: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,SYRINGE,CANNULA,ADDITION_FUN' + 83 child 1, details: string child 11, addition_temperature_kelvin: double child 12, addition_temperature_precision_kelvin: double child 13, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SOLI' + 38 child 1, details: string child 5, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATED' child 1, details: string child 7, volume_includes_solutes: bool child 6, temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, setpoint_precision_k (... 199 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,OIL_BATH,WATER_BATH,SAND_' + 79 child 1, details: string child 1, setpoint_kelvin: double child 2, setpoint_precision_kelvin: double child 3, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 69 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, temperat (... 57 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,THERMOCOUPLE_INTERNAL,THERMOCOU' + 21 child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, temperature_kelvin: double child 5, temperature_precision_kelvin: double child 7, keep_phase: string child 8, stirring: struct<type: string, details: string, rate: struct<type: string, details: string, rpm: int32>> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,STIR_BAR,OVERHEAD_MIXER,AGITAT' + 27 child 1, details: string child 2, rate: struct<type: string, details: string, rpm: int32> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,HIGH,MEDIUM,LOW' child 1, details: string child 2, rpm: int32 child 9, target_ph: float child 10, is_automated: bool outcomes: list<item: struct<reaction_time_seconds: double, reaction_time_precision_seconds: double, conversion (... 2983 chars omitted) child 0, item: struct<reaction_time_seconds: double, reaction_time_precision_seconds: double, conversion: struct<va (... 2971 chars omitted) child 0, reaction_time_seconds: double child 1, reaction_time_precision_seconds: double child 2, conversion: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 3, products: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 2422 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 2410 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC_N' + 115 child 1, details: string child 2, value: string child 3, is_desired_product: bool child 4, measurements: list<item: struct<analysis_key: string, type: string, details: string, uses_internal_standard: bool, (... 1984 chars omitted) child 0, item: struct<analysis_key: string, type: string, details: string, uses_internal_standard: bool, is_normali (... 1972 chars omitted) child 0, analysis_key: string child 1, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,IDENTITY,YIELD,SELECTIVITY,PU' + 33 child 2, details: string child 3, uses_internal_standard: bool child 4, is_normalized: bool child 5, uses_authentic_standard: bool child 6, authentic_standard: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,I' + 121 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TIT' + 5 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,' + 74 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED' + 18 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_1' + 102 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the t' + 8 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPH' + 46 child 1, details: string child 7, percentage: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 8, float_value: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 9, string_value: string child 10, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRA' + 3 child 1, details: string child 7, volume_includes_solutes: bool child 11, retention_time_seconds: double child 12, retention_time_precision_seconds: double child 13, mass_spec_details: struct<type: string, details: string, tic_minimum_mz: float, tic_maximum_mz: float, eic_masses: list (... 14 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,TIC,TIC_POSITIVE,TIC_NEGATI' + 6 child 1, details: string child 2, tic_minimum_mz: float child 3, tic_maximum_mz: float child 4, eic_masses: list<item: float> child 0, item: float child 14, selectivity: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,EE,ER,DR,EZ,ZE' child 1, details: string child 15, wavelength_nanometers: double child 16, wavelength_precision_nanometers: double child 5, isolated_color: string child 6, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SO' + 40 child 1, details: string child 7, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 8, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORKUP' + 68 child 4, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,NMR_OTH' + 92 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' provenance: struct<experimenter: struct<username: string, name: string, orcid: string, organization: string, ema (... 824 chars omitted) child 0, experimenter: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 1, city: string child 2, experiment_start: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 3, doi: string child 4, patent: string child 5, publication_url: string child 6, record_created: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, person: str (... 105 chars omitted) child 0, time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 1, person: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 2, details: string child 7, record_modified: list<item: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, (... 117 chars omitted) child 0, item: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, person: str (... 105 chars omitted) child 0, time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 1, person: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 2, details: string child 8, reaction_metadata: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, is_mined: bool reaction_id: string dataset_id: string first_commit: struct<sha: string, timestamp: timestamp[us], utc_offset_minutes: int16, dataset_id: string> child 0, sha: string child 1, timestamp: timestamp[us] child 2, utc_offset_minutes: int16 child 3, dataset_id: string, table: str = 'reactions', index: ~collections.abc.Callable[[str, ~collections.abc.Callable[[], str]], str | None] | None = None, pivot: ~collections.abc.Callable[[str], str | None] | None = None, history: str | None = 'arrivals', max_rows: int | None = None) Compiled#
Compiles a query to DuckDB SQL over the projection.
- Parameters:
query – The query to compile.
schema – Schema to resolve paths against;
SCHEMAby default.table – Relation name to read. Held to an identifier, because it reaches the SQL as text: a caller passing
"reactions, range(1000000000)"would otherwise get a cross join theQuerynever asked for, and the single-relation cost bound this grammar exists to provide would hold only by convention.index – An element index to spend where it can answer a quantifier; see
ElementIndex. Without one, every quantifier compiles to a filter over the elements, which is what the projection alone can answer.pivot – Pivoted levels to spend where they can answer a quantifier; see
PivotIndex. Consulted afterindex, and forforallas well asexists.history – Relation holding each reaction’s first commit, keyed by
reaction_id;HISTORY_TABLEby default. It has to hold one row for each reaction intableand no other, with no field offirst_commitNULL: anotover a NULL holds of the reaction through a semi-join and not on a row carrying it, so the routes would disagree. Read only by a query namingfirst_commit: one reading nothing besidesreaction_idreads it alone; otherwise a filter on it is a semi-join, and grouping, measuring, or ordering by it joins it totable. None refuses such a query.max_rows – Most rows the SQL may return, applied whether or not the query asked for a limit and clamping one that asks for more. The grammar leaves
limitoptional, and a query without one returns every matching reaction – potentially the whole corpus, materialized in whatever process is executing. A caller serving queries it did not write wants this set; None leaves the query’s own limit, or none, exactly as stated. It bounds an aggregated query’s groups, where a truncated answer is an arbitrary part of a distribution rather than a sample of the matching reactions;Corpus.searchsays so when one comes back full.
- Returns:
The SQL, the structure predicates the caller evaluates and binds as bitmaps, and the literal values the caller binds as they are.
- Raises:
QueryError – If
tableis not an identifier, or if any path, operator, or ordering key cannot be meant against the schema.ValueError – If
max_rowsis less than one, which is a bound no query can satisfy rather than a small one.
- ord_schema.search.query.executable_schema(schema: Schema | None = None) Schema#
Returns the schema of the relation a compiled query runs against.
The executor’s relation is
TABLE_SCHEMAplusSTRUCTURE_OFFSET, so validating compiled SQL (ord_schema.search.sql.validate()) needs this schema whenever the query carries a structure predicate;TABLE_SCHEMAalone cannot bind it.- Parameters:
schema – Base schema;
TABLE_SCHEMAby default.- Returns:
The base schema with the offset column appended.
- ord_schema.search.query.queried_type(leaf: DataType) DataType#
Returns the type a query reads a leaf as: its day for a timestamp, else itself.
Each timestamp is the wall clock its source wrote, in whatever zone it wrote it:
utc_offset_minutesbeside it names that zone only where the record did, and sources write in many zones, so comparing them finer than a day would order times that were never on one clock.resolvecasts to this type, andord_schema.search.schema.describe()names it, so a model is told the type its query compares.- Parameters:
leaf – The type a path reaches in the schema.
- Returns:
date32for a timestamp;leafunchanged for anything else.
- ord_schema.search.query.resolve(path: str, *, schema: ~pyarrow.lib.Schema = smiles: string identifiers: list<item: struct<type: string, details: string, value: string, is_mapped: bool>> child 0, item: struct<type: string, details: string, value: string, is_mapped: bool> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,REACTION_SMILES,REACTION_CXSMILES,RDF' + 24 child 1, details: string child 2, value: string child 3, is_mapped: bool inputs: map<string, struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: (... 2062 chars omitted) child 0, entries: struct<key: string not null, value: struct<components: list<item: struct<smiles: string, structure_i (... 2086 chars omitted) not null child 0, key: string not null child 1, value: struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: s (... 2049 chars omitted) child 0, components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 1105 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC' + 117 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORK' + 70 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED,DRI' + 14 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,N' + 98 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the times' + 4 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 1, crude_components: list<item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: stru (... 292 chars omitted) child 0, item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: struct<mass_gra (... 280 chars omitted) child 0, reaction_id: string child 1, includes_workup: bool child 2, has_derived_amount: bool child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 2, addition_order: int32 child 3, addition_time_seconds: double child 4, addition_time_precision_seconds: double child 5, addition_speed: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,ALL_AT_ONCE,FAST,SLOW,DROPWISE,CONTINUOU' + 13 child 1, details: string child 6, addition_duration_seconds: double child 7, addition_duration_precision_seconds: double child 8, flow_rate_milliliters_per_minute: double child 9, flow_rate_precision_milliliters_per_minute: double child 10, addition_device: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,SYRINGE,CANNULA,ADDITION_FUN' + 83 child 1, details: string child 11, addition_temperature_kelvin: double child 12, addition_temperature_precision_kelvin: double child 13, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SOLI' + 38 child 1, details: string setup: struct<vessel: struct<type: string, details: string, material: struct<type: string, details: string> (... 524 chars omitted) child 0, vessel: struct<type: string, details: string, material: struct<type: string, details: string>, preparations: (... 234 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,ROUND_BOTTOM_FLASK,VIAL,WELL_PLATE,MI' + 130 child 1, details: string child 2, material: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,GLASS,POLYPROPYLENE,PLASTIC,METAL,Q' + 5 child 1, details: string child 3, preparations: list<item: struct<type: string, details: string>> child 0, item: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,OVEN_DRIED,FLAME_DRIED,EVACU' + 22 child 1, details: string child 4, attachments: list<item: struct<type: string, details: string>> child 0, item: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,NONE,CUSTOM,SEPTUM,CAP,MAT,REFLUX_CONDEN' + 146 child 1, details: string child 5, volume_liters: double child 6, volume_precision_liters: double child 7, vessel_id: string child 8, position: string child 9, row: string child 10, col: string child 1, is_automated: bool child 2, automation_platform: string child 3, automation_code: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 4, environment: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,FUME_HOOD,BENCH_TOP,GLOVE_BOX,GLOVE_B' + 2 child 1, details: string conditions: struct<temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, (... 1761 chars omitted) child 0, temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, setpoint_precision_k (... 199 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,OIL_BATH,WATER_BATH,SAND_BA' + 77 child 1, details: string child 1, setpoint_kelvin: double child 2, setpoint_precision_kelvin: double child 3, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 69 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, temperat (... 57 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,THERMOCOUPLE_INTERNAL,THERMOCOUPL' + 19 child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, temperature_kelvin: double child 5, temperature_precision_kelvin: double child 1, pressure: struct<control: struct<type: string, details: string>, setpoint_kilopascals: double, setpoint_precis (... 264 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,SLIGHT_POSITIVE,SEALED,PRES' + 7 child 1, details: string child 1, setpoint_kilopascals: double child 2, setpoint_precision_kilopascals: double child 3, atmosphere: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AIR,NITROGEN,ARGON,OXYGEN,HYDROGEN,' + 71 child 1, details: string child 4, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 73 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, pressure (... 61 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,PRESSURE_TRANSDUCER' child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, pressure_kilopascals: double child 5, pressure_precision_kilopascals: double child 2, stirring: struct<type: string, details: string, rate: struct<type: string, details: string, rpm: int32>> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,STIR_BAR,OVERHEAD_MIXER,AGITATIO' + 25 child 1, details: string child 2, rate: struct<type: string, details: string, rpm: int32> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,HIGH,MEDIUM,LOW' child 1, details: string child 2, rpm: int32 child 3, illumination: struct<type: string, details: string, peak_wavelength_nanometers: double, peak_wavelength_precision_ (... 124 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,DARK,LED,HALOGEN_LAMP,DEUTERI' + 38 child 1, details: string child 2, peak_wavelength_nanometers: double child 3, peak_wavelength_precision_nanometers: double child 4, color: string child 5, distance_to_vessel_centimeters: double child 6, distance_to_vessel_precision_centimeters: double child 4, electrochemistry: struct<type: string, details: string, current_amperes: double, current_precision_amperes: double, vo (... 446 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,CONSTANT_CURRENT,CONSTANT_VOLTAGE' child 1, details: string child 2, current_amperes: double child 3, current_precision_amperes: double child 4, voltage_volts: double child 5, voltage_precision_volts: double child 6, anode_material: string child 7, cathode_material: string child 8, electrode_separation_centimeters: double child 9, electrode_separation_precision_centimeters: double child 10, measurements: list<item: struct<time_seconds: double, time_precision_seconds: double, current_amperes: double, cur (... 88 chars omitted) child 0, item: struct<time_seconds: double, time_precision_seconds: double, current_amperes: double, current_precis (... 76 chars omitted) child 0, time_seconds: double child 1, time_precision_seconds: double child 2, current_amperes: double child 3, current_precision_amperes: double child 4, voltage_volts: double child 5, voltage_precision_volts: double child 11, cell: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,DIVIDED_CELL,UNDIVIDED_CELL' child 1, details: string child 5, flow: struct<type: string, details: string, pump_type: string, tubing: struct<type: string, details: strin (... 73 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,PLUG_FLOW_REACTOR,CONTINUOUS_STIRRED_' + 31 child 1, details: string child 2, pump_type: string child 3, tubing: struct<type: string, details: string, diameter_centimeters: double, diameter_precision_centimeters: (... 7 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,STEEL,COPPER,PFA,FEP,TEFLONAF,PTFE,' + 25 child 1, details: string child 2, diameter_centimeters: double child 3, diameter_precision_centimeters: double child 6, reflux: bool child 7, ph: float child 8, conditions_are_dynamic: bool child 9, details: string notes: struct<is_heterogeneous: bool, forms_precipitate: bool, is_exothermic: bool, offgasses: bool, is_sen (... 133 chars omitted) child 0, is_heterogeneous: bool child 1, forms_precipitate: bool child 2, is_exothermic: bool child 3, offgasses: bool child 4, is_sensitive_to_moisture: bool child 5, is_sensitive_to_oxygen: bool child 6, is_sensitive_to_light: bool child 7, safety_notes: string child 8, procedure_details: string observations: list<item: struct<time_seconds: double, time_precision_seconds: double, comment: string, image: stru (... 139 chars omitted) child 0, item: struct<time_seconds: double, time_precision_seconds: double, comment: string, image: struct<float_va (... 127 chars omitted) child 0, time_seconds: double child 1, time_precision_seconds: double child 2, comment: string child 3, image: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string workups: list<item: struct<type: string, details: string, duration_seconds: double, duration_precision_second (... 2903 chars omitted) child 0, item: struct<type: string, details: string, duration_seconds: double, duration_precision_seconds: double, (... 2891 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,ADDITION,ALIQUOT,TEMPERATURE,CONCENTR' + 166 child 1, details: string child 2, duration_seconds: double child 3, duration_precision_seconds: double child 4, input: struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: s (... 2049 chars omitted) child 0, components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 1105 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC' + 117 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORK' + 70 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED,DRI' + 14 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,N' + 98 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the times' + 4 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 1, crude_components: list<item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: stru (... 292 chars omitted) child 0, item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: struct<mass_gra (... 280 chars omitted) child 0, reaction_id: string child 1, includes_workup: bool child 2, has_derived_amount: bool child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 2, addition_order: int32 child 3, addition_time_seconds: double child 4, addition_time_precision_seconds: double child 5, addition_speed: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,ALL_AT_ONCE,FAST,SLOW,DROPWISE,CONTINUOU' + 13 child 1, details: string child 6, addition_duration_seconds: double child 7, addition_duration_precision_seconds: double child 8, flow_rate_milliliters_per_minute: double child 9, flow_rate_precision_milliliters_per_minute: double child 10, addition_device: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,SYRINGE,CANNULA,ADDITION_FUN' + 83 child 1, details: string child 11, addition_temperature_kelvin: double child 12, addition_temperature_precision_kelvin: double child 13, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SOLI' + 38 child 1, details: string child 5, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATED' child 1, details: string child 7, volume_includes_solutes: bool child 6, temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, setpoint_precision_k (... 199 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,OIL_BATH,WATER_BATH,SAND_' + 79 child 1, details: string child 1, setpoint_kelvin: double child 2, setpoint_precision_kelvin: double child 3, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 69 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, temperat (... 57 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,THERMOCOUPLE_INTERNAL,THERMOCOU' + 21 child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, temperature_kelvin: double child 5, temperature_precision_kelvin: double child 7, keep_phase: string child 8, stirring: struct<type: string, details: string, rate: struct<type: string, details: string, rpm: int32>> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,STIR_BAR,OVERHEAD_MIXER,AGITAT' + 27 child 1, details: string child 2, rate: struct<type: string, details: string, rpm: int32> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,HIGH,MEDIUM,LOW' child 1, details: string child 2, rpm: int32 child 9, target_ph: float child 10, is_automated: bool outcomes: list<item: struct<reaction_time_seconds: double, reaction_time_precision_seconds: double, conversion (... 2983 chars omitted) child 0, item: struct<reaction_time_seconds: double, reaction_time_precision_seconds: double, conversion: struct<va (... 2971 chars omitted) child 0, reaction_time_seconds: double child 1, reaction_time_precision_seconds: double child 2, conversion: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 3, products: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 2422 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 2410 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC_N' + 115 child 1, details: string child 2, value: string child 3, is_desired_product: bool child 4, measurements: list<item: struct<analysis_key: string, type: string, details: string, uses_internal_standard: bool, (... 1984 chars omitted) child 0, item: struct<analysis_key: string, type: string, details: string, uses_internal_standard: bool, is_normali (... 1972 chars omitted) child 0, analysis_key: string child 1, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,IDENTITY,YIELD,SELECTIVITY,PU' + 33 child 2, details: string child 3, uses_internal_standard: bool child 4, is_normalized: bool child 5, uses_authentic_standard: bool child 6, authentic_standard: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,I' + 121 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TIT' + 5 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,' + 74 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED' + 18 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_1' + 102 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the t' + 8 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPH' + 46 child 1, details: string child 7, percentage: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 8, float_value: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 9, string_value: string child 10, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRA' + 3 child 1, details: string child 7, volume_includes_solutes: bool child 11, retention_time_seconds: double child 12, retention_time_precision_seconds: double child 13, mass_spec_details: struct<type: string, details: string, tic_minimum_mz: float, tic_maximum_mz: float, eic_masses: list (... 14 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,TIC,TIC_POSITIVE,TIC_NEGATI' + 6 child 1, details: string child 2, tic_minimum_mz: float child 3, tic_maximum_mz: float child 4, eic_masses: list<item: float> child 0, item: float child 14, selectivity: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,EE,ER,DR,EZ,ZE' child 1, details: string child 15, wavelength_nanometers: double child 16, wavelength_precision_nanometers: double child 5, isolated_color: string child 6, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SO' + 40 child 1, details: string child 7, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 8, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORKUP' + 68 child 4, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,NMR_OTH' + 92 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' provenance: struct<experimenter: struct<username: string, name: string, orcid: string, organization: string, ema (... 824 chars omitted) child 0, experimenter: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 1, city: string child 2, experiment_start: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 3, doi: string child 4, patent: string child 5, publication_url: string child 6, record_created: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, person: str (... 105 chars omitted) child 0, time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 1, person: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 2, details: string child 7, record_modified: list<item: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, (... 117 chars omitted) child 0, item: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, person: str (... 105 chars omitted) child 0, time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 1, person: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 2, details: string child 8, reaction_metadata: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, is_mined: bool reaction_id: string dataset_id: string first_commit: struct<sha: string, timestamp: timestamp[us], utc_offset_minutes: int16, dataset_id: string> child 0, sha: string child 1, timestamp: timestamp[us] child 2, utc_offset_minutes: int16 child 3, dataset_id: string, root: str | None = None, allow_internal: bool = False) _Resolved#
Resolves a dotted path against the relation a query reads.
Descending through a repeated level turns the expression into a list of the elements beneath it, so the caller can tell a scalar it may compare from a level it must quantify over.
A leaf resolves to its
queried_type, cast where that differs: a timestamp to itsDATE, so every clause reading one – a comparison, a reduction, a measure, a group, an ordering – works by day.- Parameters:
path – Dotted column path, e.g.
conditions.temperature.setpoint_kelvin.schema – Schema or struct type to resolve within.
root – Bound variable the path is relative to, inside a quantifier.
allow_internal – Permit internal columns. Library-internal: the compiler reaches
structure_idthis way; a model-supplied path never sets it.
- Returns:
The DuckDB expression, whether it evaluates to a list, and the type it reaches as
queried_typereads it.- Raises:
QueryError – If the path is empty or names a field the schema does not hold.
ord_schema.search.schema#
The projection schema, rendered for a model that has to write SQL against it.
A model cannot query columns it has not been told about, so the whole schema goes in the prompt. It is small enough to fit whole, which is why translation can stay a single forced tool call instead of a retrieval loop over column metadata.
An enum projects as its value name, so each enum column carries its members beside it. Without them a model has the column and no way to learn the spelling it must compare against, which is a guess it will sometimes get wrong silently. They are read from the field’s own metadata, so this stays a rendering of the schema and nothing else.
The rendering is generated from query.SCHEMA – the projection’s columns, the
dataset_id the executor supplies, and the first_commit the arrivals
artifacts hold – rather than written by hand, because the projection schema is itself
generated from the proto descriptors: a field added upstream becomes a column with
nobody deciding it should, and a hand-written description would silently fall behind
it. ord_schema.search.sql validates against the same definitions, so the columns a
model is told about and the columns its query is checked against cannot disagree.
Types are named in DuckDB’s vocabulary rather than Arrow’s, since DuckDB is the dialect
the model writes. Units are already in the column names – setpoint_kelvin,
mass_grams – so the tree carries them without a word of prose.
- ord_schema.search.schema.describe(schema: ~pyarrow.lib.Schema = smiles: string identifiers: list<item: struct<type: string, details: string, value: string, is_mapped: bool>> child 0, item: struct<type: string, details: string, value: string, is_mapped: bool> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,REACTION_SMILES,REACTION_CXSMILES,RDF' + 24 child 1, details: string child 2, value: string child 3, is_mapped: bool inputs: map<string, struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: (... 2062 chars omitted) child 0, entries: struct<key: string not null, value: struct<components: list<item: struct<smiles: string, structure_i (... 2086 chars omitted) not null child 0, key: string not null child 1, value: struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: s (... 2049 chars omitted) child 0, components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 1105 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC' + 117 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORK' + 70 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED,DRI' + 14 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,N' + 98 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the times' + 4 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 1, crude_components: list<item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: stru (... 292 chars omitted) child 0, item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: struct<mass_gra (... 280 chars omitted) child 0, reaction_id: string child 1, includes_workup: bool child 2, has_derived_amount: bool child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 2, addition_order: int32 child 3, addition_time_seconds: double child 4, addition_time_precision_seconds: double child 5, addition_speed: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,ALL_AT_ONCE,FAST,SLOW,DROPWISE,CONTINUOU' + 13 child 1, details: string child 6, addition_duration_seconds: double child 7, addition_duration_precision_seconds: double child 8, flow_rate_milliliters_per_minute: double child 9, flow_rate_precision_milliliters_per_minute: double child 10, addition_device: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,SYRINGE,CANNULA,ADDITION_FUN' + 83 child 1, details: string child 11, addition_temperature_kelvin: double child 12, addition_temperature_precision_kelvin: double child 13, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SOLI' + 38 child 1, details: string setup: struct<vessel: struct<type: string, details: string, material: struct<type: string, details: string> (... 524 chars omitted) child 0, vessel: struct<type: string, details: string, material: struct<type: string, details: string>, preparations: (... 234 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,ROUND_BOTTOM_FLASK,VIAL,WELL_PLATE,MI' + 130 child 1, details: string child 2, material: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,GLASS,POLYPROPYLENE,PLASTIC,METAL,Q' + 5 child 1, details: string child 3, preparations: list<item: struct<type: string, details: string>> child 0, item: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,OVEN_DRIED,FLAME_DRIED,EVACU' + 22 child 1, details: string child 4, attachments: list<item: struct<type: string, details: string>> child 0, item: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,NONE,CUSTOM,SEPTUM,CAP,MAT,REFLUX_CONDEN' + 146 child 1, details: string child 5, volume_liters: double child 6, volume_precision_liters: double child 7, vessel_id: string child 8, position: string child 9, row: string child 10, col: string child 1, is_automated: bool child 2, automation_platform: string child 3, automation_code: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 4, environment: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,FUME_HOOD,BENCH_TOP,GLOVE_BOX,GLOVE_B' + 2 child 1, details: string conditions: struct<temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, (... 1761 chars omitted) child 0, temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, setpoint_precision_k (... 199 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,OIL_BATH,WATER_BATH,SAND_BA' + 77 child 1, details: string child 1, setpoint_kelvin: double child 2, setpoint_precision_kelvin: double child 3, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 69 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, temperat (... 57 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,THERMOCOUPLE_INTERNAL,THERMOCOUPL' + 19 child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, temperature_kelvin: double child 5, temperature_precision_kelvin: double child 1, pressure: struct<control: struct<type: string, details: string>, setpoint_kilopascals: double, setpoint_precis (... 264 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,SLIGHT_POSITIVE,SEALED,PRES' + 7 child 1, details: string child 1, setpoint_kilopascals: double child 2, setpoint_precision_kilopascals: double child 3, atmosphere: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AIR,NITROGEN,ARGON,OXYGEN,HYDROGEN,' + 71 child 1, details: string child 4, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 73 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, pressure (... 61 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,PRESSURE_TRANSDUCER' child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, pressure_kilopascals: double child 5, pressure_precision_kilopascals: double child 2, stirring: struct<type: string, details: string, rate: struct<type: string, details: string, rpm: int32>> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,STIR_BAR,OVERHEAD_MIXER,AGITATIO' + 25 child 1, details: string child 2, rate: struct<type: string, details: string, rpm: int32> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,HIGH,MEDIUM,LOW' child 1, details: string child 2, rpm: int32 child 3, illumination: struct<type: string, details: string, peak_wavelength_nanometers: double, peak_wavelength_precision_ (... 124 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,DARK,LED,HALOGEN_LAMP,DEUTERI' + 38 child 1, details: string child 2, peak_wavelength_nanometers: double child 3, peak_wavelength_precision_nanometers: double child 4, color: string child 5, distance_to_vessel_centimeters: double child 6, distance_to_vessel_precision_centimeters: double child 4, electrochemistry: struct<type: string, details: string, current_amperes: double, current_precision_amperes: double, vo (... 446 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,CONSTANT_CURRENT,CONSTANT_VOLTAGE' child 1, details: string child 2, current_amperes: double child 3, current_precision_amperes: double child 4, voltage_volts: double child 5, voltage_precision_volts: double child 6, anode_material: string child 7, cathode_material: string child 8, electrode_separation_centimeters: double child 9, electrode_separation_precision_centimeters: double child 10, measurements: list<item: struct<time_seconds: double, time_precision_seconds: double, current_amperes: double, cur (... 88 chars omitted) child 0, item: struct<time_seconds: double, time_precision_seconds: double, current_amperes: double, current_precis (... 76 chars omitted) child 0, time_seconds: double child 1, time_precision_seconds: double child 2, current_amperes: double child 3, current_precision_amperes: double child 4, voltage_volts: double child 5, voltage_precision_volts: double child 11, cell: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,DIVIDED_CELL,UNDIVIDED_CELL' child 1, details: string child 5, flow: struct<type: string, details: string, pump_type: string, tubing: struct<type: string, details: strin (... 73 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,PLUG_FLOW_REACTOR,CONTINUOUS_STIRRED_' + 31 child 1, details: string child 2, pump_type: string child 3, tubing: struct<type: string, details: string, diameter_centimeters: double, diameter_precision_centimeters: (... 7 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,STEEL,COPPER,PFA,FEP,TEFLONAF,PTFE,' + 25 child 1, details: string child 2, diameter_centimeters: double child 3, diameter_precision_centimeters: double child 6, reflux: bool child 7, ph: float child 8, conditions_are_dynamic: bool child 9, details: string notes: struct<is_heterogeneous: bool, forms_precipitate: bool, is_exothermic: bool, offgasses: bool, is_sen (... 133 chars omitted) child 0, is_heterogeneous: bool child 1, forms_precipitate: bool child 2, is_exothermic: bool child 3, offgasses: bool child 4, is_sensitive_to_moisture: bool child 5, is_sensitive_to_oxygen: bool child 6, is_sensitive_to_light: bool child 7, safety_notes: string child 8, procedure_details: string observations: list<item: struct<time_seconds: double, time_precision_seconds: double, comment: string, image: stru (... 139 chars omitted) child 0, item: struct<time_seconds: double, time_precision_seconds: double, comment: string, image: struct<float_va (... 127 chars omitted) child 0, time_seconds: double child 1, time_precision_seconds: double child 2, comment: string child 3, image: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string workups: list<item: struct<type: string, details: string, duration_seconds: double, duration_precision_second (... 2903 chars omitted) child 0, item: struct<type: string, details: string, duration_seconds: double, duration_precision_seconds: double, (... 2891 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,ADDITION,ALIQUOT,TEMPERATURE,CONCENTR' + 166 child 1, details: string child 2, duration_seconds: double child 3, duration_precision_seconds: double child 4, input: struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: s (... 2049 chars omitted) child 0, components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 1105 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC' + 117 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORK' + 70 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED,DRI' + 14 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,N' + 98 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the times' + 4 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 1, crude_components: list<item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: stru (... 292 chars omitted) child 0, item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: struct<mass_gra (... 280 chars omitted) child 0, reaction_id: string child 1, includes_workup: bool child 2, has_derived_amount: bool child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 2, addition_order: int32 child 3, addition_time_seconds: double child 4, addition_time_precision_seconds: double child 5, addition_speed: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,ALL_AT_ONCE,FAST,SLOW,DROPWISE,CONTINUOU' + 13 child 1, details: string child 6, addition_duration_seconds: double child 7, addition_duration_precision_seconds: double child 8, flow_rate_milliliters_per_minute: double child 9, flow_rate_precision_milliliters_per_minute: double child 10, addition_device: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,SYRINGE,CANNULA,ADDITION_FUN' + 83 child 1, details: string child 11, addition_temperature_kelvin: double child 12, addition_temperature_precision_kelvin: double child 13, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SOLI' + 38 child 1, details: string child 5, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATED' child 1, details: string child 7, volume_includes_solutes: bool child 6, temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, setpoint_precision_k (... 199 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,OIL_BATH,WATER_BATH,SAND_' + 79 child 1, details: string child 1, setpoint_kelvin: double child 2, setpoint_precision_kelvin: double child 3, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 69 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, temperat (... 57 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,THERMOCOUPLE_INTERNAL,THERMOCOU' + 21 child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, temperature_kelvin: double child 5, temperature_precision_kelvin: double child 7, keep_phase: string child 8, stirring: struct<type: string, details: string, rate: struct<type: string, details: string, rpm: int32>> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,STIR_BAR,OVERHEAD_MIXER,AGITAT' + 27 child 1, details: string child 2, rate: struct<type: string, details: string, rpm: int32> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,HIGH,MEDIUM,LOW' child 1, details: string child 2, rpm: int32 child 9, target_ph: float child 10, is_automated: bool outcomes: list<item: struct<reaction_time_seconds: double, reaction_time_precision_seconds: double, conversion (... 2983 chars omitted) child 0, item: struct<reaction_time_seconds: double, reaction_time_precision_seconds: double, conversion: struct<va (... 2971 chars omitted) child 0, reaction_time_seconds: double child 1, reaction_time_precision_seconds: double child 2, conversion: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 3, products: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 2422 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 2410 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC_N' + 115 child 1, details: string child 2, value: string child 3, is_desired_product: bool child 4, measurements: list<item: struct<analysis_key: string, type: string, details: string, uses_internal_standard: bool, (... 1984 chars omitted) child 0, item: struct<analysis_key: string, type: string, details: string, uses_internal_standard: bool, is_normali (... 1972 chars omitted) child 0, analysis_key: string child 1, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,IDENTITY,YIELD,SELECTIVITY,PU' + 33 child 2, details: string child 3, uses_internal_standard: bool child 4, is_normalized: bool child 5, uses_authentic_standard: bool child 6, authentic_standard: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,I' + 121 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TIT' + 5 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,' + 74 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED' + 18 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_1' + 102 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the t' + 8 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPH' + 46 child 1, details: string child 7, percentage: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 8, float_value: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 9, string_value: string child 10, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRA' + 3 child 1, details: string child 7, volume_includes_solutes: bool child 11, retention_time_seconds: double child 12, retention_time_precision_seconds: double child 13, mass_spec_details: struct<type: string, details: string, tic_minimum_mz: float, tic_maximum_mz: float, eic_masses: list (... 14 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,TIC,TIC_POSITIVE,TIC_NEGATI' + 6 child 1, details: string child 2, tic_minimum_mz: float child 3, tic_maximum_mz: float child 4, eic_masses: list<item: float> child 0, item: float child 14, selectivity: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,EE,ER,DR,EZ,ZE' child 1, details: string child 15, wavelength_nanometers: double child 16, wavelength_precision_nanometers: double child 5, isolated_color: string child 6, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SO' + 40 child 1, details: string child 7, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 8, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORKUP' + 68 child 4, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,NMR_OTH' + 92 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' provenance: struct<experimenter: struct<username: string, name: string, orcid: string, organization: string, ema (... 824 chars omitted) child 0, experimenter: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 1, city: string child 2, experiment_start: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 3, doi: string child 4, patent: string child 5, publication_url: string child 6, record_created: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, person: str (... 105 chars omitted) child 0, time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 1, person: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 2, details: string child 7, record_modified: list<item: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, (... 117 chars omitted) child 0, item: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, person: str (... 105 chars omitted) child 0, time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 1, person: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 2, details: string child 8, reaction_metadata: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, is_mined: bool reaction_id: string dataset_id: string first_commit: struct<sha: string, timestamp: timestamp[us], utc_offset_minutes: int16, dataset_id: string> child 0, sha: string child 1, timestamp: timestamp[us] child 2, utc_offset_minutes: int16 child 3, dataset_id: string) str#
Returns
schemaas an indented type tree.- Parameters:
schema – Schema to render;
query.SCHEMA, what a model may query, by default.- Returns:
One line per field, two spaces of indentation per level of nesting, with container fields naming their shape and their children indented beneath, and each enum column followed by the values it may hold. The indentation gives the path to a leaf, not the syntax for reaching it: a child of a
LISTorMAPneeds a list function rather than a dot.- Raises:
KeyError – If the schema holds a leaf type this module does not name.
ord_schema.search.sql#
Checking the SQL a model wrote before anything runs it.
Validation needs no corpus. query.TABLE_SCHEMA is generated from the proto
descriptors, plus the dataset_id the executor supplies, so an empty Arrow table
carrying it has the shape a query runs against, and an empty one carrying the
arrivals artifact’s columns stands for the relation a query naming a first commit
reads beside it. Planning a query against them resolves every column reference and type
without reading a byte of data. The prompt in ord_schema.search.schema renders
query.SCHEMA, those two relations’ columns as one, so the columns a model is told
about and the columns its query is checked against come from the same definitions.
Two classes of defect are caught, and they are different in kind:
Not a query. Anything but a single
SELECTis refused, which is a whitelist rather than a search for known-bad text. The connection also has no filesystem access, soread_parquetandCOPYfail to plan – but that is a property of this connection, not a certificate about the SQL: a reader that binds its path lazily, such assniff_csv, plans cleanly here and is refused only when something executes it.Not answerable. A column that does not exist, a type that will not compare, a placeholder the model referenced but did not declare. These are ordinary binder errors, surfaced early enough to retry the translation instead of failing a user.
Placeholders are bound, never interpolated. A compound name reaches the query as a parameter value, so it cannot carry SQL with it, and the same values used here are the ones the query runs with.
Warning
Nothing here bounds what a query costs. UNNEST in a FROM clause is
refused, because it materializes the exploded intermediate – far costlier than the
equivalent list lambdas, and over the full corpus the difference between an answer
and none – and because it is the spelling every SQL tutorial teaches, so a model
reaches for it by default.
That is one entry in a blacklist, not a guard. A self-join over 2.4M reactions, a
cross join against range, a recursive CTE counting to a billion, and a
predicate-free SELECT * all plan cleanly here, and none of them is reachable by
enumerating spellings: accepting SQL means accepting that the set of expensive
programs cannot be listed. A caller running validated SQL against a real corpus needs
its own bound – a statement timeout, a row cap, a memory limit – and must not read
this module as having provided one.
- exception ord_schema.search.sql.InvalidQueryError#
Bases:
ValueErrorThe generated SQL is not a query this surface will run.
- ord_schema.search.sql.validate(sql: str, *, parameters: dict[str, ~typing.Any] | None = None, schema: ~pyarrow.lib.Schema = smiles: string identifiers: list<item: struct<type: string, details: string, value: string, is_mapped: bool>> child 0, item: struct<type: string, details: string, value: string, is_mapped: bool> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,REACTION_SMILES,REACTION_CXSMILES,RDF' + 24 child 1, details: string child 2, value: string child 3, is_mapped: bool inputs: map<string, struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: (... 2062 chars omitted) child 0, entries: struct<key: string not null, value: struct<components: list<item: struct<smiles: string, structure_i (... 2086 chars omitted) not null child 0, key: string not null child 1, value: struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: s (... 2049 chars omitted) child 0, components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 1105 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC' + 117 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORK' + 70 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED,DRI' + 14 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,N' + 98 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the times' + 4 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 1, crude_components: list<item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: stru (... 292 chars omitted) child 0, item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: struct<mass_gra (... 280 chars omitted) child 0, reaction_id: string child 1, includes_workup: bool child 2, has_derived_amount: bool child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 2, addition_order: int32 child 3, addition_time_seconds: double child 4, addition_time_precision_seconds: double child 5, addition_speed: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,ALL_AT_ONCE,FAST,SLOW,DROPWISE,CONTINUOU' + 13 child 1, details: string child 6, addition_duration_seconds: double child 7, addition_duration_precision_seconds: double child 8, flow_rate_milliliters_per_minute: double child 9, flow_rate_precision_milliliters_per_minute: double child 10, addition_device: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,SYRINGE,CANNULA,ADDITION_FUN' + 83 child 1, details: string child 11, addition_temperature_kelvin: double child 12, addition_temperature_precision_kelvin: double child 13, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SOLI' + 38 child 1, details: string setup: struct<vessel: struct<type: string, details: string, material: struct<type: string, details: string> (... 524 chars omitted) child 0, vessel: struct<type: string, details: string, material: struct<type: string, details: string>, preparations: (... 234 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,ROUND_BOTTOM_FLASK,VIAL,WELL_PLATE,MI' + 130 child 1, details: string child 2, material: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,GLASS,POLYPROPYLENE,PLASTIC,METAL,Q' + 5 child 1, details: string child 3, preparations: list<item: struct<type: string, details: string>> child 0, item: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,OVEN_DRIED,FLAME_DRIED,EVACU' + 22 child 1, details: string child 4, attachments: list<item: struct<type: string, details: string>> child 0, item: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,NONE,CUSTOM,SEPTUM,CAP,MAT,REFLUX_CONDEN' + 146 child 1, details: string child 5, volume_liters: double child 6, volume_precision_liters: double child 7, vessel_id: string child 8, position: string child 9, row: string child 10, col: string child 1, is_automated: bool child 2, automation_platform: string child 3, automation_code: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 4, environment: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,FUME_HOOD,BENCH_TOP,GLOVE_BOX,GLOVE_B' + 2 child 1, details: string conditions: struct<temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, (... 1761 chars omitted) child 0, temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, setpoint_precision_k (... 199 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,OIL_BATH,WATER_BATH,SAND_BA' + 77 child 1, details: string child 1, setpoint_kelvin: double child 2, setpoint_precision_kelvin: double child 3, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 69 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, temperat (... 57 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,THERMOCOUPLE_INTERNAL,THERMOCOUPL' + 19 child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, temperature_kelvin: double child 5, temperature_precision_kelvin: double child 1, pressure: struct<control: struct<type: string, details: string>, setpoint_kilopascals: double, setpoint_precis (... 264 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,SLIGHT_POSITIVE,SEALED,PRES' + 7 child 1, details: string child 1, setpoint_kilopascals: double child 2, setpoint_precision_kilopascals: double child 3, atmosphere: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AIR,NITROGEN,ARGON,OXYGEN,HYDROGEN,' + 71 child 1, details: string child 4, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 73 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, pressure (... 61 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,PRESSURE_TRANSDUCER' child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, pressure_kilopascals: double child 5, pressure_precision_kilopascals: double child 2, stirring: struct<type: string, details: string, rate: struct<type: string, details: string, rpm: int32>> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,STIR_BAR,OVERHEAD_MIXER,AGITATIO' + 25 child 1, details: string child 2, rate: struct<type: string, details: string, rpm: int32> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,HIGH,MEDIUM,LOW' child 1, details: string child 2, rpm: int32 child 3, illumination: struct<type: string, details: string, peak_wavelength_nanometers: double, peak_wavelength_precision_ (... 124 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,DARK,LED,HALOGEN_LAMP,DEUTERI' + 38 child 1, details: string child 2, peak_wavelength_nanometers: double child 3, peak_wavelength_precision_nanometers: double child 4, color: string child 5, distance_to_vessel_centimeters: double child 6, distance_to_vessel_precision_centimeters: double child 4, electrochemistry: struct<type: string, details: string, current_amperes: double, current_precision_amperes: double, vo (... 446 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,CONSTANT_CURRENT,CONSTANT_VOLTAGE' child 1, details: string child 2, current_amperes: double child 3, current_precision_amperes: double child 4, voltage_volts: double child 5, voltage_precision_volts: double child 6, anode_material: string child 7, cathode_material: string child 8, electrode_separation_centimeters: double child 9, electrode_separation_precision_centimeters: double child 10, measurements: list<item: struct<time_seconds: double, time_precision_seconds: double, current_amperes: double, cur (... 88 chars omitted) child 0, item: struct<time_seconds: double, time_precision_seconds: double, current_amperes: double, current_precis (... 76 chars omitted) child 0, time_seconds: double child 1, time_precision_seconds: double child 2, current_amperes: double child 3, current_precision_amperes: double child 4, voltage_volts: double child 5, voltage_precision_volts: double child 11, cell: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,DIVIDED_CELL,UNDIVIDED_CELL' child 1, details: string child 5, flow: struct<type: string, details: string, pump_type: string, tubing: struct<type: string, details: strin (... 73 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,PLUG_FLOW_REACTOR,CONTINUOUS_STIRRED_' + 31 child 1, details: string child 2, pump_type: string child 3, tubing: struct<type: string, details: string, diameter_centimeters: double, diameter_precision_centimeters: (... 7 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,STEEL,COPPER,PFA,FEP,TEFLONAF,PTFE,' + 25 child 1, details: string child 2, diameter_centimeters: double child 3, diameter_precision_centimeters: double child 6, reflux: bool child 7, ph: float child 8, conditions_are_dynamic: bool child 9, details: string notes: struct<is_heterogeneous: bool, forms_precipitate: bool, is_exothermic: bool, offgasses: bool, is_sen (... 133 chars omitted) child 0, is_heterogeneous: bool child 1, forms_precipitate: bool child 2, is_exothermic: bool child 3, offgasses: bool child 4, is_sensitive_to_moisture: bool child 5, is_sensitive_to_oxygen: bool child 6, is_sensitive_to_light: bool child 7, safety_notes: string child 8, procedure_details: string observations: list<item: struct<time_seconds: double, time_precision_seconds: double, comment: string, image: stru (... 139 chars omitted) child 0, item: struct<time_seconds: double, time_precision_seconds: double, comment: string, image: struct<float_va (... 127 chars omitted) child 0, time_seconds: double child 1, time_precision_seconds: double child 2, comment: string child 3, image: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string workups: list<item: struct<type: string, details: string, duration_seconds: double, duration_precision_second (... 2903 chars omitted) child 0, item: struct<type: string, details: string, duration_seconds: double, duration_precision_seconds: double, (... 2891 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,ADDITION,ALIQUOT,TEMPERATURE,CONCENTR' + 166 child 1, details: string child 2, duration_seconds: double child 3, duration_precision_seconds: double child 4, input: struct<components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: s (... 2049 chars omitted) child 0, components: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 1105 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC' + 117 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORK' + 70 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED,DRI' + 14 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,N' + 98 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the times' + 4 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 1, crude_components: list<item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: stru (... 292 chars omitted) child 0, item: struct<reaction_id: string, includes_workup: bool, has_derived_amount: bool, amount: struct<mass_gra (... 280 chars omitted) child 0, reaction_id: string child 1, includes_workup: bool child 2, has_derived_amount: bool child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATE' + 1 child 1, details: string child 7, volume_includes_solutes: bool child 4, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_' + 42 child 1, details: string child 2, addition_order: int32 child 3, addition_time_seconds: double child 4, addition_time_precision_seconds: double child 5, addition_speed: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,ALL_AT_ONCE,FAST,SLOW,DROPWISE,CONTINUOU' + 13 child 1, details: string child 6, addition_duration_seconds: double child 7, addition_duration_precision_seconds: double child 8, flow_rate_milliliters_per_minute: double child 9, flow_rate_precision_milliliters_per_minute: double child 10, addition_device: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,SYRINGE,CANNULA,ADDITION_FUN' + 83 child 1, details: string child 11, addition_temperature_kelvin: double child 12, addition_temperature_precision_kelvin: double child 13, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SOLI' + 38 child 1, details: string child 5, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRATED' child 1, details: string child 7, volume_includes_solutes: bool child 6, temperature: struct<control: struct<type: string, details: string>, setpoint_kelvin: double, setpoint_precision_k (... 199 chars omitted) child 0, control: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,AMBIENT,OIL_BATH,WATER_BATH,SAND_' + 79 child 1, details: string child 1, setpoint_kelvin: double child 2, setpoint_precision_kelvin: double child 3, measurements: list<item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: doubl (... 69 chars omitted) child 0, item: struct<type: string, details: string, time_seconds: double, time_precision_seconds: double, temperat (... 57 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,THERMOCOUPLE_INTERNAL,THERMOCOU' + 21 child 1, details: string child 2, time_seconds: double child 3, time_precision_seconds: double child 4, temperature_kelvin: double child 5, temperature_precision_kelvin: double child 7, keep_phase: string child 8, stirring: struct<type: string, details: string, rate: struct<type: string, details: string, rpm: int32>> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,STIR_BAR,OVERHEAD_MIXER,AGITAT' + 27 child 1, details: string child 2, rate: struct<type: string, details: string, rpm: int32> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,HIGH,MEDIUM,LOW' child 1, details: string child 2, rpm: int32 child 9, target_ph: float child 10, is_automated: bool outcomes: list<item: struct<reaction_time_seconds: double, reaction_time_precision_seconds: double, conversion (... 2983 chars omitted) child 0, item: struct<reaction_time_seconds: double, reaction_time_precision_seconds: double, conversion: struct<va (... 2971 chars omitted) child 0, reaction_time_seconds: double child 1, reaction_time_precision_seconds: double child 2, conversion: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 3, products: list<item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, (... 2422 chars omitted) child 0, item: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 2410 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,IUPAC_N' + 115 child 1, details: string child 2, value: string child 3, is_desired_product: bool child 4, measurements: list<item: struct<analysis_key: string, type: string, details: string, uses_internal_standard: bool, (... 1984 chars omitted) child 0, item: struct<analysis_key: string, type: string, details: string, uses_internal_standard: bool, is_normali (... 1972 chars omitted) child 0, analysis_key: string child 1, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,IDENTITY,YIELD,SELECTIVITY,PU' + 33 child 2, details: string child 3, uses_internal_standard: bool child 4, is_normalized: bool child 5, uses_authentic_standard: bool child 6, authentic_standard: struct<smiles: string, structure_id: uint32, identifiers: list<item: struct<type: string, details: s (... 1093 chars omitted) child 0, smiles: string child 1, structure_id: uint32 -- field metadata -- ord.internal: 'joins the dataset's structures artifact' child 2, identifiers: list<item: struct<type: string, details: string, value: string>> child 0, item: struct<type: string, details: string, value: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SMILES,INCHI,MOLBLOCK,I' + 121 child 1, details: string child 2, value: string child 3, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TIT' + 5 child 1, details: string child 7, volume_includes_solutes: bool child 4, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,' + 74 child 5, is_limiting: bool child 6, preparations: list<item: struct<type: string, details: string, reaction_id: string>> child 0, item: struct<type: string, details: string, reaction_id: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,NONE,REPURIFIED,SPARGED' + 18 child 1, details: string child 2, reaction_id: string child 7, source: struct<vendor: string, catalog_id: string, lot: string> child 0, vendor: string child 1, catalog_id: string child 2, lot: string child 8, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_1' + 102 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the t' + 8 child 10, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPH' + 46 child 1, details: string child 7, percentage: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 8, float_value: struct<value: float, precision: float> child 0, value: float child 1, precision: float child 9, string_value: string child 10, amount: struct<mass_grams: double, mass_precision_grams: double, moles_moles: double, moles_precision_moles: (... 146 chars omitted) child 0, mass_grams: double child 1, mass_precision_grams: double child 2, moles_moles: double child 3, moles_precision_moles: double child 4, volume_liters: double child 5, volume_precision_liters: double child 6, unmeasured: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,SATURATED,CATALYTIC,TITRA' + 3 child 1, details: string child 7, volume_includes_solutes: bool child 11, retention_time_seconds: double child 12, retention_time_precision_seconds: double child 13, mass_spec_details: struct<type: string, details: string, tic_minimum_mz: float, tic_maximum_mz: float, eic_masses: list (... 14 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,TIC,TIC_POSITIVE,TIC_NEGATI' + 6 child 1, details: string child 2, tic_minimum_mz: float child 3, tic_maximum_mz: float child 4, eic_masses: list<item: float> child 0, item: float child 14, selectivity: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,EE,ER,DR,EZ,ZE' child 1, details: string child 15, wavelength_nanometers: double child 16, wavelength_precision_nanometers: double child 5, isolated_color: string child 6, texture: struct<type: string, details: string> child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,POWDER,CRYSTAL,OIL,AMORPHOUS_SO' + 40 child 1, details: string child 7, features: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 8, reaction_role: string -- field metadata -- ord.enum: 'UNSPECIFIED,REACTANT,REAGENT,SOLVENT,CATALYST,WORKUP' + 68 child 4, analyses: map<string, struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data (... 295 chars omitted) child 0, entries: struct<key: string not null, value: struct<type: string, details: string, chmo_id: int32, is_of_isol (... 319 chars omitted) not null child 0, key: string not null child 1, value: struct<type: string, details: string, chmo_id: int32, is_of_isolated_species: bool, data: map<string (... 282 chars omitted) child 0, type: string -- field metadata -- ord.enum: 'UNSPECIFIED,CUSTOM,LC,GC,IR,NMR_1H,NMR_13C,NMR_OTH' + 92 child 1, details: string child 2, chmo_id: int32 child 3, is_of_isolated_species: bool child 4, data: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 5, instrument_manufacturer: string child 6, instrument_last_calibrated: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' provenance: struct<experimenter: struct<username: string, name: string, orcid: string, organization: string, ema (... 824 chars omitted) child 0, experimenter: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 1, city: string child 2, experiment_start: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 3, doi: string child 4, patent: string child 5, publication_url: string child 6, record_created: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, person: str (... 105 chars omitted) child 0, time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 1, person: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 2, details: string child 7, record_modified: list<item: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, (... 117 chars omitted) child 0, item: struct<time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string>, person: str (... 105 chars omitted) child 0, time: struct<timestamp: timestamp[us], utc_offset_minutes: int16, value: string> child 0, timestamp: timestamp[us] child 1, utc_offset_minutes: int16 child 2, value: string -- field metadata -- ord.internal: 'the recorded spelling; query the timestamp' child 1, person: struct<username: string, name: string, orcid: string, organization: string, email: string> child 0, username: string child 1, name: string child 2, orcid: string child 3, organization: string child 4, email: string child 2, details: string child 8, reaction_metadata: map<string, struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: stri (... 54 chars omitted) child 0, entries: struct<key: string not null, value: struct<float_value: float, integer_value: int32, bytes_value: bi (... 78 chars omitted) not null child 0, key: string not null child 1, value: struct<float_value: float, integer_value: int32, bytes_value: binary, string_value: string, url: str (... 41 chars omitted) child 0, float_value: float child 1, integer_value: int32 child 2, bytes_value: binary child 3, string_value: string child 4, url: string child 5, description: string child 6, format: string child 9, is_mined: bool reaction_id: string dataset_id: string) None#
Checks that
sqlis a single read-only query this surface will run.Says nothing about what the query costs; see the module warning.
- Parameters:
sql – The generated SQL, querying
TABLEand, for a first commit,query.HISTORY_TABLE.parameters – Values for the query’s named placeholders, exactly as they will be bound at execution. Planning needs them, so a query referencing a placeholder the caller did not supply fails here rather than at execution. Binding different values later invalidates the result, since constant folding can prune a branch at plan time; nothing detects that, so validating once and re-binding is the caller’s mistake to avoid.
schema – Schema of
TABLEto plan against;query.TABLE_SCHEMAby default.
- Raises:
InvalidQueryError – If the SQL does not parse, is more than one statement, is not a
SELECT, references something the schema does not hold, or plans to an exploded intermediate.