Login
Introduction Version

Digital resource

A digital resource refers to all data-oriented objects manipulated within a digital lab. All digital resources are stored in the Databox (see the image below) and can also be synchronized with collaborative projects. Digital resources can be gathered in a resource set. From each digital experiment, processes utilize resources as input and produce resources as output. Users can upload digital resources into the Databox or download them from external sources, such as another digital lab.


Resources can encompass various types of objects, including data files, folders, tables, images, and more. Each resource contains different views, which are utilized to generate visualizations of the data. For example, a table can be viewed in a spreadsheet-like format or visualized as a scatter plot.


In this page, you can access to step-by-step tutorials and spotlight videos related to digital resource. For example, you can learn how to upload data to the databox, how to import a resource or how to share resources between labs. We recommend reviewing the page about the virtual laboratory ecosystem as a prerequisite to better understand the content here.



How to upload a file into the Databox?



In a digital lab, you have the capability to upload any file. Once a file is uploaded, this file is transformed into a Resource of type File that can be used within experiments.


To upload a file to the Databox, please follow these steps:


  1. Open the Databox in your lab environment.
    1. Look for the Upload files button and click on it.
      1. Select one or more files from your computer that you wish to upload.
        1. For each file, you may have the option to select the type of the file. In most cases, you can leave it as the default File type. The File is a specific type of Resource that refers to a file. Setting a specific type can be helpful if you want to convert the uploaded file into a specific File type that is required in an experiment. You can change the type of file later.
          1. Click on the Upload files button to start the upload process.
            1. You will see a progress indicator in a bottom right popup. While the upload is in progress, you can continue using the lab as usual.
              1. Once the upload is complete, the file should be available at the top of the Databox(you can also click on the success message in the popup to open the resource). You can check the size of the file in the Databox to verify that the upload was successful.

                Additionally, a Resource of type File can be imported and converted to another type of Resource , for example a Resource of type Table which is the main type of resource representing a table. To import a resource, please see the section How to import a resource ?



                How to upload a folder into the Databox?



                To upload a folder into the Databox in the lab, you have two options:


                1. Uploading each file of the folder individually: in this case, you will upload each file within the folder separately, treating them as individual resources. This method is similar to the file upload process.
                  1. Uploading the folder as a Folder resource: this option creates a single resource of type Folder. This can be useful when an process within an experiment requires a folder as an input.
                    1. To import a folder, follow these steps: Open the Databox.
                      1. Look for the Upload Folder button and click on it.
                        1. Select the folder you want to upload from your computer.
                          1. Choose whether you want to import the files individually or upload the whole folder as a single resource.
                            1. Select the appropriate type of object for the folder or files.
                              1. Click on the "Upload files" button to initiate the upload process.
                                1. You can monitor the progress of the upload in a similar manner as the file upload process.



                                  How to upload a resource from an external source?



                                  From the Databox you can also upload resources using an external link. This enables you to access files from a server and directly download them to your lab.


                                  The link can be a public link to a file. It can also be a resource share link from another lab, in this case the resource will be downloaded with the same type as the shared resource (see the section How to share a resource between labs ? for more information)


                                  To upload a resource from an external source to the Databox, please follow these steps:


                                  1. Open the Databox .
                                    1. Click on the button Upload from link .
                                      1. Paste the link of the file or the resource you want to upload into the provided field.
                                        1. Click on the "Save" button or a similar option to initiate the upload process.
                                          1. This will trigger the creation of an experiment in the background, specifically a Downloader experiment.
                                            1. If your file is very large, you may have to wait a few seconds. To monitor the progress of the download, open the execution queue panel by navigating to Settings and selecting Execution queue. Here, you should see the Downloader experiment with its progress displayed.
                                              1. Once the download is complete, the resource will be available from the Databox. You may also click on the success message in a bottom right popup to open the resource.



                                                How to manage resources?



                                                Through the Databox, you gain access to all digital resources, sorted by their creation date, with the most recent resources displayed at the top. For each resource has a name of the resource, a type (for example a type File), tags (optional), a creator and a creation date. Additionally, you will find three buttons: the first button, represented by an eye icon, opens a pop-up page displaying the resource's default view; the flag button allows you to mark a resource as important; and finally the menu button provides access to a list of actions that can be performed from the Databox.



                                                When you click on a resource, a resource page will open, displaying the resource along with a menu bar at the top and the default view. In this menu bar, you can view the name of the resource (e.g., iris.csv), which can also be modified directly by clicking on it, along with various buttons offering additional options.



                                                The list of actions from the menu button


                                                You can manage the resource using the menu button , from the Databox or from the Resource page.


                                                • Download: This allows you to export and download the resource as a file. Note that not all resources can be downloaded.
                                                  • Transformer: This option lets you modify the resource directly by calling a transformer. It will trigger a background experiment automatically.
                                                    • Update tags: Use this to change the tags of the resource. It helps in grouping and finding resources in the Databox.
                                                      • Update name: You can update the name of the resource.
                                                        • Update project: If the resource was uploaded, set the project for the resource. If the resource was generated by an experiment, this will update the project for the entire experiment and all the generated resources.
                                                          • Documentation: This provides information about the resource type.
                                                            • Delete resource (optional): This button allows you to delete a resource. However, if the resource is an output of an experiment, this button may not be displayed, and you would instead need to remove or reset your experiment to delete the resource from the Databox.


                                                            How to get information about a resource?


                                                            To view more information about the resource, follow these steps:


                                                            1. Open the resource page.
                                                              1. Click on Resource info. This will open a dialog with 4 sections:
                                                                1. Resource info: This section displays global information about the resource, such as tags, the experiment that generates it, project, type, creation date, and more.
                                                                  1. History of views: In this section, you can see all the views previously generated for this resource. Simply click on a view to see it.
                                                                    1. Experiments that use the resource: This section lists all the experiments that use this resource as input. Click on an experiment to open it.
                                                                      1. Reports that use the resource: Here, you can find a list of reports that contain a view of this resource. Click on a report to open it.


                                                                      What is a flagged resource?


                                                                      A flagged resource is a resource that is easily available in the Databox. Flagged resources are marked as important and intended to be easily found.


                                                                      By default, only the output resources of an experiment are flagged; intermediate resources of an experiment are not flagged. Uploaded resources are also flagged by default.


                                                                      You have the flexibility to change the flag status of a resource at any time. Simply click on the flag button of the resource in the Databox or on the Resource page.



                                                                      How to share resources between digital labs?



                                                                      Sharing resources between labs is easy, it allows one lab to download a resource generated by another lab. To do so, follow these steps:


                                                                      1. Open the Resource page.
                                                                        1. Click on the Share button.
                                                                          1. The share object popup will appear. If there is no share link, you can create a new one. If there is a share link, it will be displayed. At the bottom of the dialog, you can access the list of labs that used the shared link and downloaded the resource, which can be useful for traceability.
                                                                            1. If you don't have an existing sharing link, click on the Share resource button to create a new share link.
                                                                              1. Provide an expiration date for the link and click on save.
                                                                                1. The share link will be generated. You can copy it, update its validity, or delete it if needed.


                                                                                  To download the resource in another lab follow these steps


                                                                                  1. Copy the link
                                                                                    1. Open the lab
                                                                                      1. Open the databox, and click on Upload from link.
                                                                                        1. Paste the link and wait for the download to finish. The resource will now be accessible in the new lab. For more information, refer to the instructions on "How to upload a resource from an external source?".
                                                                                          1. In the first lab you should be able to see that the resource was downloaded by the second lab.


                                                                                            You can monitor all the active share links of your lab in the monitoring section. See https://constellab.community/bricks/gws_academy/latest/doc/digital-lab/monitoring#share-links



                                                                                            How to import a resource?



                                                                                            When you upload a file to Databox, it creates a resource of type File. For example, if you upload a CSV file, you may want to convert it to a resource of type Table, which is the main type of resource representing a table. A Table resource can be used in an experiment by a large variety of task. To do this, you need to import the resource. Importing a resource converts a File to a specific type. This process is important for traceability because it stores the import parameters, such as whether the header was used or the index were provided for rows.


                                                                                            To import a resource (not only .csv files), follow these steps:


                                                                                            1. Go to the Resource page or Databox.
                                                                                              1. Click on the menu button of the resource.
                                                                                                1. From the menu options, select Import resource (if the button is not available, it means the resource is not a File).
                                                                                                  1. By default, an importer is selected based on the file extension. For example, the Table importer is used by default for .csv, .xlsx... files. You can choose another importer if you want to import a resource of different type.
                                                                                                    1. Fill in the configuration of the importer based on your file data (check advanced config if needed).
                                                                                                      1. Click on Import resource.
                                                                                                        1. Once finished, the imported resource should open. You can check if the import was successful. If not, you can delete the resource and restart the import with a different configuration.
                                                                                                          1. Now your resource is ready to be used in an experiment !



                                                                                                            How to export a resource?



                                                                                                            Exporting a resource is the opposite of importing. It creates a file from the resource. This can be useful when a process requires a file instead of a basic resource. For example, certain tasks, like the env live task, only accept files as input because the script runs in a virtual environment. In such cases, you may need to export the resource first.


                                                                                                            To export a resource, follow these steps:


                                                                                                            1. Open the playground of an experiment.
                                                                                                              1. Add a process of type exporter (you can search for them using the filter).
                                                                                                                1. Make sure there is a compatible exporter available for your resource.
                                                                                                                  1. Connect your resource to this process.
                                                                                                                    1. That's it! Your resource should be exported to a file on the output of the exporter.