Datalore 2025.6 Help

Connect to Google Drive

Google Drive is a cloud-based storage service offered by Google that allows users to store, sync, and share files across devices.

With the Google Drive connector, Datalore allows you to access data in your Google Drive folders from your notebook environment. You can query datasets directly using SQL, Python, Scala, Kotlin, or R without the need for intermediate data exports.

Security considerations
  • Once you create a connection, all the files and subfolders in the selected folder become available in the Attach Attached data section. The content of this folder can be accessed by anyone who has edit permissions for the notebook or workspace. Keep this in mind when you share a workspace or notebook that uses your Google Drive connection.

  • Other users cannot access any content in your Google Drive beyond the selected folder, and they cannot select another folder in an existing connection.

  • Google Drive credentials cannot be accessed from the notebook runtime environment, for example, as environment variables.

Step 1. Create a connection

You can create a Google Drive connection either in your notebook or workspace.

  1. To create a connection:

    1. In the sidebar on the Home page, select the workspace where you want to add a Google Drive connection.

    2. In the sidebar, select Document Data and switch to the Cloud storage tab.

      Cloud storage tab
    3. Click Plus icon New cloud storage connection at the top right.

    4. In the New cloud storage connection dialog, select Google Drive.

    1. Open the notebook where you want to add a Google Drive connection.

    2. In the sidebar, select Attach (Attached data) and switch to the Cloud storage tab.

      Cloud storage tab in the Attached data section
    3. Click Plus New cloud storage.

    4. In the New cloud storage connection dialog, select Google Drive.

  2. In the pop-up window, log in to the Google account you want to connect, or select it from the list if you are already logged in.

  3. Follow the prompts and allow access to your Google Drive.

Step 2. Configure the connection

  1. In the New Google Drive cloud storage connection dialog, enter the data source name in Display name.

    This name also becomes part of the path where the connection is mounted.

    New Google Drive cloud storage connection dialog
  2. Select a folder in your Google Drive that you want to use as the data source.

  3. Click Create and close.

Step 3. Attach the connection to a notebook

  1. Open the notebook you want to attach the connection to.

  2. If the notebook is not running, start it by clicking Run | Start machine.

  3. In the sidebar, select Attach (Attached data) and switch to the Cloud storage tab.

  4. Enable the toggle in your Google Drive connection.

    Google Drive connection сard in the Attached data section

Step 4. Use the connection in the notebook

After the connection is mounted, you can access files in the Google Drive folder from your notebook code:

import pandas as pd df = pd.read_csv(f"/data/google_drive/my_file.csv") df
%use dataframe val df = DataFrame.readCsv("/data/google_drive/my_file.csv") df
val lines = scala.io.Source.fromFile("/data/google_drive/my_file.txt").mkString
df <- read.csv("/data/google_drive/my_file.csv") print(df)

The connection’s mount path, such as /data/google_drive/, is shown on the connection card. To copy the path, click ∙∙∙ | Copy directory path.

    Next steps

    Keywords

    cloud storage, cloud storage connection, attach data, data sources, Google Drive, connect to remote folders, connect to remote storages

    24 November 2025