GoogleDriveReadFilesEditor Documentation
Overview
The GoogleDriveReadFilesEditor is a component within the Vantage analytics and data platform that allows users to browse and select files from their Google Drive. The selected files can include various types of documents such as images, PDFs, and datasets. This component outputs file metadata, including download URLs, which can be piped into other functionalities such as AI-driven image analysis or PDF extraction.
Purpose
The primary purpose of the GoogleDriveReadFilesEditor is to facilitate the integration of Google Drive files into data workflows for analysis. It enables users to efficiently filter and select the files they need, ensuring that data analysts and other stakeholders can easily access the required resources from Google Drive.
Settings
The GoogleDriveReadFilesEditor component consists of the following settings:
1. File Type
- Name:
fileType - Input Type: Dropdown
- Description: This setting allows users to filter which types of files are displayed in the Google Drive picker. Depending on the value chosen, only the corresponding file types will be available for selection.
- Options:
all: Displays all file typesimage: Displays images onlypdf: Displays PDFs onlydataset: Displays datasets only
- Default Value:
all
2. Select Files
- Name:
selectedFiles - Input Type: Array (of file objects)
- Description: This setting holds an array of selected file objects from Google Drive. Users can select multiple files, and these files will be output along with their metadata and download URLs.
- Default Value:
[](an empty array)
3. Max Files
- Name:
maxFiles - Input Type: Numeric
- Description: Defines the maximum number of files that can be included in the output. This controls the quantity of data processed from Google Drive, ensuring that users do not inadvertently select too many files.
- Default Value:
50
4. Include Content
- Name:
includeContent - Input Type: Boolean
- Description: A toggle that allows users to specify whether to download the file content as base64. When enabled, this provides an alternative method of handling files directly without downloading them separately via URLs, which can be advantageous for processing purposes.
- Default Value:
false
5. Credential Reference
- Name:
credentialRef - Input Type: String
- Description: This setting establishes a reference to the credentials required to access the user's Google Drive account. Providing necessary authentication supports secure file access.
- Default Value: None (must be provided for access)
How It Works
- User Interaction: Users can select the type of files they wish to browse through the dropdown menu. The component will filter the file picker based on this selection.
- File Selection: The
GoogleDrivePickercomponent enables users to browse their Google Drive and select files. The selected files are stored in theselectedFilesattribute. - Configuration Updates: The
updateFieldfunction is invoked to update the component's state forfileType,selectedFiles, andmaxFiles. TheincludeContentsetting can be toggled by clicking the associated button. - Output Generation: Once files are selected, the component returns a structured output including file metadata based on the configurations set by the user.
Use Cases & Examples
Use Case 1: Image Analysis for Marketing Materials
A marketing team wants to analyze image data that they store in Google Drive to optimize ad performance. They can configure the GoogleDriveReadFilesEditor to only display image files, allowing them to easily select relevant marketing visuals for analysis.
Use Case 2: PDF Document Review
A legal team needs to review and extract data from various legal documents saved as PDFs in Google Drive. The component can be set to filter only PDF files, facilitating a streamlined selection process.
Example Configuration
For the legal team use case mentioned above, the GoogleDriveReadFilesEditor might be configured as follows:
{
"fileType": "pdf",
"selectedFiles": [],
"includeContent": true,
"maxFiles": 20,
"credentialRef": "user_google_drive_credentials"
}In this scenario:
- fileType: Set to
pdfto only allow selection of PDF documents. - selectedFiles: Initially an empty array as the user has yet to select any files.
- includeContent: Set to
trueto allow extraction of the PDF content directly. - maxFiles: Limited to
20, preventing the selection of too many documents at once. - credentialRef: A reference provided to ensure access to the Google Drive files.
With this configuration, the component effectively meets the specific needs of the legal team while leveraging Vantage’s analytical capabilities.
AI Integrations and Billing Impact
The selected files' output can be directly piped into Vantage's AI integrations, such as AI Image Analysis or PDF Extraction tools. Each AI process invoked may incur additional processing costs depending on the complexity and resource usage of the underlying algorithms. Users should consider this when selecting multiple files or opting to download content, as it could lead to increased usage billing based on compute resources allocated for processing.