Importing Dataset schemas into a Knowledge Graph with the Guacamole VM and VRE Command Line Tool

Last modified by publicadmin on 2025/12/16 13:04

VRE users are able to import Dataset schemas in JSON format into the VRE Blue Brain Nexus Knowledge Graph using the VRE Command Line Tool within the workbench Guacamole Virtual Machine.

1. Access to Command Line Tool within Guacamole VM

Please visit this page: VRE User Guide/Analyzing Data/Gucamole for details on

  • What is Guacamole VM workbench tool?
  • How to request access to my project's Guacamole VM workbench tool?
  • How to access into Guacamole VM and launch terminal?

2. User login through Command Line Tool

Please visit the page: VRE User Guide/Analyzing Data/Guacamole/Access to Project data in Guacamole VM using VRE Command Line Tool for details on

  • How to launch VRE Command Line Tool within VM terminal?
  • How to login to the VRE by their Charite AD credentials within Command Line Tool?

3. Download Dataset schemas through Command Line Tool

Please visit the page: VRE User Guide/Analyzing Data/Guacamole/Access to Project data in Guacamole VM using VRE Command Line Tool for details on

  • How to use Command Line Tool to download Dataset schemas in JSON format from Project into Workbench VM?

4. Import Dataset schemas into Knowledge Graph

After downloading Dataset JSON schemas from Project, users are then able to import schemas into Blue Brain Nexus Knowledge Graph as Resources using the Command Line Tool. Considering the Dataset schemas are usually organized within a root folder with sub-folders inside, such as:

  • Stroke_Dataset_Schema
    • DatasetVersion
      • DatasetVersion.json
    • Subject
      • Subject.json
    •  FileBundle
      • FileBundle.json

So the VRE Command Line Tool supports users directly provide a folder, and all JSON schemas within the folder can be extracted and imported into Knowledge Graph. 

a. Let's take a look what options users need to provide in order to import schemas by typing vrecli kg_resource --help :

$ vrecli kg_resource --help
Usage: vrecli kg_resource [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  import  Import VRE dataset schema into BlueBrainNexus

As part of the schema importing command, users are required to provide the option of:

  • the path of JSON schema(s) you want to import, i.e., ./datasetVersion.json
  • Or, the folder path which groups all JSON schemas inside, i.e.,  ./stroke_dataset_schema

b. Example 1: one JSON schema of datasetVersion.jsoncan be imported from user's Home Directory into Blue Brain Nexus Knowledge Graph as a Resource by typing vrecli kg_resource import ./datasetVersion.json 

$ vrecli kg_resource import ./datasetVersion.json 
Resource imported successfully: ./datasetVersion.json

c. Example 2: batch of JSON schemas in one root folder can be imported from user's Home Directory into Blue Brain Nexus Knowledge Graph, each schema will be imported as one Resource, by typing vrecli kg_resource import ./stroke_dataset_schema

$ vrecli kg_resource import ./stroke_dataset_schema 
File imported:
stroke_dataset_schema/ethicsAssessment/e43690b0-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/protocol/e4350b82-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/species/e43ff678-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileBundle/f6f85b16-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileBundle/0454272c-22d5-11ec-a97f-0242ac110002,
stroke_dataset_schema/person/e4375b30-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/subjectGroup/e441b76a-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/subjectGroup/e4436ba0-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/subjectState/0451f81c-22d5-11ec-a97f-0242ac110002,
stroke_dataset_schema/subjectState/f6f5f24a-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/digitalIdentifierSchema/e4334ed2-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileInstance/045b2388-22d5-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileInstance/f6ff6faa-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileInstance/f6fc6d28-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileInstance/045c2f6c-22d5-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileInstance/f6fb6072-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileInstance/f6fd7088-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileInstance/045a287a-22d5-11ec-a97f-0242ac110002,
stroke_dataset_schema/fileInstance/f6fe72bc-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/dataset/dataset.json,
stroke_dataset_schema/fileRepository/e4381976-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/datasetType/e4395e8a-22d4-11ec-a97f-0242ac110002.json,
stroke_dataset_schema/digitalIdentifier/e433bfa2-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/subject/04533cd6-22d5-11ec-a97f-0242ac110002,
stroke_dataset_schema/subject/f6f75be4-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/productAccessibility/e4340cf0-22d4-11ec-a97f-0242ac110002,
stroke_dataset_schema/license/e436dcdc-22d4-11ec-a97f-0242ac110002

https://i.creativecommons.org/l/by-sa/4.0/88x31.png

Copyright © 2022, Indoc Research. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0  International License.