What are wildcard tables in BigQuery, and when are they useful?

Quick Overview

This BigQuery question asks what wildcard tables are, how the table suffix pseudo-column works, and when querying many similarly named tables at once is the right approach. It tests your knowledge of sharded versus partitioned tables, query cost and schema handling.

What are wildcard tables in BigQuery, and when are they useful?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: easy

Interview Round: Other

What are wildcard tables in BigQuery, and when are they useful? ```hint Picture a table per day Think about a dataset that writes one table per day and how you would query a month of it, and how BigQuery would know which of those tables to read. ``` ### What a Strong Answer Covers - What the wildcard syntax matches and how the table reference has to be written. - The role of `_TABLE_SUFFIX`, both for choosing which tables are read and for telling which table a row came from. - When wildcard tables are the right tool, with a typical sharded dataset as the example. - How suffix filters affect the bytes scanned, and which kinds of filter fail to reduce them. - Schema rules and other limitations, and why partitioned tables are usually the better design. ### Follow-up Questions - An `events_*` query suddenly returns about twice as many rows for recent days. What could cause that? - How would you convert a set of daily sharded tables into one partitioned table? - How does BigQuery choose the schema when the matched tables have drifted over time? - What is the cost difference between filtering `_TABLE_SUFFIX` with a literal and with a subquery?

Overview: This BigQuery question asks what wildcard tables are, how the table suffix pseudo-column works, and when querying many similarly named tables at once is the right approach. It tests your knowledge of sharded versus partitioned tables, query cost and schema handling.

General logo
General
Nov 25, 2026
easyData ScientistOtherData Manipulation (SQL/Python)
0
0

What are wildcard tables in BigQuery, and when are they useful?

What a Strong Answer Covers Guidance

  • What the wildcard syntax matches and how the table reference has to be written.
  • The role of _TABLE_SUFFIX , both for choosing which tables are read and for telling which table a row came from.
  • When wildcard tables are the right tool, with a typical sharded dataset as the example.
  • How suffix filters affect the bytes scanned, and which kinds of filter fail to reduce them.
  • Schema rules and other limitations, and why partitioned tables are usually the better design.

Follow-up Questions Guidance

  • An events_* query suddenly returns about twice as many rows for recent days. What could cause that?
  • How would you convert a set of daily sharded tables into one partitioned table?
  • How does BigQuery choose the schema when the matched tables have drifted over time?
  • What is the cost difference between filtering _TABLE_SUFFIX with a literal and with a subquery?