[[["์ดํดํ๊ธฐ ์ฌ์","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-03-18(UTC)"],[[["\u003cp\u003eViews in BigQuery are virtual tables defined by SQL queries, providing a reusable name for complex queries or a specific subset of data.\u003c/p\u003e\n"],["\u003cp\u003eUnlike materialized views, regular views do not store data physically; instead, the defining query is executed each time the view is queried.\u003c/p\u003e\n"],["\u003cp\u003eViews are read-only and subject to limitations such as requiring datasets to be in the same location and not being compatible with legacy SQL when using GoogleSQL.\u003c/p\u003e\n"],["\u003cp\u003eViews are used for simplifying query logic, abstracting calculations, and providing access to specific data subsets without exposing underlying tables, and they are also usable as a data source for visualization tools like Looker Studio.\u003c/p\u003e\n"],["\u003cp\u003eQuerying views incurs costs based on the total data size of the underlying tables' fields referenced in the view's defining query, and security is managed via authorized views.\u003c/p\u003e\n"]]],[],null,["# Introduction to logical views\n=============================\n\nThis document provides an overview of BigQuery support for logical\nviews.\n\nOverview\n--------\n\nA view is a virtual table defined by a SQL query. The default type of view for\nBigQuery is a *logical view*.\nQuery results contain only the data from the tables and fields\nspecified in the query that defines the view.\n\nThe query that defines a view is run each time the view is queried.\n\n**Types of views**\n\nAlthough logical views are the default type of view, if you frequently query a large or\ncomputationally expensive view, then you should consider creating a\n[*materialized view*](/bigquery/docs/materialized-views-intro), which is a\nprecomputed view that periodically caches the results of a query for increased performance and\nefficiency.\n\nHowever, you can often improve performance of a logical view without the need to create a\nmaterialized view by querying only a subset of your data, or by\n[using other techniques.](/bigquery/docs/materialized-views-intro#comparison)\n\nYou can also create an [*authorized view*](/bigquery/docs/authorized-views) to\nshare a subset of data from a source dataset to a view in a secondary dataset. You can then share\nthis view to specific users and groups (principals) who can view the data you share and run\nqueries on it, but who can't access the source dataset directly.\n\nYou can create an authorized view for either a logical or materialized view. An authorized view\nfor a materialized view is called an *authorized materialized view*.\n\n**Use cases**\n\nCommon use cases for views include the following:\n\n\n- Provide an easily reusable name for a complex query or a limited set of data that you can then [authorize](/bigquery/docs/authorized-views) other users to access. After you create a view, a user can then [query](/bigquery/docs/running-queries) the view as they would a table.\n- Abstract and store calculation and join logic in a common object to simplify query use.\n- Provide access to a subset of data and calculation logic without providing access to the base tables.\n- Optimize queries with high computation cost and small dataset results for [several use cases](/bigquery/docs/materialized-views-intro#use_cases).\n\n\u003cbr /\u003e\n\nYou can also use views in other contexts:\n\n- As a data source for a visualization tool such as [Looker Studio](/looker/docs).\n- As a means of sharing data to subscribers of [BigQuery sharing (formerly Analytics Hub)](/bigquery/docs/analytics-hub-introduction).\n\nComparison to materialized views\n--------------------------------\n\nLogical views are virtual and provide a reusable reference to a set of data, but\ndon't physically store any data. Materialized views are defined using SQL,\nlike a logical view, but physically store the data which BigQuery\nuses to improve performance. For further comparison, see\n[materialized views features](/bigquery/docs/materialized-views-intro#comparison).\n\nLogical views limitations\n-------------------------\n\nBigQuery views are subject to the following limitations:\n\n- Views are read-only. For example, you can't run queries that insert, update, or delete data.\n- The dataset that contains your view and the dataset that contains the tables referenced by the view must be in the same [location](/bigquery/docs/locations).\n- A reference inside of a view must be qualified with a dataset. The default dataset doesn't affect a view body.\n- You cannot use the `TableDataList` JSON API method to retrieve data from a view. For more information, see [Tabledata: list](/bigquery/docs/reference/rest/v2/tabledata/list).\n- You cannot mix GoogleSQL and legacy SQL queries when using views. A GoogleSQL query cannot reference a view defined using legacy SQL syntax.\n- You cannot reference [query parameters](/bigquery/docs/parameterized-queries) in views.\n- The schemas of the underlying tables are stored with the view when the view is created. If columns are added, deleted, or modified after the view is created, the view isn't automatically updated and the reported schema will remain inaccurate until the view SQL definition is changed or the view is recreated. Even though the reported schema may be inaccurate, all submitted queries produce accurate results.\n- You cannot automatically update a legacy SQL view to GoogleSQL syntax. To modify the query used to define a view, you can use the following:\n - The [**Edit query**](/bigquery/docs/updating-views#update-sql) option in the Google Cloud console\n - The [`bq update --view`](/bigquery/docs/reference/bq-cli-reference#bq_update) command in the bq command-line tool\n - The [BigQuery Client libraries](/bigquery/docs/reference/libraries)\n - The [update](/bigquery/docs/reference/rest/v2/tables/update) or [patch](/bigquery/docs/reference/rest/v2/tables/patch) API methods.\n- You cannot include a temporary user-defined function or a temporary table in the SQL query that defines a view.\n- You cannot reference a view in a [wildcard table](/bigquery/docs/querying-wildcard-tables) query.\n\nLogical views quotas\n--------------------\n\nFor information on quotas and limits that apply to views, see\n[View limits](/bigquery/quotas#view_limits).\n\nSQL queries used to define views are also subject to the quotas on\n[query jobs](/bigquery/quotas#query_jobs).\n\nLogical views pricing\n---------------------\n\nBigQuery uses logical views by default, not\n[materialized views](/bigquery/docs/materialized-views-intro).\nBecause views are not materialized by default, the query that defines the view\nis run each time the view is queried. Queries are billed according to the total\namount of data in all table fields referenced directly or indirectly by the top-level\nquery.\n\n- For general query pricing, see [On-demand compute pricing](/bigquery/pricing#on_demand_pricing).\n- For pricing associated with materialized views, see [Materialized views pricing](/bigquery/docs/materialized-views-intro#materialized_views_pricing).\n\nLogical views security\n----------------------\n\nTo control access to views in BigQuery, see\n[Authorized views](/bigquery/docs/authorized-views).\n\nWhat's next\n-----------\n\n- For information on creating views, see [Creating views](/bigquery/docs/views).\n- For information on creating an authorized view, see [Creating authorized views](/bigquery/docs/authorized-views).\n- For information on getting view metadata, see [Getting information about views](/bigquery/docs/view-metadata).\n- For more information on managing views, see [Managing views](/bigquery/docs/managing-views)."]]