[[["容易理解","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 (世界標準時間)。"],[[["\u003cp\u003eBigQuery offers several methods for transforming data, including Data Manipulation Language (DML), materialized views, continuous queries, Dataform, and data preparation.\u003c/p\u003e\n"],["\u003cp\u003eDML allows for the direct manipulation of table data using SQL queries, enabling users to add, delete, modify, or merge rows within their BigQuery tables.\u003c/p\u003e\n"],["\u003cp\u003eMaterialized views automatically cache the results of queries, improving performance and efficiency by precomputing and incrementally updating data as the base tables change.\u003c/p\u003e\n"],["\u003cp\u003eContinuous queries analyze incoming data in real time, allowing for continuous data analysis, with outputs being inserted into BigQuery tables or exported to Pub/Sub or Bigtable.\u003c/p\u003e\n"],["\u003cp\u003eDataform provides a platform to develop, test, version control, and schedule SQL workflows for data transformation, with the ability to use SQLX and Javascript to manage data dependencies and testing.\u003c/p\u003e\n"]]],[],null,["# Introduction to data transformation\n===================================\n\nThis document describes the different ways you can transform data in your\nBigQuery tables.\n\nFor more information about data integrations, see\n[Introduction to loading, transforming, and exporting data](/bigquery/docs/load-transform-export-intro).\n\nMethods of transforming data\n----------------------------\n\nYou can transform data in BigQuery in the following ways:\n\n- Use [data manipulation language (DML)](#transform-with-dml) to transform data in your BigQuery tables.\n- Use [materialized views](#transform-with-mvs) to automatically cache the results of a query for increased performance and efficiency.\n- Use [continuous queries](#transform-with-continuous-queries) to analyze incoming data in real time and continuously insert the output rows into a BigQuery table or export to Pub/Sub or Bigtable.\n- Use [BigQuery pipelines](#transform-with-bq-pipelines) or [Dataform](#transform-with-dataform) to develop, test, control versions, and schedule pipelines in BigQuery.\n- Use [data preparations](#data-preparation) with context-aware, AI-generated transformation recommendations to cleanse data for analysis. Data preparations are powered by the [Dataform API](/dataform/reference/rest).\n\nThe following table shows the different characteristics of each transformation\nmethod.\n\nYou can also [review the change history of a BigQuery table](/bigquery/docs/change-history)\nto examine the transformations made to a table in a specified time range.\n\n### Transform data with DML\n\nYou can use [data manipulation language (DML)](/bigquery/docs/data-manipulation-language)\nto transform data in your BigQuery tables. DML statements are\nGoogleSQL queries that\nmanipulate existing table data to add or delete rows, modify data\nin existing rows, or merge data with values from another table. DML\ntransformations are also supported in [partitioned tables](/bigquery/docs/using-dml-with-partitioned-tables).\n\nYou can run multiple DML statements concurrently, where BigQuery\nqueues several DML statements that transform your data one after the other.\nBigQuery manages [how concurrent DML statements are run](/bigquery/docs/data-manipulation-language#concurrent_jobs),\nbased upon the transformation type.\n\n### Transform data with materialized views\n\n[Materialized views](/bigquery/docs/materialized-views-intro) views are\nprecomputed views that periodically cache the results of a SQL query for increased\nperformance and efficiency. BigQuery leverages precomputed\nresults from materialized views and whenever possible reads only changes from\nthe base tables to compute up-to-date results.\n\nMaterialized views are precomputed in the background when the base tables change.\nAny incremental data changes from the base tables are automatically added to the\nmaterialized views, with no user action required.\n\n### Transform data with continuous queries\n\n|\n| **Preview**\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\n[Continuous queries](/bigquery/docs/continuous-queries-introduction)\nare SQL statements that run continuously. Continuous queries let you analyze\nincoming data in BigQuery in real time. You can insert the output\nrows produced by a continuous query into a BigQuery table or\nexport them to Pub/Sub or Bigtable.\n\n### Transform data with Dataform\n\nDataform lets you manage data transformation in the extract,\nload, and transform (ELT) process for data integration. After extracting\nraw data from source systems and loading it into BigQuery, you can\nuse Dataform to transform it into an organized, tested, and documented\nsuite of tables. While in DML you take an imperative approach by telling BigQuery\nhow exactly to transform your data, in Dataform you write\ndeclarative statements where Dataform then determines the\ntransformation needed to achieve that state.\n\nIn Dataform, you can develop, test, and version control [SQL workflows for data transformation](/dataform/docs/sql-workflows)\nfrom data source declarations to output tables, views, or materialized views.\nYou can develop SQL workflows with Dataform core or pure JavaScript.\n[Dataform core](/dataform/docs/overview#dataform-core) is an open source\nmeta-language that extends SQL with SQLX and JavaScript. You can use\nDataform core to manage dependencies, set up automated data\nquality testing, and document table or column descriptions within the code.\n\nDataform stores your SQL workflow code in [repositories](/dataform/docs/create-repository)\nand uses Git to track file changes. Development workspaces in Dataform\nlet you work on the contents of the repository without affecting the work of\nothers who are working in the same repository. You can connect Dataform\nrepositories to third-party Git providers, including Azure DevOps Services,\nBitbucket, GitHub, and GitLab.\n\nYou can run or schedule SQL workflows\nwith Dataform release configurations and workflow configurations.\nAlternatively, you can schedule executions either with Cloud Composer, or\nwith Workflows and Cloud Scheduler. During execution,\nDataform executes SQL queries in BigQuery in\norder of object dependencies in your SQL workflow. After execution, you can use\nyour defined tables and views for analysis in BigQuery.\n\nTo learn more about creating data transformation SQL workflows in\nDataform, see [Dataform overview](/dataform/docs/overview) and\n[Dataform features](/dataform/docs/overview#features).\n\n### Transform data with BigQuery pipelines\n\nBigQuery pipelines are powered by Dataform\nand let you create and manage data transformation\nin extract, load, transform (ELT) or extract, transform, load (ETL) processes.\n\nYou can create and manage BigQuery pipelines in a visual way\nin BigQuery Studio.\n\nTo learn more about creating BigQuery pipelines,\nsee [Create pipelines](/bigquery/docs/create-pipelines).\n\n### Prepare data in BigQuery\n\nTo reduce the toil of data preparation, BigQuery lets you clean\ndata with Gemini-generated transformation suggestions. Data preparation\nin BigQuery offers the following assistance:\n\n- Applying transformations and data quality rules\n- Standardizing and enriching data\n- Automating schema mapping\n\nYou can validate the results in a preview of your data before executing the\nchanges on all your data.\n\nFor more information, see [Introduction to BigQuery data preparation](/bigquery/docs/data-prep-introduction).\n\nWhat's next\n-----------\n\n- To learn more about DML, see [Transform data with data manipulation language (DML)](/bigquery/docs/data-manipulation-language).\n- To learn more about Dataform, see [Dataform overview](/dataform/docs/overview)."]]