Vertex AI Pipelines 會自動將 vertex-ai-pipelines-run-billing-id 標籤附加至管線執行作業。這個標籤的值是您專屬的管道執行帳單 ID。
Vertex AI Pipelines 會在管道執行期間,將這個標籤傳播至管道元件產生的 Google Cloud 資源。請注意,對於某些元件和資源,您需要升級 Google Cloud Pipeline Components SDK,或更新元件程式碼來傳播標籤。如要進一步瞭解如何標記 Google Cloud 資源,請參閱「Vertex AI Pipelines 的資源標記」。
vertex-ai-pipelines-run-billing-id 標籤會將帳單報表中管道執行產生的 Google Cloud 資源用量連結在一起。您可以使用這個標籤的值,透過將 Cloud Billing 資料匯出至 BigQuery,查看管道執行期間的資源用量費用。
[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Understand pipeline run costs\n\nYou can review the cost of your pipeline runs using [Cloud Billing export to BigQuery](/billing/docs/how-to/export-data-bigquery).\n\nYou can also use the unique pipeline run billing ID of your pipeline run to review the costs of resources created by the pipeline run, as follows:\n\n1. Vertex AI Pipelines automatically attaches the `vertex-ai-pipelines-run-billing-id` label to your pipeline run. The value of this label is your unique pipeline run billing ID.\n\n2. Vertex AI Pipelines propagates this label to Google Cloud resources generated by pipeline components during the pipeline run. Note that for some components and resources, you need to either upgrade the Google Cloud Pipeline Components SDK or update your component code to propagate the labels. For more information about labeling Google Cloud resources, see [Resource labeling by Vertex AI Pipelines](/vertex-ai/docs/pipelines/gcpc-label-propagation).\n\n3. The `vertex-ai-pipelines-run-billing-id` label connects the usage of Google Cloud resources generated by the pipeline run in billing reports. Using the value of this label, you can review the cost of the resource usage in the pipeline run with [Cloud Billing export to BigQuery](/billing/docs/how-to/export-data-bigquery).\n\nThis page shows you how to do the following:\n\n- [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines)\n\n- [Use a pipeline run billing ID to locate a pipeline run](#locate_pipeline_run)\n\n- [Query the costs of Google Cloud resources in a pipeline run from Cloud Billing](#view_pipeline_resources_cost)\n\nBefore you begin\n----------------\n\nBefore you use Cloud Billing to understand the cost of a pipeline run, use the following instructions to set up your Google Cloud project and development environment:\n\n- [Set up Cloud Billing data export to BigQuery](/billing/docs/how-to/export-data-bigquery-setup).\n\n- [Install v1.0.31 or higher of the Google Cloud Pipeline Components SDK](/vertex-ai/docs/pipelines/components-quickstart#install_latest_release)\n\nFor more information about the schema of Cloud Billing standard usage cost data, see [Schema of the standard usage cost data](/billing/docs/how-to/export-data-bigquery-tables/standard-usage#usage-cost-export-more-info).\n\nList your ten most expensive pipeline runs\n------------------------------------------\n\nRun the following query to view a list of your ten most expensive pipeline runs over a specified time period:\n\n**Standard SQL** \n\n SELECT\n project.id,\n location.region,\n L.value,\n SUM(cost) AS total_cost\n FROM\n `project.dataset.gcp_billing_export_v1_XXXXXX_XXXXXX_XXXXXX` B,\n UNNEST (B.labels) L\n WHERE\n DATE(_PARTITIONTIME) \u003e= \"\u003cvar translate=\"no\"\u003eSTART_DATE\u003c/var\u003e\"\n AND DATE(_PARTITIONTIME) \u003c \"\u003cvar translate=\"no\"\u003eEND_DATE\u003c/var\u003e\"\n AND L.key = \"vertex-ai-pipelines-run-billing-id\"\n GROUP BY\n project.id,\n location.region,\n L.value\n ORDER BY\n total_cost DESC\n LIMIT\n 10;\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSTART_DATE\u003c/var\u003e: Start date of the time period.\n\n- \u003cvar translate=\"no\"\u003eEND_DATE\u003c/var\u003e: End date of the time period.\n\nYou should see the following columns in the query results:\n\n- `project_id`\n\n- `region`\n\n- `pipeline_run_billing_id`\n\n- `total_cost`\n\nYou can now use the unique pipeline run billing ID from the `pipeline_run_billing_id` column of the query results to do the following:\n\n- [Locate or retrieve a pipeline run](#locate_pipeline_run)\n\n- [View the costs of Google Cloud resources in a pipeline run](#view_pipeline_resources_cost)\n\n| **Tip:** The query results display the pipeline runs in the descending order of the cost. The first row represents the most expensive pipeline run.\n\nUse the billing ID to locate a pipeline run\n-------------------------------------------\n\nYou can use the unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines) to locate a pipeline run. \n\n### Console\n\nUse the following instructions to retrieve a pipeline run in the Google Cloud console.\n\n1. In the Google Cloud console, in the Vertex AI section, go to the **Pipelines** page.\n\n [Go to Pipelines](https://console.cloud.google.com/vertex-ai/pipelines)\n2. To locate the pipeline run, filter the list using a unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines). To do this:\n\n 1. Click **Filter** and then click **Labels**.\n\n 2. Enter the unique pipeline run billing ID in the following format and press **Enter** : \n\n `labels.vertex-ai-pipelines-run-billing-id=`\u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e \n\n where \u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e is the unique pipeline run billing ID.\n\n### Vertex AI SDK for Python\n\nUse the following code sample to retrieve the pipeline run: \n\n runs = aip.PipelineJob.list(\n project=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROJECT_ID\u003c/span\u003e\u003c/var\u003e,\n location=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eLOCATION\u003c/span\u003e\u003c/var\u003e,\n filter=\"labels.vertex-ai-pipelines-run-billing-id=\u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e\")\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The Google Cloud project that this pipeline runs in.\n\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The region that the pipeline runs in. For more information about the regions that Vertex AI Pipelines is available in, see the [Vertex AI locations guide](/vertex-ai/docs/general/locations#feature-availability).\n\n- \u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e: Unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines).\n\nView the costs of Google Cloud resources in a pipeline run\n----------------------------------------------------------\n\nYou can use the unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines) to view the costs of Google Cloud resources generated by the pipeline run.\n\nRun the following query to view the list of Google Cloud resources generated in a pipeline run, along with the cost of each resource:\n\n**Standard SQL** \n\n SELECT\n service,\n sku,\n cost\n FROM\n `project.dataset.gcp_billing_export_v1_XXXXXX_XXXXXX_XXXXXX` B,\n UNNEST (B.labels) L\n WHERE\n DATE(_PARTITIONTIME) \u003e= \"\u003cvar translate=\"no\"\u003eSTART_DATE\u003c/var\u003e\"\n AND DATE(_PARTITIONTIME) \u003c \"\u003cvar translate=\"no\"\u003eEND_DATE\u003c/var\u003e\"\n AND L.key = \"vertex-ai-pipelines-run-billing-id\"\n AND L.value = \"\u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e\";\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSTART_DATE\u003c/var\u003e: Start date of the time period.\n\n- \u003cvar translate=\"no\"\u003eEND_DATE\u003c/var\u003e: End date of the time period.\n\n- \u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e: Unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines).\n\nYou should see the following columns in the query results:\n\n- `service.id`\n\n- `service.description`\n\n- `sku.id`\n\n- `sku_description`\n\n- `cost`\n\nThe `cost` column represents the cost of a resource corresponding to the `sku.id` in the pipeline run."]]