Add files
The procedures in this article explain how to upload files into your workspaces and notebooks.
Procedures
Upload files into a workspace from Home page
The procedure adds files from your local file system to a selected workspace using the Home page interface.
From the left-hand menu of the Home page, select the workspace where you want to add your files.
Click the Import button in the upper right corner.
Select Upload files from the expanded list of options.
Use the file browser to select files for upload.
(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.
Results
Unless it's the default Private workspace, the uploaded files are automatically attached to all of the workspace's notebooks. Private workspace data files must be attached using the Attached data tool.
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.
From the left-hand menu of the Home page, select the workspace where you want to upload your folder.
In the expanded workspace menu of the selected workspace, select Data from the left-hand menu.
Click the Import button in the upper right corner.
Select Upload folder from the expanded list of options.
Use the file browser to select and upload a folder.
In the confirmation dialog, click the Upload button.
(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 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.
Click the Upload button to finish the procedure.
Results
Unless it's the default Private workspace, the uploaded folder is automatically attached to all of the workspace's notebooks. Private workspace data folders must be attached using the Attached data tool.
If the uploaded folder contained both notebooks that you imported to the Not
Upload files as notebook attachments
The procedure adds files from your local file system or a URL to the attached data of a selected notebook. You can upload files:
As notebook files: they will be stored in the notebook attachments (/data/notebook_files directory).
As workspace files: they will be stored in the respective workspace attachments (/data/workspace_files directory)
Into an attached cloud storage: they will be stored in the cloud storage (/data/[cloud_storage_name] directory)
Open the Attached data from the left-hand sidebar of the editor.
Select where you want to add files:
To add file to the notebook attached files, stay on the Files tab.
To add files to the respective workspace, expand the list of workspace files on the Files tab.
To add files to a cloud storage, switch to the Cloud storages tab and click the required cloud storage to expand it in detail view.
Open the menu of file adding options:
On the Files tab: Click the plus icon on the toolbar.
On the Cloud storages tab, click the ellipsis for the cloud storage you opened in detail view.
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 notebook attachments
The procedure creates text-based files (CSV, TSV, and other formats) as source files for your notebook.
Select where you want to create files:
To create files in the notebook attached files, stay on the Files tab.
To create files in the respective workspace, expand the list of workspace files on the Files tab.
To create files in a cloud storage, switch to the Cloud storages tab and click the required cloud storage to expand it in detail view.
Open the menu of file adding options:
On the Files tab: Click the plus icon on the toolbar.
On the Cloud storages tab, click the ellipsis for the cloud storage you opened in detail view.
Select New file from the menu.
This will add a file called New file.
Provide a name for the new file and specify its extension. You can create any text-based file (CSV, TSV, and other formats).
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.
Quick file upload
The quickest way to add a file to your notebook and start using it in the code is to drag it from your file system and drop it anywhere in the editor.
This will automatically add the file to the notebook files that you can find in the Attached data tool.
Results and further actions
If added to a specific notebook, the new files are only available inside this notebook.
If added to a workspace other than the default Private workspace, the new files are available inside all notebooks residing in this workspace.
If added to the default Private workspace, the new files can be available inside any notebook residing in this workspace once attached to it.
Keywords
upload files, attach files, add files, data sources, data, data files, notebook attachments