您可以使用 Looker 基于 OAuth 的安全 Google 云端硬盘操作,将 Looker 中的 Look、探索和信息中心一次性或定期发送到 Google 云端硬盘。Google 云端硬盘操作通过 Looker Action Hub 与 Looker 集成。
Looker 管理员在 Action Hub 中启用 Google 云端硬盘操作后,用户在发送或安排发送数据洞见、探索和信息中心时,可以选择 Google 云端硬盘作为可能的目的地。
由于 Google 云端硬盘 Action 利用的是 Google OAuth,因此用户只能将内容提交到其 Google 凭据可让其访问的云端硬盘文件夹。借助 Google 云端硬盘 Action,用户可以使用 Google OAuth 2.0 将 Google 云端硬盘关联到 Looker,以便在 Google 云端硬盘文件夹中存储文件。
本页将引导管理员完成启用 Google 云端硬盘操作的步骤。该文档还介绍了具有适当权限的任何用户如何向 Google 云端硬盘文件夹发送或安排数据传送。
在 Looker 中启用 Google 云端硬盘操作
Looker 管理员可以按照以下步骤在 Looker 中启用 Google 云端硬盘操作:
前往管理面板,然后在平台下方,前往操作页面。
在 Action Hub 操作列表中,滚动到 Google 云端硬盘,然后点击启用按钮。
在“Google 云端硬盘操作”页面上,点击已启用切换开关,将其切换到开启位置,然后点击保存。
返回 Action Hub 操作列表后,您的 Google 云端硬盘操作应该已启用。
您和您的用户(如果拥有 send_to_integration 权限)现在可以将 Look、探索和信息中心发送或安排发送到 Google 云端硬盘文件夹。
将数据提交到 Google 云端硬盘文件夹
拥有 send_to_integration 权限的任何 Looker 用户都可以将 Look、探索或信息中心发送或安排到 Google 云端硬盘文件夹。
用于发送和安排信息中心的格式选项包括:
PDF
可视化
CSV(ZIP 文件)- 如果提交 ZIP 文件,信息中心中的每个功能块都将作为单独的 CSV 文件提交。您可以使用 Chrome 扩展程序在云端解压缩文件,也可以从云端硬盘中解压缩文件。
用于发送和安排发布外观或探索的格式选项包括:
CSV
XLSX
JSON - 简单
JSON - 标签
JSON - 简单、内嵌
JSON - 详细、内嵌
文本
HTML
如需发送或安排内容到日后发送,请按以下步骤操作:
在时间安排器中,选择Google 云端硬盘作为传送目的地,并在将这些数据发送到哪里?旁边的下拉菜单中选择 Google 云端硬盘。
如果这是您首次将资源提交到 Google 云端硬盘,则需要使用 Google 凭据进行身份验证。点击使用 Google 账号登录,指定您的 Google 账号,然后点击允许,将您的 Looker 账号与您的 Google OAuth 凭据相关联。您只能将一组 Google OAuth 2.0 凭据与此集成相关联。
在“时间表”中,点击验证凭据以加载您的 Google 云端硬盘。
从选择要将文件保存到的云端硬盘下拉菜单中,选择要将文件保存到的 Google 云端硬盘。
接下来,您可以输入此云端硬盘中某个文件夹的网址,也可以提取云端硬盘中的所有文件夹。
在 Google 云端硬盘目标网址字段中,输入要将数据保存到的文件夹的完整 Google 云端硬盘网址。例如:https://drive.google.com/corp/drive/folders/abcxyz。如果无法访问此网址,您的数据将保存到 Google 云端硬盘的根文件夹中。
从选择“提取”以提取此云端硬盘中的文件夹列表下拉菜单中,选择提取。计时器对话框刷新后,从选择要保存文件的文件夹下拉菜单中,选择要保存文件的 Google 云端硬盘文件夹。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],null,["# Looker actions - Google Drive\n\n\u003cbr /\u003e\n\n\u003e Customer-hosted instances may be unable to enable actions from the Looker Action Hub, especially actions that [support streamed results](/looker/docs/action-hub#uses_streaming) or that use [OAuth](/looker/docs/action-hub#configuring_an_action_for_oauth), if the customer-hosted Looker instance does not fulfill the [Looker Action Hub requirements](/looker/docs/action-hub#looker_action_hub_requirements).\n\u003e\n\u003e See the [Sharing data through an action hub](/looker/docs/action-hub#considerations_for_customer-hosted_instances) documentation page for suggested solutions to this potential issue.\n\n\nYou can use Looker's secure OAuth-based Google Drive action to send Looks, Explores,\nand dashboards from Looker to Google Drive on a one-off or recurring basis. The\nGoogle Drive action is integrated with Looker through the Looker Action Hub.\nOnce the Looker admin has enabled the Google Drive action in the Action Hub,\nusers can select Google Drive as a possible destination when sending or scheduling\nLooks, Explores, and dashboards.\n\n\nSince the Google Drive action leverages Google OAuth, users will be able\nto deliver content only to the Drive folders that their Google credentials enable\nthem to access. The Google Drive action enables users to connect their Google\nDrive to Looker using Google OAuth 2.0 so that they can store files in their Google\nDrive folders.\n\n\nThis page walks admins through enabling the Google Drive action. It also describes\nhow any user who has the appropriate\n[permissions](/looker/docs/admin-panel-users-roles#permissions_list)\ncan send or schedule data deliveries to a Google Drive folder.\n| **Note:** If you have a permission that provides access to only select pages in the Admin panel, such as [`manage_schedules`](/looker/docs/admin-panel-users-roles#manage_schedules), [`manage_themes`](/looker/docs/admin-panel-users-roles#manage_themes), or [`see_admin`](/looker/docs/admin-panel-users-roles#see_admin), but you don't have the [Admin role](/looker/docs/admin-panel-users-roles#default_roles), the page or pages that are described here may not be visible to you in the Admin panel.\n\nEnabling the Google Drive action in Looker\n------------------------------------------\n\n\nLooker admins can enable the Google Drive action in Looker with the following\nsteps:\n\n1. Go the **Admin** panel and, under **Platform** , go to the **Actions** page.\n2. On the list of Action Hub actions, scroll to Google Drive and click the **Enable** button.\n3. On the Google Drive action page, click the **Enabled** toggle to the on position, and click **Save**.\n4. When you return to the list of Action Hub actions, your Google Drive action should be enabled.\n\n\nYou and your users --- if they have `send_to_integration` permissions --- can now send or schedule Looks, Explores, and dashboards to a Google Drive\nfolder.\n\nDelivering data to a Google Drive folder\n----------------------------------------\n\n\nAny Looker user who has `send_to_integration` permissions can send or\nschedule Looks, Explores, or dashboards to a Google Drive folder.\n\n\nYour format options to send and schedule dashboards include the following:\n\n- PDF\n- Visualization\n- CSV (ZIP file) --- if delivering a ZIP file, each tile on your dashboard will be delivered as a separate CSV file. You can extract the file in the Cloud with a Chrome extension, or you can extract it from your Drive.\n\n\nYour format options to send and schedule Looks or Explores include the following:\n\n- CSV\n- XLSX\n- JSON --- Simple\n- JSON --- Label\n- JSON --- Simple, Inline\n- JSON --- Detailed, Inline\n- Text\n- HTML\n\nTo send or schedule your content, follow these steps:\n\n1. From the [Scheduler](/looker/docs/delivering-looks-explores), next to **Where should this data go?** , select **Google Drive** as your delivery destination.\n2. If you're delivering to Google Drive for the first time, you'll need to authenticate with your Google credentials. Click **Sign in with Google** , specify your Google Account, and then click **Allow** to connect your Looker account to your Google OAuth credentials. You can connect only one set of Google OAuth 2.0 credentials to this integration.\n3. In the Scheduler, click **Verify credentials** to load your Google Drive.\n4. From the **Select Drive to save file** drop-down, choose the Google Drive where your file will be saved.\n\n Next, you can either enter the URL for a folder in this Drive or fetch all folders in your Drive.\n - In the **Google Drive Destination URL** field, enter the full Google Drive URL of the folder where you want to save your data. For example: `https://drive.google.com/corp/drive/folders/abcxyz`. If this URL isn't accessible, your data will be saved to the root folder of your Google Drive.\n - From the **Select Fetch to fetch a list of folders in this drive** drop-down, select **Fetch** . After the Scheduler dialog refreshes, from the **Select folder to save file** drop-down, select the Google Drive folder where your file will be saved.\n5. Specify the name of your file in the **Enter a filename** field. You don't need to include the file extension --- the action will automatically append it during delivery.\n6. Advanced options for customizing your content delivery depend on the data format. Click **Send** or **Schedule**.\n7. Refresh your Google Drive folder to see your file delivery.\n\n\u003e Your files won't be overwritten or renamed during subsequent deliveries of files with the same filename, so if you have scheduled content for repeated delivery, your Drive folder will contain multiple files of the same name.\n\nSwitching Google Accounts\n-------------------------\n\nTo associate a different Google Account with this action, you must delete the account's connection to the Looker instance. To learn more, see [Manage connections between your Google Account and third-parties](https://support.google.com/accounts/answer/13533235)."]]