Stay organized with collections
Save and categorize content based on your preferences.
ML pipelines overview
This document provides an overview of the services you can use to build an ML
pipeline to manage your BigQuery ML
MLOps
workflow.
An ML pipeline is a representation of an MLOps workflow that is composed of a
series of pipeline tasks. Each pipeline task performs a specific step in the
MLOps workflow to train and deploy a model. Separating each step into a
standardized, reusable task lets you automate and monitor repeatable processes
in your ML practice.
You can use any of the following services to create BigQuery ML
ML pipelines:
Use Vertex AI Pipelines to create portable, extensible ML pipelines.
Use GoogleSQL queries to create less complex SQL-based ML
pipelines.
Use Dataform to create more complex SQL-based ML pipelines, or ML
pipelines where you need to use version control.
Vertex AI Pipelines
In Vertex AI Pipelines,
an ML pipeline is structured as a directed acyclic graph (DAG) of containerized
pipeline tasks that are interconnected using input-output dependencies.
Each pipeline task
is an instantiation of a
pipeline component
with specific inputs. When defining your ML pipeline, you connect multiple
pipeline tasks to form a DAG by routing the outputs of one pipeline task to the
inputs for the next pipeline task in the ML workflow. You can also use the
original inputs to the ML pipeline as the inputs for a given pipeline task.
Use the
BigQuery ML components
of the Google Cloud Pipeline Components SDK to compose ML pipelines
in Vertex AI Pipelines. To get started with
BigQuery ML components, see the following notebooks:
You can use Dataform to develop,
test, version control, and schedule complex SQL workflows for data
transformation in BigQuery. You can use Dataform for
such tasks as data transformation in the Extraction, Loading, and
Transformation (ELT) process for data integration. After raw data is extracted
from source systems and loaded into BigQuery,
Dataform helps you to transform it into a well-defined, tested,
and documented suite of data tables.
If your ML pipeline includes use of the
ML.GENERATE_TEXT function,
you can adapt the
structured_table_ml.js example library
to iterate through calls to the function. Calling the function
iteratively lets you address any retryable errors that occur due to exceeding
the quotas and limits that apply to the function.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eML pipelines represent MLOps workflows, breaking them down into standardized, reusable tasks to automate and monitor processes for training and deploying models.\u003c/p\u003e\n"],["\u003cp\u003eVertex AI Pipelines allows you to create portable and extensible ML pipelines, using a directed acyclic graph (DAG) of containerized tasks with input-output dependencies.\u003c/p\u003e\n"],["\u003cp\u003eGoogleSQL queries enable the creation of SQL-based ML pipelines, including running multi-statement queries in sequence to automate tasks like creating or dropping tables, as well as implementing complex logic.\u003c/p\u003e\n"],["\u003cp\u003eDataform can be utilized to develop, test, version control, and schedule complex SQL workflows for data transformation in BigQuery, particularly useful for ML pipelines requiring version control.\u003c/p\u003e\n"],["\u003cp\u003eFor ML pipelines that involve using the \u003ccode\u003eML.GENERATE_TEXT\u003c/code\u003e function, both GoogleSQL and Dataform offer ways to handle quota errors by iteratively calling the function, enabling the ability to retry if necessary.\u003c/p\u003e\n"]]],[],null,["# ML pipelines overview\n=====================\n\nThis document provides an overview of the services you can use to build an ML\npipeline to manage your BigQuery ML\n[MLOps](/architecture/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning)\nworkflow.\n\nAn ML pipeline is a representation of an MLOps workflow that is composed of a\nseries of *pipeline tasks*. Each pipeline task performs a specific step in the\nMLOps workflow to train and deploy a model. Separating each step into a\nstandardized, reusable task lets you automate and monitor repeatable processes\nin your ML practice.\n\nYou can use any of the following services to create BigQuery ML\nML pipelines:\n\n- Use Vertex AI Pipelines to create portable, extensible ML pipelines.\n- Use GoogleSQL queries to create less complex SQL-based ML pipelines.\n- Use Dataform to create more complex SQL-based ML pipelines, or ML pipelines where you need to use version control.\n\nVertex AI Pipelines\n-------------------\n\nIn [Vertex AI Pipelines](/vertex-ai/docs/pipelines/introduction),\nan ML pipeline is structured as a directed acyclic graph (DAG) of containerized\npipeline tasks that are interconnected using input-output dependencies.\nEach [pipeline task](/vertex-ai/docs/pipelines/introduction#pipeline-task)\nis an instantiation of a\n[pipeline component](/vertex-ai/docs/pipelines/introduction#pipeline-component)\nwith specific inputs. When defining your ML pipeline, you connect multiple\npipeline tasks to form a DAG by routing the outputs of one pipeline task to the\ninputs for the next pipeline task in the ML workflow. You can also use the\noriginal inputs to the ML pipeline as the inputs for a given pipeline task.\n\nUse the\n[BigQuery ML components](/vertex-ai/docs/pipelines/bigqueryml-component)\nof the Google Cloud Pipeline Components SDK to compose ML pipelines\nin Vertex AI Pipelines. To get started with\nBigQuery ML components, see the following notebooks:\n\n- [Get started with BigQuery ML pipeline components](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/ml_ops/stage3/get_started_with_bqml_pipeline_components.ipynb)\n- [Train and evaluate a demand forecasting model](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/pipelines/google_cloud_pipeline_components_bqml_pipeline_demand_forecasting.ipynb)\n\nGoogleSQL queries\n-----------------\n\nYou can use\n[GoogleSQL procedural language](/bigquery/docs/reference/standard-sql/procedural-language)\nto execute multiple statements in a\n[multi-statement query](/bigquery/docs/multi-statement-queries). You can use a\nmulti-statement query to:\n\n- Run multiple statements in a sequence, with shared state.\n- Automate management tasks such as creating or dropping tables.\n- Implement complex logic using programming constructs such as `IF` and `WHILE`.\n\nAfter creating a multi-statement query, you can\n[save](/bigquery/docs/saved-queries-introduction) and\n[schedule](/bigquery/docs/scheduling-queries) the query to automate model\ntraining, inference, and monitoring.\n\nIf your ML pipeline includes use of the\n[`ML.GENERATE_TEXT` function](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-generate-text),\nsee\n[Handle quota errors by calling `ML.GENERATE_TEXT` iteratively](/bigquery/docs/iterate-generate-text-calls) for more information on how to use SQL to\niterate through calls to the function. Calling the function\niteratively lets you address any retryable errors that occur due to exceeding\nthe [quotas and limits](/bigquery/quotas#cloud_ai_service_functions).\n\nDataform\n--------\n\nYou can use [Dataform](/dataform/docs/overview) to develop,\ntest, version control, and schedule complex SQL workflows for data\ntransformation in BigQuery. You can use Dataform for\nsuch tasks as data transformation in the Extraction, Loading, and\nTransformation (ELT) process for data integration. After raw data is extracted\nfrom source systems and loaded into BigQuery,\nDataform helps you to transform it into a well-defined, tested,\nand documented suite of data tables.\n\nIf your ML pipeline includes use of the\n[`ML.GENERATE_TEXT` function](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-generate-text),\nyou can adapt the\n[`structured_table_ml.js` example library](https://github.com/dataform-co/dataform-bqml/blob/main/modules/structured_table_ml.js)\nto iterate through calls to the function. Calling the function\niteratively lets you address any retryable errors that occur due to exceeding\nthe quotas and limits that apply to the function."]]