Jupyter Notebook

Manage schemas#

LaminDB gives you a framework for managing complex typed metadata schema-full:

  1. Any LaminDB instance can plug in an arbitrary number of schemas

  2. Each schema is a Python package that defines an arbitrary number of data models

  3. Every data model is a Registry and comes with an auto-generated corresponding SQL table

Setup#

!lamin init --storage ./test-schema
Hide code cell output
✅ saved: User(id='DzTjkKse', handle='testuser1', email='testuser1@lamin.ai', name='Test User1', updated_at=2023-09-26 15:22:13)
✅ saved: Storage(id='biM5nx5s', root='/home/runner/work/lamindb/lamindb/docs/test-schema', type='local', updated_at=2023-09-26 15:22:13, created_by_id='DzTjkKse')
💡 loaded instance: testuser1/test-schema
💡 did not register local instance on hub (if you want, call `lamin register`)

Basic data management: lnschema_core#

import lamindb as ln
💡 loaded instance: testuser1/test-schema (lamindb 0.54.2)

The core schema is built into the core LaminDB API, but it’s managed as its own Python package lnschema_core with source code here.

All of LaminDB’s core classes, like File, Transform, User, etc. are registries defined in the core schema, see the source code here.

View the schema#

For your given instance, you can view the underlying SQL tables like so:

ln.schema.view()
_images/18334a4d699c4387aea41841aace83bff09e915efd513eb8090f47ddf5737a36.svg

Basic biological entities: lnschema_bionty#

lnschema_bionty is derived from Bionty, see lnschema_bionty.

Custom schemas#

You can set up your own schemas & registries or reach out for support within Lamin’s enterprise plan.

The only convention required by LaminDB for plugging in a schema package is that it’s named lnschema_{schema_name} and a valid (minimal) Django app.

You’ll see how simple it is if you look at this example: github.com/laminlabs/lnschema-lamin1.

Schema management needs two CLI calls (see Install & setup LaminDB):

  • lamin migrate create

  • lamin migrate deploy

Export the schema#

If you want to export the schema, you can use graph(), which returns a pydot.Dot graph object, and can be exported and converted to many formats (including networkx).

graph = ln.schema.graph()
import pandas as pd

pd.DataFrame(graph.formats).T
0 1 2 3 4 5 6 7 8 9 ... 26 27 28 29 30 31 32 33 34 35
0 canon cmap cmapx cmapx_np dia dot fig gd gd2 gif ... ps2 svg svgz vml vmlz vrml vtx wbmp xdot xlib

1 rows × 36 columns

graph.create_dot()
b'digraph G {\n\tgraph [bb="0,0,1254,996",\n\t\tconcentrate=True,\n\t\tmode=ipsep,\n\t\toverlap=ipsep,\n\t\tprog=dot,\n\t\trankdir=TB,\n\t\tsep=0.01\n\t];\n\tnode [label="\\N"];\n\tdjango_migrations\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.80556,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>django_migrations</b></TD></TR><TR><TD ALIGN="LEFT" PORT="app">- app</TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR><TR><TD ALIGN="LEFT" PORT="applied">- applied</TD></TR></TABLE>>,\n\t\tpos="48,967",\n\t\tshape=plaintext,\n\t\twidth=1.3333];\n\tlnschema_core_dataset\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=2.4722,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_dataset</b></TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR><TR><TD ALIGN="LEFT" PORT="description">- description</TD></TR><TR><TD ALIGN="LEFT" PORT="hash">- hash</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR><TR><TD ALIGN="LEFT" PORT="file_id">- file_id</TD></TR><TR><TD ALIGN="LEFT" PORT="run_id">- run_id</TD></TR><TR><TD ALIGN="LEFT" PORT="transform_id">- transform_id</TD></TR><TR><TD ALIGN="LEFT" PORT="initial_version_id">- initial_version_id</TD></TR><TR><TD ALIGN="LEFT" PORT="version">- version</TD></TR><TR><TD ALIGN="LEFT" PORT="reference">- reference</TD></TR><TR><TD ALIGN="LEFT" PORT="reference_type">- reference_type</TD></TR></TABLE>>,\n\t\tpos="382,813",\n\t\tshape=plaintext,\n\t\twidth=1.5972];\n\tlnschema_core_dataset -> lnschema_core_dataset\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="441.11,789.71",\n\t\theadlabel=" ",\n\t\tpos="439.61,840.29 450.12,836.83 457.5,827.74 457.5,813 457.5,798.26 450.12,789.17 439.61,785.71",\n\t\ttail_lp="441.11,844.29",\n\t\ttaillabel=" "];\n\tlnschema_core_transform\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=1.9722,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_transform</b></TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR><TR><TD ALIGN="LEFT" PORT="short_name">- short_name</TD></TR><TR><TD ALIGN="LEFT" PORT="type">- type</TD></TR><TR><TD ALIGN="LEFT" PORT="reference">- reference</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR><TR><TD ALIGN="LEFT" PORT="version">- version</TD></TR><TR><TD ALIGN="LEFT" PORT="initial_version_id">- initial_version_id</TD></TR><TR><TD ALIGN="LEFT" PORT="reference_type">- reference_type</TD></TR></TABLE>>,\n\t\tpos="527,189",\n\t\tshape=plaintext,\n\t\twidth=1.7361];\n\tlnschema_core_dataset -> lnschema_core_transform\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="567.44,264.08",\n\t\theadlabel=" ",\n\t\tpos="382,586 387.17,537.35 390.17,517.02 428,486 481.35,442.25 536.24,504.15 579,450 621.51,396.17 596.92,316.92 568.94,260.08",\n\t\ttail_lp="380.5,590",\n\t\ttaillabel=" "];\n\tlnschema_core_user\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=1.1389,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_user</b></TD></TR><TR><TD ALIGN="LEFT" PORT="handle">- handle</TD></TR><TR><TD ALIGN="LEFT" PORT="email">- email</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR></TABLE>>,\n\t\tpos="636,41",\n\t\tshape=plaintext,\n\t\twidth=1.4444];\n\tlnschema_core_dataset -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="380.5,194",\n\t\theadlabel=" ",\n\t\tpos="382,586 386.39,542.22 356.22,225.66 382,190",\n\t\ttail_lp="380.5,582",\n\t\ttaillabel=" "];\n\tlnschema_core_run\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=1.3056,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_run</b></TD></TR><TR><TD ALIGN="LEFT" PORT="reference_type">- reference_type</TD></TR><TR><TD ALIGN="LEFT" PORT="reference">- reference</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="run_at">- run_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR><TR><TD ALIGN="LEFT" PORT="transform_id">- transform_id</TD></TR></TABLE>>,\n\t\tpos="304,373",\n\t\tshape=plaintext,\n\t\twidth=1.3889];\n\tlnschema_core_dataset -> lnschema_core_run\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="333.3,424.36",\n\t\theadlabel=" ",\n\t\tpos="377.71,723.74 376.79,682.41 377.26,632.57 382,588;382,586 388.34,526.33 359.24,462.26 334.8,420.36",\n\t\ttail_lp="376.21,719.74",\n\t\ttaillabel=" "];\n\tlnschema_core_file\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=2.8056,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_file</b></TD></TR><TR><TD ALIGN="LEFT" PORT="size">- size</TD></TR><TR><TD ALIGN="LEFT" PORT="hash">- hash</TD></TR><TR><TD ALIGN="LEFT" PORT="key">- key</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR><TR><TD ALIGN="LEFT" PORT="run_id">- run_id</TD></TR><TR><TD ALIGN="LEFT" PORT="storage_id">- storage_id</TD></TR><TR><TD ALIGN="LEFT" PORT="transform_id">- transform_id</TD></TR><TR><TD ALIGN="LEFT" PORT="description">- description</TD></TR><TR><TD ALIGN="LEFT" PORT="hash_type">- hash_type</TD></TR><TR><TD ALIGN="LEFT" PORT="accessor">- accessor</TD></TR><TR><TD ALIGN="LEFT" PORT="version">- version</TD></TR><TR><TD ALIGN="LEFT" PORT="suffix">- suffix</TD></TR><TR><TD ALIGN="LEFT" PORT="initial_version_id">- initial_version_id</TD></TR></TABLE>>,\n\t\tpos="486,587",\n\t\tshape=plaintext,\n\t\twidth=1.3611];\n\tlnschema_core_dataset -> lnschema_core_file\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="437.91,692.36",\n\t\theadlabel=" ",\n\t\tpos="422.95,723.79 428.35,712.16 433.92,700.17 439.41,688.36",\n\t\ttail_lp="421.45,719.79",\n\t\ttaillabel=" "];\n\tlnschema_core_transform -> lnschema_core_transform\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="591.28,167.21",\n\t\theadlabel=" ",\n\t\tpos="589.78,214.79 600.26,211.18 607.5,202.59 607.5,189 607.5,175.41 600.26,166.82 589.78,163.21",\n\t\ttail_lp="591.28,218.79",\n\t\ttaillabel=" "];\n\tlnschema_core_transform -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="604.51,86.167",\n\t\theadlabel=" ",\n\t\tpos="579.27,117.99 588.44,105.7 597.71,93.29 606.01,82.167",\n\t\ttail_lp="577.77,113.99",\n\t\ttaillabel=" "];\n\tlnschema_core_run -> lnschema_core_transform\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="462.86,245.13",\n\t\theadlabel=" ",\n\t\tpos="354.05,331.16 386.66,304.54 429.48,269.59 464.36,241.13",\n\t\ttail_lp="355.55,335.16",\n\t\ttaillabel=" "];\n\tlnschema_core_run -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="582.41,62.397",\n\t\theadlabel=" ",\n\t\tpos="317.5,325.72 330.2,287.09 351.79,231.79 382,190;382,188 408.53,151.31 418.1,142.76 456,118 496.04,91.846 546.58,71.447 583.91,58.397",\n\t\ttail_lp="316,321.72",\n\t\ttaillabel=" "];\n\tlnschema_core_file -> lnschema_core_transform\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="591.14,249.08",\n\t\theadlabel=" ",\n\t\tpos="535.18,537.52 565.61,506.67 600.92,469.06 612,450 629.8,419.38 626.05,407.99 636,374;636,372 649.51,325.87 620.92,279.48 589.64,\\\n245.08",\n\t\ttail_lp="536.68,541.52",\n\t\ttaillabel=" "];\n\tlnschema_core_file -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="641.61,86.134",\n\t\theadlabel=" ",\n\t\tpos="636,372 665.54,271.11 652.73,145.3 643.11,82.134",\n\t\ttail_lp="634.5,376",\n\t\ttaillabel=" "];\n\tlnschema_core_file -> lnschema_core_run\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="342.1,424.13",\n\t\theadlabel=" ",\n\t\tpos="436.99,528.91 407.72,494.82 371.03,452.08 343.6,420.13",\n\t\ttail_lp="435.49,532.91",\n\t\ttaillabel=" "];\n\tlnschema_core_file -> lnschema_core_file\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="536.58,552.17",\n\t\theadlabel=" ",\n\t\tpos="535.08,625.83 545.49,621.89 553,608.94 553,587 553,565.06 545.49,552.11 535.08,548.17",\n\t\ttail_lp="536.58,629.83",\n\t\ttaillabel=" "];\n\tlnschema_core_storage\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=1.3056,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_storage</b></TD></TR><TR><TD ALIGN="LEFT" PORT="type">- type</TD></TR><TR><TD ALIGN="LEFT" PORT="region">- region</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR><TR><TD ALIGN="LEFT" PORT="root">- root</TD></TR></TABLE>>,\n\t\tpos="722,189",\n\t\tshape=plaintext,\n\t\twidth=1.6111];\n\tlnschema_core_file -> lnschema_core_storage\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="693.64,240.29",\n\t\theadlabel=" ",\n\t\tpos="636,372 650.14,323.7 675.59,272.16 695.14,236.29",\n\t\ttail_lp="634.5,368",\n\t\ttaillabel=" "];\n\tlnschema_core_storage -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="658.34,86.475",\n\t\theadlabel=" ",\n\t\tpos="694.79,141.8 683.57,122.76 670.68,100.88 659.84,82.475",\n\t\ttail_lp="693.29,137.8",\n\t\ttaillabel=" "];\n\tlnschema_core_dataset_files\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.63889,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_dataset_files</b></TD></TR><TR><TD ALIGN="LEFT" PORT="dataset_id">- dataset_id</TD></TR><TR><TD ALIGN="LEFT" PORT="file_id">- file_id</TD></TR></TABLE>>,\n\t\tpos="441,967",\n\t\tshape=plaintext,\n\t\twidth=1.875];\n\tlnschema_core_dataset_files -> lnschema_core_dataset\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="414.72,906.15",\n\t\theadlabel=" ",\n\t\tpos="432.42,943.9 427.98,932.45 422.23,917.65 416.22,902.15",\n\t\ttail_lp="430.92,939.9",\n\t\ttaillabel=" "];\n\tlnschema_core_dataset_files -> lnschema_core_file\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="486.67,692.16",\n\t\theadlabel=" ",\n\t\tpos="452.12,943.77 457.61,931.72 463.74,916.39 467,902 482.95,831.7 487.51,750.41 488.17,688.16",\n\t\ttail_lp="450.62,939.77",\n\t\ttaillabel=" "];\n\tlnschema_core_dataset_input_of\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.63889,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_dataset_input_of</b></TD></TR><TR><TD ALIGN="LEFT" PORT="dataset_id">- dataset_id</TD></TR><TR><TD ALIGN="LEFT" PORT="run_id">- run_id</TD></TR></TABLE>>,\n\t\tpos="190,967",\n\t\tshape=plaintext,\n\t\twidth=2.0972];\n\tlnschema_core_dataset_input_of -> lnschema_core_dataset\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="322.6,897.78",\n\t\theadlabel=" ",\n\t\tpos="245.84,943.94 268.69,933.31 294.52,919.13 315,902 318.09,899.41 321.13,896.66 324.1,893.78",\n\t\ttail_lp="244.34,939.94",\n\t\ttaillabel=" "];\n\tlnschema_core_dataset_input_of -> lnschema_core_run\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="252.15,420.64",\n\t\theadlabel=" ",\n\t\tpos="178.45,943.82 172.74,931.78 166.38,916.44 163,902 131.15,765.87 113.84,724.52 144,588;144,586 158.97,517.53 212.57,455.63 253.65,\\\n416.64",\n\t\ttail_lp="176.95,939.82",\n\t\ttaillabel=" "];\n\tlnschema_core_datasetfeatureset\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.80556,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_datasetfeatureset</b></TD></TR><TR><TD ALIGN="LEFT" PORT="slot">- slot</TD></TR><TR><TD ALIGN="LEFT" PORT="dataset_id">- dataset_id</TD></TR><TR><TD ALIGN="LEFT" PORT="feature_set_id">- feature_set_id</TD></TR></TABLE>>,\n\t\tpos="665,967",\n\t\tshape=plaintext,\n\t\twidth=2.1528];\n\tlnschema_core_datasetfeatureset -> lnschema_core_dataset\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="441.05,855.52",\n\t\theadlabel=" ",\n\t\tpos="587.19,939.2 560.5,928.88 530.85,916.15 505,902 482.66,889.77 459.59,874.18 439.55,859.52",\n\t\ttail_lp="585.69,943.2",\n\t\ttaillabel=" "];\n\tlnschema_core_featureset\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=1.8056,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_featureset</b></TD></TR><TR><TD ALIGN="LEFT" PORT="type">- type</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR><TR><TD ALIGN="LEFT" PORT="n">- n</TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR><TR><TD ALIGN="LEFT" PORT="modality_id">- modality_id</TD></TR><TR><TD ALIGN="LEFT" PORT="hash">- hash</TD></TR><TR><TD ALIGN="LEFT" PORT="registry">- registry</TD></TR></TABLE>>,\n\t\tpos="657,587",\n\t\tshape=plaintext,\n\t\twidth=1.75];\n\tlnschema_core_datasetfeatureset -> lnschema_core_featureset\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="657.56,656.33",\n\t\theadlabel=" ",\n\t\tpos="664.65,937.68 664.07,892.5 662.78,801.3 661,724 660.46,700.62 659.74,674.99 659.06,652.33",\n\t\ttail_lp="663.15,933.68",\n\t\ttaillabel=" "];\n\tlnschema_core_featureset -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="689.57,50.268",\n\t\theadlabel=" ",\n\t\tpos="702.21,521.74 710.94,509.74 720.14,497.4 729,486 742.17,469.06 989.11,207.71 977,190;977,188 915.51,87.275 767.32,55.942 688.07,\\\n46.268",\n\t\ttail_lp="700.71,517.74",\n\t\ttaillabel=" "];\n\tlnschema_core_modality\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=2.1389,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_modality</b></TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR><TR><TD ALIGN="LEFT" PORT="ontology_id">- ontology_id</TD></TR><TR><TD ALIGN="LEFT" PORT="abbr">- abbr</TD></TR><TR><TD ALIGN="LEFT" PORT="synonyms">- synonyms</TD></TR><TR><TD ALIGN="LEFT" PORT="description">- description</TD></TR><TR><TD ALIGN="LEFT" PORT="molecule">- molecule</TD></TR><TR><TD ALIGN="LEFT" PORT="instrument">- instrument</TD></TR><TR><TD ALIGN="LEFT" PORT="measurement">- measurement</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR></TABLE>>,\n\t\tpos="977,373",\n\t\tshape=plaintext,\n\t\twidth=1.6528];\n\tlnschema_core_featureset -> lnschema_core_modality\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="915.64,444.91",\n\t\theadlabel=" ",\n\t\tpos="692.33,521.88 702.54,508.24 714.82,495.2 729,486 795.25,443.03 833.75,487.96 903,450 907.84,447.34 912.57,444.27 917.14,440.91",\n\t\ttail_lp="690.83,517.88",\n\t\ttaillabel=" "];\n\tlnschema_core_modality -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="975.5,194",\n\t\theadlabel=" ",\n\t\tpos="995.51,295.84 999.64,260.81 997.77,220.39 977,190",\n\t\ttail_lp="994.01,291.84",\n\t\ttaillabel=" "];\n\tlnschema_core_datasetulabel\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.80556,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_datasetulabel</b></TD></TR><TR><TD ALIGN="LEFT" PORT="dataset_id">- dataset_id</TD></TR><TR><TD ALIGN="LEFT" PORT="feature_id">- feature_id</TD></TR><TR><TD ALIGN="LEFT" PORT="ulabel_id">- ulabel_id</TD></TR></TABLE>>,\n\t\tpos="902,967",\n\t\tshape=plaintext,\n\t\twidth=1.9306];\n\tlnschema_core_datasetulabel -> lnschema_core_dataset\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="441.11,867.81",\n\t\theadlabel=" ",\n\t\tpos="832.27,952.39 807.02,947.62 778.26,942.36 752,938 642.56,919.82 607.91,943.44 505,902 481.98,892.73 459.2,878.31 439.61,863.81",\n\t\ttail_lp="830.77,956.39",\n\t\ttaillabel=" "];\n\tlnschema_core_ulabel\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=1.4722,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_ulabel</b></TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR><TR><TD ALIGN="LEFT" PORT="description">- description</TD></TR><TR><TD ALIGN="LEFT" PORT="reference">- reference</TD></TR><TR><TD ALIGN="LEFT" PORT="reference_type">- reference_type</TD></TR></TABLE>>,\n\t\tpos="1097,587",\n\t\tshape=plaintext,\n\t\twidth=1.5278];\n\tlnschema_core_datasetulabel -> lnschema_core_ulabel\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="1153.8,634.43",\n\t\theadlabel=" ",\n\t\tpos="971.56,940.52 974.74,939.62 977.89,938.77 981,938 1033.8,924.86 1187.5,943.18 1223,902 1274.7,842.09 1251.9,797.65 1223,724 1208.6,\\\n687.29 1179.1,654.57 1152.3,630.43",\n\t\ttail_lp="973.06,944.52",\n\t\ttaillabel=" "];\n\tlnschema_core_feature\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=1.9722,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_feature</b></TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR><TR><TD ALIGN="LEFT" PORT="type">- type</TD></TR><TR><TD ALIGN="LEFT" PORT="description">- description</TD></TR><TR><TD ALIGN="LEFT" PORT="created_at">- created_at</TD></TR><TR><TD ALIGN="LEFT" PORT="updated_at">- updated_at</TD></TR><TR><TD ALIGN="LEFT" PORT="created_by_id">- created_by_id</TD></TR><TR><TD ALIGN="LEFT" PORT="synonyms">- synonyms</TD></TR><TR><TD ALIGN="LEFT" PORT="unit">- unit</TD></TR><TR><TD ALIGN="LEFT" PORT="registries">- registries</TD></TR><TR><TD ALIGN="LEFT" PORT="modality_id">- modality_id</TD></TR></TABLE>>,\n\t\tpos="967,587",\n\t\tshape=plaintext,\n\t\twidth=1.5833];\n\tlnschema_core_datasetulabel -> lnschema_core_feature\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="938.12,662.02",\n\t\theadlabel=" ",\n\t\tpos="901.96,937.74 902.41,892.25 905.38,800.17 921,724 925.48,702.15 932.45,678.95 939.62,658.02",\n\t\ttail_lp="900.46,933.74",\n\t\ttaillabel=" "];\n\tlnschema_core_ulabel -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="1084.5,378",\n\t\theadlabel=" ",\n\t\tpos="1097,533.9 1096.3,490.83 1093.8,428.16 1086,374",\n\t\ttail_lp="1095.5,529.9",\n\t\ttaillabel=" "];\n\tlnschema_core_feature -> lnschema_core_user\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="975.5,186",\n\t\theadlabel=" ",\n\t\tpos="1012,515.95 1046.6,460.46 1088.3,389.74 1086,374;1086,372 1072.5,278.69 1026.1,270.48 977,190",\n\t\ttail_lp="1010.5,511.95",\n\t\ttaillabel=" "];\n\tlnschema_core_feature -> lnschema_core_modality\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="971.91,454.14",\n\t\theadlabel=" ",\n\t\tpos="970.3,516 971.3,494.89 972.4,471.62 973.41,450.14",\n\t\ttail_lp="968.8,512",\n\t\ttaillabel=" "];\n\tlnschema_core_feature_feature_sets\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.63889,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_feature_feature_sets</b></TD></TR><TR><TD ALIGN="LEFT" PORT="feature_id">- feature_id</TD></TR><TR><TD ALIGN="LEFT" PORT="featureset_id">- featureset_id</TD></TR></TABLE>>,\n\t\tpos="791,813",\n\t\tshape=plaintext,\n\t\twidth=2.3194];\n\tlnschema_core_feature_feature_sets -> lnschema_core_featureset\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="693.92,656.22",\n\t\theadlabel=" ",\n\t\tpos="777.66,789.7 758.66,757.94 723.05,698.41 695.42,652.22",\n\t\ttail_lp="776.16,785.7",\n\t\ttaillabel=" "];\n\tlnschema_core_feature_feature_sets -> lnschema_core_feature\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="921.13,662.02",\n\t\theadlabel=" ",\n\t\tpos="812.28,789.97 835.21,765.8 872.27,725.44 901,688 908.28,678.51 915.62,668.24 922.63,658.02",\n\t\ttail_lp="810.78,785.97",\n\t\ttaillabel=" "];\n\tlnschema_core_file_input_of\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.63889,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_file_input_of</b></TD></TR><TR><TD ALIGN="LEFT" PORT="file_id">- file_id</TD></TR><TR><TD ALIGN="LEFT" PORT="run_id">- run_id</TD></TR></TABLE>>,\n\t\tpos="239,813",\n\t\tshape=plaintext,\n\t\twidth=1.8611];\n\tlnschema_core_file_input_of -> lnschema_core_run\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="142.5,592",\n\t\theadlabel=" ",\n\t\tpos="219.09,789.71 186.45,750.45 126.82,665.75 144,588",\n\t\ttail_lp="217.59,785.71",\n\t\ttaillabel=" "];\n\tlnschema_core_file_input_of -> lnschema_core_file\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="435.37,654.8",\n\t\theadlabel=" ",\n\t\tpos="253.96,789.66 267.89,770.24 290.2,742.4 315,724 346.64,700.53 364.12,711.15 396,688 410.55,677.43 424.49,664.17 436.87,650.8",\n\t\ttail_lp="252.46,785.66",\n\t\ttaillabel=" "];\n\tlnschema_core_filefeatureset\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.80556,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_filefeatureset</b></TD></TR><TR><TD ALIGN="LEFT" PORT="slot">- slot</TD></TR><TR><TD ALIGN="LEFT" PORT="feature_set_id">- feature_set_id</TD></TR><TR><TD ALIGN="LEFT" PORT="file_id">- file_id</TD></TR></TABLE>>,\n\t\tpos="583,813",\n\t\tshape=plaintext,\n\t\twidth=1.9167];\n\tlnschema_core_filefeatureset -> lnschema_core_file\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="527.86,692.12",\n\t\theadlabel=" ",\n\t\tpos="570.71,783.63 560.21,759.38 544.45,722.97 529.36,688.12",\n\t\ttail_lp="569.21,779.63",\n\t\ttaillabel=" "];\n\tlnschema_core_filefeatureset -> lnschema_core_featureset\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="634.27,656.26",\n\t\theadlabel=" ",\n\t\tpos="592.37,783.63 603.22,750.78 621.44,695.65 635.77,652.26",\n\t\ttail_lp="590.87,779.63",\n\t\ttaillabel=" "];\n\tlnschema_core_fileulabel\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.80556,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_fileulabel</b></TD></TR><TR><TD ALIGN="LEFT" PORT="feature_id">- feature_id</TD></TR><TR><TD ALIGN="LEFT" PORT="file_id">- file_id</TD></TR><TR><TD ALIGN="LEFT" PORT="ulabel_id">- ulabel_id</TD></TR></TABLE>>,\n\t\tpos="991,813",\n\t\tshape=plaintext,\n\t\twidth=1.6944];\n\tlnschema_core_fileulabel -> lnschema_core_file\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="536.56,654.55",\n\t\theadlabel=" ",\n\t\tpos="965.35,783.6 945.31,763.4 915.62,737.52 884,724 760.93,671.38 705.22,746.84 585,688 566.57,678.98 549.57,665.11 535.06,650.55",\n\t\ttail_lp="963.85,779.6",\n\t\ttaillabel=" "];\n\tlnschema_core_fileulabel -> lnschema_core_ulabel\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="1070.9,644.03",\n\t\theadlabel=" ",\n\t\tpos="1004.4,783.63 1021.5,747.61 1051.2,684.76 1072.4,640.03",\n\t\ttail_lp="1002.9,779.63",\n\t\ttaillabel=" "];\n\tlnschema_core_fileulabel -> lnschema_core_feature\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="973.04,662.4",\n\t\theadlabel=" ",\n\t\tpos="987.96,783.63 984.61,752.32 979.08,700.74 974.54,658.4",\n\t\ttail_lp="986.46,779.63",\n\t\ttaillabel=" "];\n\tlnschema_core_modality_parents\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.63889,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_modality_parents</b></TD></TR><TR><TD ALIGN="LEFT" PORT="from_modality_id">- from_modality_id</TD></TR><TR><TD ALIGN="LEFT" PORT="to_modality_id">- to_modality_id</TD></TR></TABLE>>,\n\t\tpos="815,587",\n\t\tshape=plaintext,\n\t\twidth=2.1389];\n\tlnschema_core_modality_parents -> lnschema_core_modality\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="917.15,454.35",\n\t\theadlabel=" ",\n\t\tpos="832.03,563.71 852.5,536.92 887.94,490.55 918.65,450.35",\n\t\ttail_lp="830.53,559.71",\n\t\ttaillabel=" "];\n\tlnschema_core_modality_parents -> lnschema_core_modality\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theadlabel=" ",\n\t\ttaillabel=" "];\n\tlnschema_core_transform_parents\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.63889,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_transform_parents</b></TD></TR><TR><TD ALIGN="LEFT" PORT="from_transform_id">- from_transform_id</TD></TR><TR><TD ALIGN="LEFT" PORT="to_transform_id">- to_transform_id</TD></TR></TABLE>>,\n\t\tpos="490,373",\n\t\tshape=plaintext,\n\t\twidth=2.2222];\n\tlnschema_core_transform_parents -> lnschema_core_transform\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="511.26,264.06",\n\t\theadlabel=" ",\n\t\tpos="494.54,349.68 499.07,327.38 506.28,291.91 512.76,260.06",\n\t\ttail_lp="493.04,345.68",\n\t\ttaillabel=" "];\n\tlnschema_core_transform_parents -> lnschema_core_transform\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theadlabel=" ",\n\t\ttaillabel=" "];\n\tlnschema_core_ulabel_parents\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.63889,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>lnschema_core_ulabel_parents</b></TD></TR><TR><TD ALIGN="LEFT" PORT="from_ulabel_id">- from_ulabel_id</TD></TR><TR><TD ALIGN="LEFT" PORT="to_ulabel_id">- to_ulabel_id</TD></TR></TABLE>>,\n\t\tpos="1142,813",\n\t\tshape=plaintext,\n\t\twidth=2];\n\tlnschema_core_ulabel_parents -> lnschema_core_ulabel\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\thead_lp="1106,644.03",\n\t\theadlabel=" ",\n\t\tpos="1137.5,789.7 1130.6,755.07 1117,687.4 1107.5,640.03",\n\t\ttail_lp="1136,785.7",\n\t\ttaillabel=" "];\n\tlnschema_core_ulabel_parents -> lnschema_core_ulabel\t[arrowhead=" ",\n\t\tarrowtail=" ",\n\t\tdir=both,\n\t\tfontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theadlabel=" ",\n\t\ttaillabel=" "];\n\tsqlite_sequence\t[fontname=Helvetica,\n\t\tfontsize=7.0,\n\t\theight=0.63889,\n\t\tlabel=<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" STYLE="ROUNDED"><TR><TD ALIGN="CENTER"><b>sqlite_sequence</b></TD></TR><TR><TD ALIGN="LEFT" PORT="name">- name</TD></TR><TR><TD ALIGN="LEFT" PORT="seq">- seq</TD></TR></TABLE>>,\n\t\tpos="1033,967",\n\t\tshape=plaintext,\n\t\twidth=1.1944];\n}\n'
Hide code cell content
!lamin delete --force test-schema
!rm -r ./test-schema
💡 deleting instance testuser1/test-schema
✅     deleted instance settings file: /home/runner/.lamin/instance--testuser1--test-schema.env
✅     instance cache deleted
✅     deleted '.lndb' sqlite file
❗     consider manually deleting your stored data: /home/runner/work/lamindb/lamindb/docs/test-schema