04 Oct 21 ·  mCollins in Bigquery ·        Bookmark ·  Report ·  More actions.. Lock comments ·  Pin thread

BigQuery Best Practices - Use Web Console for data exploration

In BigQuery, you are billed for the bytes scanned by your queries. However, there are a few free operations that you can perform using the web user interface including, 

  • Previewing sample data in the tables
  • Get metadata of tables (DDL, structure, partition, cluster keys, record count, etc.)
  • Query cost estimation

If you choose to use a SQL client (like DBeaver) you will have to pay for these operations. So, its a good practice to use the Web Console for data exploration

Using Google BigQuery Web Console

Navigate to the Google Cloud BigQuery Console, Choose the appropriate project in the dropdown above and you can use the database explorer on the left hand side to preview the data and the metadata in the tables

Estimate Query cost before running it

BigQuery charges you based on the amount of data scanned by your queries. So, its a good practice to estimate your query cost before running it. 

  • Highlight the query in the code editor window
  • Ribbon right below the editor, shows you the amount of bytes scanned
  • The lower the bytes scanned the better