Skip to content
Snippets Groups Projects
Verified Commit c4b43e99 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC: Jupyter notebook for the first step with caosdb

parent 9b2f636c
No related branches found
No related tags found
No related merge requests found
Pipeline #24353 failed
%% Cell type:markdown id:b165f725 tags:
# Live demo: Octave's CaosDB package
%% Cell type:markdown id:11f407ec tags:
## Load & connect
Let's load the CaosDB package, connect to the server and get some information about the server.
%% Cell type:code id:f7ad7c18 tags:
``` octave
pkg load caosdb;
c = Caosdb();
c.info()
```
%% Cell type:markdown id:c77f09e5 tags:
## Execute a query
The demo CaosDB contains a number of musical instruments and analyses about the instruments. Let's find an instrument that was not too cheap.
%% Cell type:code id:2273ac0d tags:
``` octave
result = c.query("FIND MusicalInstrument WITH price > 2022 €");
instrument_3 = result{3}
```
%% Cell type:markdown id:07ec19e7 tags:
## Further inspect the instrument
Records from CaosDB may contain properties. We want to find out how expensive the instrument actually was.
%% Cell type:code id:aa1fd55b tags:
``` octave
price = instrument_3.get_properties_as_struct().price
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment