[Yandex Cloud documentation](../../../index.md) > [Yandex DataSphere](../../index.md) > [Step-by-step guides](../index.md) > Connecting to data sources > Connecting to Google Drive

# Connecting to Google Drive

You can connect to [Google Drive](https://drive.google.com) from within the DataSphere interface.

## Getting started {#before-begin}

Open the DataSphere project:

1. Select the project in your community or on the DataSphere [home page](https://datasphere.yandex.cloud) in the **Recent projects** tab.
1. Click **Open project in JupyterLab** and wait for the loading to complete.
1. Open the notebook tab.

## Importing the contents from a file on Google Drive to a DataSphere project file {#get-file}

1. Go to a new cell and paste the command to import the contents from a file on Google Drive:

    ```python
    # %pip install gdown if needed

    import gdown

    gdrive_file_id = '<Google_Drive_file_ID>'
    dst_path = '<path_to_file_in_DataSphere_project>'

    gdown.download(id=gdrive_file_id, output=dst_path)
    ```

    Where:

    * `<Google_Drive_file_ID>`: [ID of the Google Drive file](https://developers.google.com/drive/api/guides/about-files?hl=en#file_characteristics) whose contents you need to import to DataSphere.
    * `<path_to_file_in_DataSphere_project>`: Path to the DataSphere project file to import data to.

1. Run the cell by selecting **Run** → **Run Selected Cells** or pressing **Shift** + **Enter**.

## Importing the contents from a folder on Google Drive to a DataSphere project folder {#get-dir}

1. Go to a new cell and paste the command to import the contents from a folder on Google Drive:

    ```python
    # %pip install gdown if needed

    import gdown

    gdrive_folder_id = '<Google_Drive_folder_ID>'
    dst_path = '<path_to_folder_in_DataSphere_project>'

    gdown.download_folder(id=gdrive_folder_id, output=dst_path)
    ```

    Where:

    * `<Google_Drive_folder_ID>`: [ID of the Google Drive folder](https://developers.google.com/drive/api/guides/about-files?hl=en#file_characteristics) whose contents you need to import to DataSphere.
    * `<path_to_folder_in_DataSphere_project>`: Path to the DataSphere project folder to import data to.

1. Run the cell.