Connecting to Google Drive
Written by
Updated at August 29, 2023
You can connect to the Google Drive
Getting started
Open the DataSphere project:
-
Select the relevant project in your community or on the DataSphere homepage
in the Recent projects tab. - Click Open project in JupyterLab and wait for the loading to complete.
- Open the notebook tab.
Uploading the contents from a file on Google Drive to a DataSphere project file
-
Go to a new cell and copy the command to import the contents from a file on Google Drive to it:
# %pip install gdown if needed import gdown gdrive_file_id = '<Google_Drive_file_ID>' dst_path = '<DataSphere_project_file_path>' gdown.download(id=gdrive_file_id, output=dst_path)
Where:
<Google_Drive_file_ID>
: ID of the Google Drive file , the content of which needs to be imported to DataSphere.<DataSphere_project_file_path>
: Path to the DataSphere project file to import data to.
-
Run the cell. To do this, choose Run → Run Selected Cells or press Shift + Enter.
Uploading the contents from a folder on Google Drive to a DataSphere project folder
-
Go to a new cell and copy the command to import the contents from a folder on Google Drive to it:
# %pip install gdown if needed import gdown gdrive_folder_id = '<Google_Drive_folder_ID>' dst_path = '<DataSphere_project_folder_path>' gdown.download_folder(id=gdrive_folder_id, output=dst_path)
Where:
<Google_Drive_folder_ID>
: ID of the Google Drive folder , the content of which needs to be imported to DataSphere.<DataSphere_project_folder_path>
: Path to the DataSphere project folder to import data to.
-
Run the cell.