[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[],[],null,["# Write queries with Gemini assistance\n\n| **Preview\n| --- [Gemini Cloud Assist](/gemini/docs/cloud-assist/overview)**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis document describes how you can use natural language prompts to generate\nSQL queries for VPC Flow Logs. To generate SQL queries for\nVPC Flow Logs, you interact\nwith [Gemini Cloud Assist](/gemini/docs/cloud-assist/overview)\nin Flow Analyzer.\n\nLearn [how and when Gemini\nfor Google Cloud uses your data](/gemini/docs/discover/data-governance).\n\nBefore you begin\n----------------\n\n- [Set up Gemini Cloud Assist](/gemini/docs/cloud-assist/set-up-gemini)\n in a Google Cloud project that contains a Cloud Logging bucket with flow\n logs.\n\n- Make sure that the log bucket is\n [upgraded to use Log Analytics](/logging/docs/buckets#upgrade-bucket)\n and you have the\n [required roles and permissions](/network-intelligence-center/docs/flow-analyzer/analyze-traffic-flows#required_roles_and_permissions)\n to query the flow logs.\n\nGenerate a SQL query\n--------------------\n\n| As an early-stage technology, Gemini for Google Cloud\n| products can generate output that seems plausible but is factually incorrect. We recommend that you\n| validate all output from Gemini for Google Cloud products before you use it.\n| For more information, see\n| [Gemini for Google Cloud and responsible AI](/gemini/docs/discover/responsible-ai).\n\nTo interact with Gemini Cloud Assist, use the\npen_spark**Compose a Cloud Assist Query**\nprompt field. In the prompt field, you can enter a prompt or select a\npredefined prompt. The following table provides examples of prompts that\nyou can use.\n\nTo generate and run a SQL query, do the following:\n\n1. In the Google Cloud console, go to the **Flow Analyzer** page.\n\n [Go to Flow Analyzer](https://console.cloud.google.com/net-intelligence/flow-analyzer)\n2. Click pen_spark**Compose a Cloud\n Assist Query**.\n\n3. Describe the log data that you want to view or\n select a predefined prompt.\n\n4. Click **Generate SQL**.\n\n5. Review the response and run the query:\n\n - To run the query in Flow Analyzer, click the **Explore in Flow Analyzer** tab and then click **Open in Flow Analyzer**.\n - To run the query in Log Analytics, click the **Run SQL in Log Analytics** tab and then click **Run SQL in Log Analytics**.\n\nAfter you run the query, you can optionally modify the populated\nvalues as needed.\n\nWhat's next\n-----------\n\n- Read [Gemini for Google Cloud overview](/gemini/docs/overview).\n- Learn [how Gemini for Google Cloud uses your data](/gemini/docs/discover/data-governance)."]]