3
Introduction — Looker’s
In-database Architecture
Looker is a modern data analytics platform that
operates in-database, meaning Looker does not
ingest source data. Instead, Looker leverages the
power of your database’s query engine to drive
powerful analysis based on the freshest data.
When a question is asked in Looker, it is converted
into highly-performant SQL and delivered to your
database. As a result, the query experience (speed,
concurrency, etc.) is directly related to the power and
sophistication of the database technology to which it
is connected.
Where Looker is connected to Google BigQuery, data
teams can draw on the performance, concurrency,
elasticity, and advanced features of BigQuery to
provide faster, deeper, more impactful, insights. In an
environment where data is stored in, or accessible to,
BigQuery’s powerful query engine, Looker provides
a superior user experience by communicating with
the BigQuery cloud data warehouse using BigQuery-
specic SQL commands and protocols (both
BigQuery Standard SQL and BigQuery Legacy SQL are
supported). This allows Looker to take advantage of
the power and exibility of BigQuery and to leverage
some of the advanced features available in BigQuery
such as machine learning and geospatial data types.
This document includes considerations, best
practices, and features of interest for data teams
using both Looker and BigQuery. It describes how to
use the specialized features in BigQuery SQL, which
Looker features to leverage, and how best to deploy
Looker with Google BigQuery to get the most out of
your data.
Leveraging BigQuery SQL
BigQuery supports two distinct SQL dialects:
standard SQL and legacy SQL. Looker natively
supports both of these SQL dialects, as well as
more than 60 others. However, with Looker (and for
BigQuery) the preferred query syntax for BigQuery
is standard SQL. Looker experts suggest that data
teams use standard SQL if possible, as it is more
powerful and is actively maintained and enhanced by
the BigQuery development team.
Learn more:
BigQuery Standard SQL
Connecting Looker to BigQuery
Nested Data
BigQuery is unusual among cloud data warehouses
in its support for nesting. Nested records can provide
considerable advantages when scanning over a
distributed data set by physically co-locating related
records. In some cases, properly nested data can
help avoid unnecessary JOINs between tables and
nested structures to avoid repeating data that would
otherwise be repeated in a wide, denormalized table.
BigQuery standard SQL natively supports nested
records within tables. With BigQuery, data teams
can load and export nested and repeated data from
source formats that support object-based schemas,
such as JSON and Avro les.
When using BigQuery, queries that do not reference
a nested column behave exactly as if the nested
column was not present. When referencing a column
of nested data, BigQuery can automatically atten the
data and the logic is identical to a co-located JOIN.
So, for example, if you have a web_sessions table
with events nested inside the sessions, when you
query for a count of sessions, the presence of events
imposes no performance penalty.