Intro to SQLfor Organizing
Subsection 3.3

Preview & Details

~5 min

Reading

The Preview tab lets you see sample rows without writing a query. It helps you understand what the data looks like before you spend time building SQL.

Preview is useful for asking:

  • What does one row seem to represent?
  • Are values written the way I expected?
  • Are dates formatted consistently?
  • Are categories coded as full words, abbreviations, or numbers?
  • Do there seem to be missing values?

The Details tab gives table-level information. In the warm-up, learners use Details to find row count and disk size.

To inspect table details in the BigQuery web interface:

  1. Open BigQuery in the Google Cloud Console.
  2. Select the project in the Explorer panel.
  3. Open the dataset that contains your table.
  4. Click the table name.
  5. Open the Details tab.
  6. Look for table size or storage information.
  7. Locate the number of rows.
  8. Locate total logical bytes or table size.

A large row count tells you SQL is probably worth using. A large table size reminds you to start with LIMIT and test carefully.

The Details tab may also include last modified date, creation date, partitioning, clustering, expiration, or storage information. You do not need to master all of that yet. Start with row count, table size, and table description.

Learner action

Write table inspection notes:

One row appears to represent: [your answer]
Row count: [your answer]
Disk size or logical bytes: [your answer]
Useful columns: [your answer]
Possible missing fields or concerns: [your answer]

Preview : see real rows without spending bytes

The Preview tab pulls the first rows straight from storage. It does not run a query and does not cost anything. Use it to confirm that the values look like what the schema describes : that the date column actually has dates, that the state column is two-letter codes versus full state names, that a field marked NULLABLE actually has a lot of nulls.

Details : the Storage info section

The Details tab is where the table's totals live. Scroll to the Storage info section and you'll find:

  • Number of rows : total row count for the table.
  • Total logical bytes : the disk size of the table (divide by 1,073,741,824 to convert to GB).
  • Last modified : when the table was last updated.
Schema tab Field name · Type · Mode · Description Click Select All to count columns Field types: STRING, INT, DATE, FLOAT, BOOLEAN, TIMESTAMP, GEOGRAPHY, RECORD Use it for: what columns exist Details tab Storage info section: · Number of rows · Total logical bytes · Last modified · Time partitioning, clustering Use it for: row count + disk size Preview tab First rows straight from storage Free : does not run a query Sanity-check what fields look like Spot empty fields, unfamiliar codes Use it for: what data looks like
Diagram 3.3 · Three tabs, three jobs. Schema tells you what columns exist. Details gives you row count and disk size. Preview shows you real rows for free.

What to do right now

  1. Click Preview. Skim 10 rows. Note one thing that surprises you : an empty field, an unfamiliar code, an unexpected date range.
  2. Click Details. Scroll to Storage info. Write down Number of rows, Total logical bytes, and Last modified.

Previewing data tells you what's actually in a table. The events table has an attendees column. Let's find the events that were well-attended.

Action: Record your row count, disk size, and last-modified date in your running brief.