|
10 | 10 | "The goal of the Data Science Infrastructure Project ([DSI](https://github.com/lanl/dsi)) is to provide a flexible, AI-ready metadata query capability which returns data subject to strict, POSIX-enforced file security. In this tutorial, you will learn how to:\n", |
11 | 11 | " - initialize a DSI instance\n", |
12 | 12 | " - load Tier 1 metadata into DSI\n", |
13 | | - " - check the data loaded\n", |
14 | | - " - query the data\n", |
| 13 | + " - check the metadata loaded\n", |
| 14 | + " - query the metadata\n", |
15 | 15 | " - load Tier 2 and Tier 3 metadata into DSI\n", |
16 | 16 | " - apply a complex schema\n", |
17 | | - " - use DSI Sync to index and move data\n", |
| 17 | + " - use DSI Sync to index and move data and metadata\n", |
18 | 18 | "\n", |
19 | 19 | "This tutorial uses data from the [Cloverleaf3D](https://github.com/UK-MAC/CloverLeaf3D) Lagrangian-Eulerian hydrodynamics solver. Data is provided in dsi/examples/clover3d/. Prior to running the tutorial, follow the instructions in the [Quick Start: Installation](https://lanl.github.io/dsi/installation.html) to set up DSI.\n", |
20 | 20 | "\n" |
|
113 | 113 | "id": "51584519-2e77-4afa-983a-f69945a084c3", |
114 | 114 | "metadata": {}, |
115 | 115 | "source": [ |
116 | | - "# Exploring the loaded data" |
| 116 | + "# Exploring the loaded metadata" |
117 | 117 | ] |
118 | 118 | }, |
119 | 119 | { |
|
165 | 165 | "id": "b59cddcd-5a83-4fa3-8f4e-fd5d98381aa6", |
166 | 166 | "metadata": {}, |
167 | 167 | "source": [ |
168 | | - "# DSI Find to search within the data\n", |
| 168 | + "# DSI Find to search within the metadata\n", |
169 | 169 | "\n", |
170 | 170 | "DSI's find capability lets you explore your data by performing queries with the following modifiers, such as >, <, >=, <=, =, ==, ~ (contains), ~~ (contains), !=, and (X, Y) for a range between values X and Y. Additionally, by adding a \"True\" input will return you a collection." |
171 | 171 | ] |
|
250 | 250 | "source": [ |
251 | 251 | "# Query DSI\n", |
252 | 252 | "\n", |
253 | | - "DSI Supports direct SQL queries to the data that you have ingested" |
| 253 | + "DSI Supports direct SQL queries to the metadata that you have ingested" |
254 | 254 | ] |
255 | 255 | }, |
256 | 256 | { |
|
303 | 303 | "metadata": {}, |
304 | 304 | "source": [ |
305 | 305 | "{\n", |
| 306 | + " \"genesis_datacard\": {\n", |
| 307 | + " \"primary_key\": \"Title\"\n", |
| 308 | + " },\n", |
306 | 309 | " \"simulation\": {\n", |
307 | | - " \"primary_key\": \"sim_id\"\n", |
| 310 | + " \"primary_key\": \"sim_id\",\n", |
| 311 | + " \"foreign_key\": {\n", |
| 312 | + " \"dataset\": [\"genesis_datacard\", \"Title\"]\n", |
| 313 | + " }\n", |
308 | 314 | " }, \n", |
309 | 315 | " \"input\": {\n", |
310 | 316 | " \"foreign_key\": {\n", |
|
365 | 371 | ] |
366 | 372 | }, |
367 | 373 | { |
368 | | - "cell_type": "raw", |
369 | | - "id": "e145ba60-4f5b-4cb3-99e0-239f56794b56", |
| 374 | + "cell_type": "code", |
| 375 | + "execution_count": null, |
| 376 | + "id": "18d62564-30f0-45af-b664-30f1862b32d9", |
370 | 377 | "metadata": {}, |
| 378 | + "outputs": [], |
371 | 379 | "source": [ |
372 | 380 | "store.write(\"clover_er_diagram_no_schema.png\", \"ER_Diagram\")\n", |
373 | 381 | "\n", |
|
386 | 394 | "schema_store = DSI(\"diana_schema_tutorial.db\")\n", |
387 | 395 | "\n", |
388 | 396 | "# dsi.schema(filename)\n", |
389 | | - "schema_store.schema(\"./clover3d/schema.json\") # Schema neeeds to be defined before reading Cloverleaf data\n", |
390 | | - "\n", |
391 | | - "# Read in Datacard (Tier 1)\n", |
392 | | - "store.read(\"clover3d/genesis_datacard.xlsx\", 'GenesisDatacard')\n", |
| 397 | + "schema_store.schema(\"./clover3d/schema2.json\") # Schema neeeds to be defined before reading Cloverleaf data\n", |
393 | 398 | "\n", |
394 | 399 | "# Read in Tier 2 and Tier 3 metadata\n", |
395 | 400 | "# dsi.read(path, reader)\n", |
396 | 401 | "schema_store.read(\"./clover3d/\", 'Cloverleaf')\n", |
397 | 402 | "\n", |
| 403 | + "# Read in Datacard (Tier 1)\n", |
| 404 | + "schema_store.read(\"clover3d/genesis_datacard.xlsx\", 'GenesisDatacard')\n", |
| 405 | + "\n", |
398 | 406 | "# dsi.write(filename, writer)\n", |
399 | 407 | "schema_store.write(\"clover_er_diagram.png\", \"ER_Diagram\")" |
400 | 408 | ] |
|
425 | 433 | "source": [ |
426 | 434 | "# DSI Write - CSV\n", |
427 | 435 | "\n", |
428 | | - "DSI Support the output (write) of data if you would like to export into another project. For example, here we want to export the table \"input\" into a csv file." |
| 436 | + "DSI Support the output (write) of metadata if you would like to export into another project. For example, here we want to export the table \"input\" into a csv file." |
429 | 437 | ] |
430 | 438 | }, |
431 | 439 | { |
|
490 | 498 | "id": "8140e5fb-8932-434b-852b-a9944259024f", |
491 | 499 | "metadata": {}, |
492 | 500 | "source": [ |
493 | | - "# Moving your data with DSI" |
| 501 | + "# Moving your data and metadata with DSI" |
494 | 502 | ] |
495 | 503 | }, |
496 | 504 | { |
|
0 commit comments