Dataset hierarchies
subdatasets and superdatasets

Nesting

Datasets can be linked in superdataset - subdataset relationships.

   datalad clone -d . https://hub.datalad.org/edu/penguins.git inputs
   
  • Use the "penguin-beaks" dataset and add a subdataset under the name inputs: https://hub.datalad.org/edu/penguins.git inputs.
  • Explore
    • What does the superdataset know about its subdataset?
    • In which way is the subdatasets version recorded?
    • Hint: you can use gitk or tig

Dataset linkage

$ datalad clone --dataset . http://example.com/ds inputs/rawdata
$ git diff HEAD~1
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..c3370ba
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "inputs/rawdata"]
+       path = inputs/rawdata
+       url = http://example.com/importantds
diff --git a/inputs/rawdata b/inputs/rawdata
new file mode 160000
index 0000000..fabf852
--- /dev/null
+++ b/inputs/rawdata
@@ -0,0 +1 @@
+Subproject commit fabf8521130a13986bd6493cb33a70e580ce8572
Each (sub)dataset is a separate, but jointly version-controlled entity. If its data isn't retrieved, subdatasets are an extremely lightweight yet actionable data dependency