CREATE VIEW builds a saved, queryable virtual table based on a SELECT statement without storing data.
CREATE VIEW stores a SQL query as a reusable object.When you query the view, BigQuery runs the underlying SELECT on demand, so no data is duplicated.
Use views to encapsulate business logic, simplify joins across Customers
, Orders
, and OrderItems
, or expose only specific columns to analysts.
Run CREATE VIEW `project.analytics.customer_orders` AS ...
with a SELECT statement that joins your ecommerce tables.
Yes—add OR REPLACE
to refresh a view without dropping grants.
Grant dataset-level access or use authorized views to limit exposure to raw tables.
Keep view logic small, reference fully-qualified table names, add comments in the view SQL and use dataset naming like analytics
or reporting
.
The example below shows a production-grade view for aggregating daily revenue per customer.
.
No. A view stores only metadata. You pay for bytes processed when querying the view.
Yes. Nesting is supported, but keep dependency chains short for easier maintenance.
Use CREATE OR REPLACE VIEW
. Permissions remain intact, and you avoid dropping dependent objects.