Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 998 Bytes

how-do-i-create-a-view-in-google-big-query.md

File metadata and controls

41 lines (28 loc) · 998 Bytes

How do I create a view in Google Big Query?

// plain

Creating a view in Google Big Query is a simple process.

  1. First, create a query that produces the desired result.
SELECT *
FROM [publicdata:samples.wikipedia]
  1. Then, create a view with the query using the CREATE VIEW statement.
CREATE VIEW my_view AS
SELECT *
FROM [publicdata:samples.wikipedia]
  1. Finally, the view can be queried as if it were a table.
SELECT *
FROM my_view

Code explanation

  • CREATE VIEW - the statement used to create the view
  • my_view - the name of the view
  • SELECT * - the query used to populate the view
  • FROM [publicdata:samples.wikipedia] - the source table

Helpful links

onelinerhub: How do I create a view in Google Big Query?