BigQuery Hack: How to Quickly Populate a Table Without INSERT()

How to use BigQuery’s UI and a bit of SQL to populate a newly created table.

Share
Black wireframe glasses looking at code.
Photo by Alex Chumak on Unsplash

Reader Note: Before we begin, I have to warn you that the following is not considered to be a best SQL practice and is certainly not a textbook case of data engineering.

It’s, at best, a quick trick that will be most effective when you need to create a bit of test data from scratch when time is of the essence. Replicate at your own discretion.

Setting a Destination Table with Query Settings

BigQuery’s SQL workspace has some powerful, often-overlooked features that can help optimize your query jobs and make the tedious process of writing SQL scripts a bit more pleasant.

From providing insight into whether your query will run or not to providing support for JSON data types, BigQuery has a feature that accommodates almost every data engineering use case.

For this walkthrough, we’ll be concentrating on BigQuery’s query settings.

Just like you may not be familiar with every setting nestled in the system preferences app on your laptop (I’m a Mac person, can’t you tell?), or the settings app on your phone, I’d be willing to bet you’re not intimately familiar with BigQuery’s query settings.

Build Your Pipeline To A Data Engineering Career

You’ve reached the limit of the public preview. The full version of this post includes the implementation details: The code, the edge cases, and the "why" behind the architecture.

When you join PipelineToDE, you get:

  • The DA → DE Pathway Course: A structured roadmap to bridge the gap between analysis and engineering.
  • Weekly Senior Deep Dives: Fresh, tactical insights on Python, Cloud (GCP/AWS), and modern orchestration delivered every week.
  • Production-Ready Blueprints: Access to 80+ protected stories and code repos from my time in the trenches as a Senior DE
  • The DE Job Board (Coming Soon): Exclusive access to a curated board of high-agency Data Engineering roles.