---
title: Ingest data from Google Drive
description: Create a managed Google Drive ingestion pipeline in Lakeflow Connect using the Databricks UI, Declarative Automation Bundles, or a notebook.
canonical_url: https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-pipeline
---

# Ingest data from Google Drive

Create a managed Google Drive ingestion pipeline in Lakeflow Connect using the Databricks UI, Declarative Automation Bundles, or a notebook. The pipeline ingests files from Google Drive into Delta tables and keeps them in sync with the source.

## Prerequisites

* To create the ingestion pipeline, you must first meet the following requirements:

  * Your workspace must be enabled for Unity Catalog.

  * Serverless compute must be enabled for your workspace. See [Serverless compute requirements](https://docs.databricks.com/aws/en/compute/serverless/index.md#requirements).

  * To create a new connection, you must have `CREATE CONNECTION` privileges on the metastore. See [Manage privileges in Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md).

    If the connector supports UI-based pipeline authoring, an admin can create the connection and the pipeline at the same time by completing the steps on this page. However, if the users who create pipelines use API-based pipeline authoring or are non-admin users, an admin must first create the connection in Catalog Explorer. See [Connect to managed ingestion sources](https://docs.databricks.com/aws/en/connect/managed-ingestion.md).

  * To use an existing connection, you must have `USE CONNECTION` privileges or `ALL PRIVILEGES` on the connection object.

  * You must have `USE CATALOG` privileges on the target catalog.

  * You must have `USE SCHEMA` and `CREATE TABLE` privileges on an existing schema or `CREATE SCHEMA` privileges on the target catalog.

* Create a Unity Catalog connection. See [Overview of Google Drive ingestion setup](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-source-setup.md).

## Create an ingestion pipeline

For a list of supported file formats and connector-specific limitations, see [Google Drive connector limitations](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-limits.md).

### Databricks UI

1. In the sidebar of the Databricks workspace, click **Data Ingestion**.

2. On the **Add data** page, in the **Databricks connectors** section, click **Google Drive**.

3. In the **Connection** step of the ingestion wizard, select the connection that stores your Google Drive access credentials.

4. Click **Next**.

5. In the **Ingestion setup** step, enter a name for the pipeline.

6. Select a catalog and a schema to save the pipeline in.

7. Click **Create ingestion pipeline and start compute**.

8. In the **Source** step, enter the URL of each Google Drive file, folder, drive, or shared drive to ingest from, then configure the file ingestion options.

9. Click **Save and continue**.

10. In the **Destination** step, select a catalog and a schema to load data into. If you have `USE CATALOG` and `CREATE SCHEMA` privileges on the catalog, you can click **![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) Create schema** in the drop-down menu to create a new schema.

11. Click **Save and continue**.

12. (Optional) In the **Schedules and notifications** step, click **![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) Create schedule**. Set the frequency to refresh the destination tables.

13. (Optional) Click **![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) Add notification** to set email notifications for pipeline operation success or failure.

14. Click **Save and run pipeline**.

### Declarative Automation Bundles

Use Declarative Automation Bundles to manage Google Drive pipelines as code. Bundles can contain YAML definitions of jobs and tasks, are managed using the Databricks CLI, and can be shared and run in different target workspaces (such as development, staging, and production). For more information, see [What are Declarative Automation Bundles?](https://docs.databricks.com/aws/en/dev-tools/bundles/index.md).

1. Create a bundle using the Databricks CLI:

   ```bash
   databricks bundle init
   ```

2. Add two new resource files to the bundle:
   * A pipeline definition file (for example, `resources/gdrive_pipeline.yml`). See [pipeline.ingestion\_definition](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition) and [Examples](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-pipeline.md#examples).
   * A job definition file that controls the frequency of data ingestion (for example, `resources/gdrive_job.yml`).

3. Deploy the pipeline using the Databricks CLI:

   ```bash
   databricks bundle deploy
   ```

### Databricks notebook

1. Import the following notebook into your Databricks workspace:

   [Get notebook](https://docs.databricks.com/notebooks/source/saas-cdc/google-drive-pipeline.html)

2. Do not modify cell one.

3. Modify cell three with your pipeline configuration details. See [pipeline.ingestion\_definition](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition) and [Examples](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-pipeline.md#examples).

4. Click **Run all**.

## <a id="examples" />Examples

Use these examples to configure your pipeline.

### <a id="binaryfile-ingestion" />Ingest files as unstructured data

Ingest all files in a Google Drive folder as binary content. Use this approach for PDFs, Office documents, and other files you intend to process downstream, for example for RAG applications.

> [!NOTE]
>
> Available in Beta, the [`FILE`](https://docs.databricks.com/aws/en/sql/language-manual/data-types/file-type.md) type stores a governed reference to each file and its metadata instead of the file's bytes, which improves read performance. To ingest files as the `FILE` type instead of `BINARYFILE`, see [Ingest files as the FILE type (Beta)](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-pipeline.md#file-type-ingestion).

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    gdrive_binary_pipeline:
      name: gdrive_binary_pipeline
      catalog: main
      schema: ingest_destination_schema
      ingestion_definition:
        connection_name: <gdrive-connection>
        objects:
          - table:
              destination_catalog: main
              destination_schema: ingest_destination_schema
              destination_table: drive_folder
              connector_options:
                gdrive_options:
                  entity_type: FILE
                  url: https://drive.google.com/drive/folders/<folder_id>
                  file_ingestion_options:
                    format: BINARYFILE
                    schema_evolution_mode: NONE
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "catalog": "main",
  "schema": "ingest_destination_schema",
  "ingestion_definition": {
    "connection_name": "<gdrive-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "main",
          "destination_schema": "ingest_destination_schema",
          "destination_table": "drive_folder",
          "connector_options": {
            "gdrive_options": {
              "entity_type": "FILE",
              "url": "https://drive.google.com/drive/folders/<folder_id>",
              "file_ingestion_options": {
                "format": "BINARYFILE",
                "schema_evolution_mode": "NONE"
              }
            }
          }
        }
      }
    ]
  }
}
"""
create_pipeline(pipeline_spec)
```

### <a id="file-type-ingestion" />Ingest files as the FILE type (Beta)

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

Ingest files as the [`FILE`](https://docs.databricks.com/aws/en/sql/language-manual/data-types/file-type.md) type to store a governed reference to each file and its metadata instead of the file's bytes. The destination table exposes a `file` column that you can pass to functions such as [`ai_parse_document` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/ai_parse_document.md) and to [user-defined functions (UDFs)](https://docs.databricks.com/aws/en/udf/index.md).

To use the `FILE` type, configure the following in your pipeline:

* Set the pipeline `channel` to `PREVIEW`.
* Set `file_ingestion_options.format` to `FILE`.
* Set the `databricks.filespace-preview` table property to declare the volume Unity Catalog uses as managed storage.

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    gdrive_file_pipeline:
      name: gdrive_file_pipeline
      channel: PREVIEW
      catalog: <catalog>
      schema: <schema>
      ingestion_definition:
        connection_name: <gdrive-connection>
        objects:
          - table:
              destination_catalog: <catalog>
              destination_schema: <schema>
              destination_table: <destination-table>
              table_configuration:
                table_properties:
                  databricks.filespace-preview: /Volumes/<catalog>/<schema>/<volume>/
              connector_options:
                gdrive_options:
                  entity_type: FILE
                  url: https://drive.google.com/drive/folders/<folder_id>
                  file_ingestion_options:
                    format: FILE
                    schema_evolution_mode: NONE
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "channel": "PREVIEW",
  "catalog": "<catalog>",
  "schema": "<schema>",
  "ingestion_definition": {
    "connection_name": "<gdrive-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "<catalog>",
          "destination_schema": "<schema>",
          "destination_table": "<destination-table>",
          "table_configuration": {
            "table_properties": {
              "databricks.filespace-preview": "/Volumes/<catalog>/<schema>/<volume>/"
            }
          },
          "connector_options": {
            "gdrive_options": {
              "entity_type": "FILE",
              "url": "https://drive.google.com/drive/folders/<folder_id>",
              "file_ingestion_options": {
                "format": "FILE",
                "schema_evolution_mode": "NONE"
              }
            }
          }
        }
      }
    ]
  }
}
"""
create_pipeline(pipeline_spec)
```

### <a id="structured-ingestion" />Ingest structured files with a path filter

Ingest CSV files from a Google Drive folder. Use `file_filters` to restrict ingestion to files matching a glob pattern.

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    gdrive_csv_pipeline:
      name: gdrive_csv_pipeline
      catalog: main
      schema: ingest_destination_schema
      ingestion_definition:
        connection_name: <gdrive-connection>
        objects:
          - table:
              destination_catalog: main
              destination_schema: ingest_destination_schema
              destination_table: csv_files
              connector_options:
                gdrive_options:
                  entity_type: FILE
                  url: https://drive.google.com/drive/folders/<folder_id>
                  file_ingestion_options:
                    format: CSV
                    schema_evolution_mode: NONE
                    file_filters:
                      - path_filter: '*.csv'
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "catalog": "main",
  "schema": "ingest_destination_schema",
  "ingestion_definition": {
    "connection_name": "<gdrive-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "main",
          "destination_schema": "ingest_destination_schema",
          "destination_table": "csv_files",
          "connector_options": {
            "gdrive_options": {
              "entity_type": "FILE",
              "url": "https://drive.google.com/drive/folders/<folder_id>",
              "file_ingestion_options": {
                "format": "CSV",
                "schema_evolution_mode": "NONE",
                "file_filters": [
                  { "path_filter": "*.csv" }
                ]
              }
            }
          }
        }
      }
    ]
  }
}
"""
create_pipeline(pipeline_spec)
```

### <a id="file-metadata-ingestion" />Ingest file metadata only

Ingest file metadata (name, size, timestamps, path) without downloading file contents. Use this approach when you require an inventory of files without the overhead of ingesting their content.

#### Declarative Automation Bundles

```yaml
resources:
  pipelines:
    gdrive_metadata_pipeline:
      name: gdrive_metadata_pipeline
      catalog: main
      schema: ingest_destination_schema
      ingestion_definition:
        connection_name: <gdrive-connection>
        objects:
          - table:
              destination_catalog: main
              destination_schema: ingest_destination_schema
              destination_table: file_metadata
              connector_options:
                gdrive_options:
                  entity_type: FILE_METADATA
                  url: https://drive.google.com/drive/folders/<folder_id>
                  file_ingestion_options:
                    format: BINARYFILE
                    schema_evolution_mode: NONE
```

#### Databricks notebook

```python
pipeline_spec = """
{
  "name": "<pipeline-name>",
  "catalog": "main",
  "schema": "ingest_destination_schema",
  "ingestion_definition": {
    "connection_name": "<gdrive-connection>",
    "objects": [
      {
        "table": {
          "destination_catalog": "main",
          "destination_schema": "ingest_destination_schema",
          "destination_table": "file_metadata",
          "connector_options": {
            "gdrive_options": {
              "entity_type": "FILE_METADATA",
              "url": "https://drive.google.com/drive/folders/<folder_id>",
              "file_ingestion_options": {
                "format": "BINARYFILE",
                "schema_evolution_mode": "NONE"
              }
            }
          }
        }
      }
    ]
  }
}
"""
create_pipeline(pipeline_spec)
```

### <a id="bundle-job-definition-file" />Declarative Automation Bundles job definition file

The following is an example job definition file for use with Declarative Automation Bundles. The job runs every day, exactly one day from the last run.

#### Declarative Automation Bundles

```yaml
resources:
  jobs:
    gdrive_job:
      name: gdrive_job

      trigger:
        periodic:
          interval: 1
          unit: DAYS

      email_notifications:
        on_failure:
          - <email-address>

      tasks:
        - task_key: refresh_pipeline
          pipeline_task:
            pipeline_id: ${resources.pipelines.gdrive_binary_pipeline.id}
```

## Configure file ingestion options

The `file_ingestion_options` block controls how files are processed. All options are set inside the `gdrive_options.file_ingestion_options` block in the pipeline definition.

### File filters

Use `file_filters` to restrict which files are ingested from the source URL:

```json
"file_ingestion_options": {
  "format": "CSV",
  "file_filters": [
    { "path_filter": "invoices/*.csv" },
    { "modified_after": "2026-01-01T00:00:00" }
  ]
}
```

For full `file_ingestion_options` parameter reference, see [Google Drive connector reference](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-reference.md).

### Schema evolution

Set `schema_evolution_mode` to control how new columns in incoming files are handled. Modes match Auto Loader schema evolution modes. For details, see [Google Drive connector reference](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-reference.md).

### Schema hints

Override inferred column types using `schema_hints`:

```json
"file_ingestion_options": {
  "format": "CSV",
  "schema_hints": "order_id INT, amount DOUBLE, ts TIMESTAMP"
}
```

See [Override schema inference with schema hints](https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/schema.md#override-schema-inference-with-schema-hints) for usage details.

### Format-specific options

Pass format-specific options using `format_options`:

```json
"file_ingestion_options": {
  "format": "CSV",
  "format_options": {
    "header": "true",
    "sep": ","
  }
}
```

Supported keys are the standard Auto Loader format options. See [Format options](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-reference.md#format-options).

## <a id="common-patterns" />Common patterns

For advanced pipeline configurations, see [Common patterns for managed ingestion pipelines](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/common-patterns.md).

## <a id="next-steps" />Next steps

Start, schedule, and set alerts on your pipeline. See [Common pipeline maintenance tasks](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/pipeline-maintenance.md).

## <a id="additional-resources" />Additional resources

* [Google Drive connector FAQs](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-faq.md)
* [Google Drive connector limitations](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-limits.md)
* [Google Drive connector reference](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-reference.md)
* [Troubleshoot Google Drive ingestion](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/google-drive-troubleshoot.md)
