Google Drive connector reference
This page contains reference documentation for the Google Drive connector in Databricks Lakeflow Connect.
gdrive_options parameters
Set these options inside the connector_options.gdrive_options block of each table in your pipeline definition.
Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | The type of entity to ingest. Supported values:
|
| String | Yes | The URL of the Google Drive folder or shared drive to ingest from. Examples:
|
| Object | Yes | Controls file format and ingestion behavior. See |
file_ingestion_options parameters
Set these options inside gdrive_options.file_ingestion_options.
Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | The file format to ingest. Supported values: |
| Array of objects | No | Filters that restrict which files are ingested. Each filter object can contain one of the following keys:
|
| String | No | Controls how new columns in incoming files are handled. Modes match Auto Loader schema evolution modes. Supported values: |
| String | No | Overrides inferred column types. Specify as a comma-separated list of |
| Object | No | Format-specific parsing options. Keys are standard Auto Loader format option names. See Format options. |
table_configuration parameters
Set these options inside the table_configuration block of each table in your pipeline definition. table_configuration is a sibling of connector_options, not nested inside it.
Parameter | Type | Required | Description |
|---|---|---|---|
| String | No | The storage mode for the destination table. Supported values:
Because these are the defaults and the only supported values, setting |
Format options
The format_options block accepts standard Auto Loader format option keys, organized below by file format. For details, see Auto Loader.
JSON
Key | Description |
|---|---|
| Allows backslashes to escape any character. |
| Allows Java- and C++-style comments in JSON content. |
| Allows |
| Allows leading zeros in integer values. |
| Allows single quotes as string delimiters in addition to double quotes. |
| Allows unquoted control characters in JSON strings. |
| Allows unquoted field names. |
| Path to store corrupt or unparseable records instead of failing the pipeline. |
| Character encoding of the file (for example, |
| Pattern for parsing date strings (for example, |
| Ignores columns where all values are null or empty during schema inference. |
| Infers |
| Line separator character or string. |
| Locale for parsing dates and numbers (for example, |
| Behavior for malformed records: |
| Parses records that span multiple lines. |
| Infers |
| Infers all primitive values as |
| Enables case-sensitive column name matching against the schema. |
| Pattern for parsing timestamp strings (for example, |
| Time zone for parsing timestamps (for example, |
CSV
Supports all JSON options above, plus the following CSV-specific options:
Key | Description |
|---|---|
| Escape character used before a quote character inside a quoted field. |
| Character that marks a line as a comment; lines beginning with this character are skipped. |
| Column delimiter character (default: |
| String to use for empty values when writing. |
| Applies the declared schema to CSV data, ignoring header names. |
| Escape character (default: |
| Whether the first row contains column names (default: |
| Trims leading whitespace from values. |
| Trims trailing whitespace from values. |
| Maximum number of characters allowed per column value. |
| Maximum number of columns allowed in a record. |
| Merges schema across multiple CSV files. |
| String representation of |
| String representation of negative infinity. |
| String that represents a null value. |
| Enables case-sensitive matching between header names and schema field names. |
| String representation of positive infinity. |
| Infers |
| Quote character used to enclose field values that contain the delimiter (default: |
| Number of rows to skip at the beginning of the file before the header or data. |
| How to handle unescaped quote characters inside quoted fields. |
XML
Key | Description |
|---|---|
| Name of the XML element wrapping each array item when writing. |
| Prefix added to XML attribute names to distinguish them from element names (default: |
| Compression codec for reading (for example, |
| XML declaration string to prepend when writing. |
| Character encoding of the XML file. |
| Excludes XML element attributes from parsing. |
| Ignores whitespace surrounding element values. |
| Ignores XML namespace prefixes during parsing. |
| Locale for parsing dates and numbers. |
| Behavior for malformed records: |
| String that represents a null value. |
| Root element tag name. |
| XML element tag that identifies each row (required). |
| Path to an XSD schema file for validating each row element. |
| Fraction of rows sampled for schema inference (default: |
| Pattern for parsing timestamp strings. |
| Pattern for parsing timestamp-without-timezone strings. |
| Time zone for parsing timestamps. |
| Validates that XML element names conform to the XML specification. |
| Tag name used for text values in elements that also have attributes (default: |
Parquet
Key | Description |
|---|---|
| Handling for dates and timestamps written in Julian calendar format: |
| Handling for INT96 timestamps written in Julian calendar format: |
| Merges schema across multiple Parquet files. |
Avro
Key | Description |
|---|---|
| Avro schema in JSON string format. Use to enforce a specific schema during reads. |
| Handling for dates and timestamps written in Julian calendar format: |
| Merges schema across multiple Avro files. |
Ingested data format
The schema of the destination table depends on the entity_type and format you configure.
BINARYFILE entity type (FILE)
When entity_type is FILE and format is BINARYFILE, each ingested file becomes one row with the following columns:
Field | Type | Description |
|---|---|---|
|
| The Google Drive identifier of the file. |
|
| Contains generic file metadata:
|
|
| Contains Google Drive-specific metadata for the file:
|
|
| Contains file content. |
|
| Standard file metadata added by Databricks during ingestion. Contains source file information such as path and modification time. |
Structured entity type (FILE with structured format)
When entity_type is FILE and format is a structured format (CSV, JSON, XML, EXCEL, PARQUET, AVRO, or ORC), the destination table schema matches the schema of the source files. Columns are inferred from the file contents, subject to the schema_evolution_mode and schema_hints settings.
FILE_METADATA entity type
When entity_type is FILE_METADATA, file content is not downloaded. The destination table contains only the metadata columns from the file_metadata and _file_metadata structs described above, plus file_id.