Datalore 2024.4 Help

Add workspace files

This article explains how to add files into a workspace to make them available for all notebooks that this workspace contains.

  • When in a notebook, workspace files can be found via the Attached data tool, in the [workspace_name] files category.

  • To use such files in your code, specify the full file path (/data/workspace_name/file_name).

  • To access Private workspace files in a notebook, attach them first.

Add files into a workspace from the Home page

The procedures in this chapter explain how to upload or create files for a workspace using the interface of the Home page.

Upload files into a workspace from the Home page

  1. From the left-hand menu of the Home page, select the workspace where you want to add your files.

  2. Click the Import button in the upper right corner.

  3. Select Upload files from the expanded list of options.

    Uploading files or folder
  4. Use the file browser to select files for upload.

  5. (Optional) If some of the selected files are notebooks, you will see the Import notebook dialog, which will suggest importing them as notebook. Select one of the options:

    • Import will import these files to the Notebooks section of the workspace.

    • Upload will upload these files to the Data section of the workspace.

    • Cancel will abort the upload process.

    Import notebook dialog

Upload a folder into a workspace from Home page

The procedure adds a folder from your local file system to a selected workspace using the Home page interface.

  1. From the left-hand menu of the Home page, select the workspace where you want to upload your folder.

  2. Click the Import button in the upper right corner.

  3. Select Upload folder from the expanded list of options.

    Uploading files or folder
  4. Use the file browser to select and upload a folder.

  5. In the confirmation dialog, click the Upload button.

  6. (Optional) Select how you want to upload the files of the folder in the Import notebooks and files dialog. By default, Datalore will suggest importing notebooks to a new folder in the Notebooks section of the workspace, and the other files to a folder with the same name in the Data | Files section. Switch the tabs to move between the two categories and do the following:

    • To exclude a file from the upload, deselect the respective checkbox.

    • To upload a notebook as a file in the Data section of the workspace, expand the list in the Import as column and select File.

    Import notebooks and files dialog
  7. Click the Import button to finish the procedure.

Create a file or a folder in a workspace

The procedure creates a new file that will be added to the resources of the selected workspace and available for all notebooks this workspace contains.

  1. From the left-hand menu of the Home page, select the workspace where you want to upload your folder.

  2. In the expanded workspace menu of the selected workspace, select Data from the left-hand menu.

    Workspace files menu
  3. Click the Add button in the upper right corner.

  4. Select New file or New folder from the expanded list of options.

    Selecting New file option

    This will add a new file or folder to the Files list with its name highlighted for editing.

  5. Provide a name for the newly added object and press Enter.

Add workspace files from the editor

When you're working on a notebook in the editor, you can add files into the respective workspace by using the Attached data tool.

Upload files into a workspace via Attached data

The procedure uploads files into the workspace of the notebook opened in the editor.

  1. Open the Attached data from the left-hand sidebar of the editor.

  2. Expand the list of workspace files on the Files tab.

  3. Click the plus icon on the toolbar.

    Uploading files into a workspace, Attached data
  4. Use one of the options:

    • To upload individual files, select Upload files and use the file browser to select files to upload.

    • To upload a folder, select Upload folder and use the file browser to select a folder to upload.

Create files for a workspace via Attached data

The procedure creates text-based files (CSV, TSV, and other formats) as source files for the workspace of the notebook opened in the editor.

  1. Open the Attached data from the left-hand sidebar of the editor.

  2. Expand the list of workspace files on the Files tab.

  3. Click the plus icon on the toolbar.

    Uploading files into a workspace, Attached data
  4. Select New file from the menu.

    This will add a file called New file to the [workspace_name] files category.

  5. Provide a name for the new file and specify its extension. You can create any text-based file (CSV, TSV, and other formats).

  6. To open and edit the file in the text editor, double-click it. The changes that you make are saved automatically every ten seconds or on the explicit ⌘+S action.

Result and further actions

  • Files and folders added to a workspace are automatically attached to all of its notebooks, which means you can immediately start using them in the code.

  • Private workspace files must first be attached to the notebook.

  • To manage workspace files on the Home page, refer to this topic.

  • To manage workspace files as attached to a notebook, refer to this topic.

  • Refer to this topic to learn how to view and use files from a workspace in one of its notebooks.

Last modified: 21 November 2024