Adding Column Descriptions to GSC Tables in SQL

As you begin analyzing your GSC data in BigQuery, you might find yourself asking what some of the columns mean and what their data represents. It’s nice to have that information in the BigQuery console, so you don’t have to go back and forth between reference documentation and analysis.

Run the two ALTER TABLE commands below to bulk add column descriptions to the  searchdata_url_impression and searchdata_site_impression tables. You can see how to run them in the video below, and you can save them by following these instructions.

Edit BigQuery Column Descriptions with SQL Step-by-Step

  1. Use the ALTER TABLE Command: The ALTER TABLE command allows you to update column descriptions for BigQuery tables. The syntax is straightforward: ALTER TABLE table_name ALTER COLUMN column_name SET OPTIONS (description = 'your description'); Replace table_name with your table’s name, column_name with the specific column you want to describe and 'your description' with the desired description text.
  2. Run the Query: Simply execute this SQL command in your BigQuery console. The query runs quickly, often in just a few seconds.
  3. Check Your Changes: After running the command, refresh your table to see the updated descriptions.
  4. Save the Query for Reuse: You can save this query for future use. This allows you to easily update descriptions by changing just a few details and running the saved query again whenever necessary.

ALTER TABLE table_name ALTER COLUMN column_name SET OPTIONS (description = 'your description');

This is what the result will look like:

Limitations

  • You cannot use a SELECT statement or reference other tables to dynamically generate the description.
  • This method is purely for setting static descriptions.
  • This only applies to tables, not views.

Pro Tip

To make the process even easier, you can use tools like ChatGPT to automatically generate descriptive text for each column. Then, insert those descriptions into your SQL command, saving time and ensuring consistency.

Here are the complete commands to update the descriptions for the searchdata_url_impression and the searchdata_site_impression tables.

If you cannot view this content, it is because it is only available to paid course participants who are signed in.

To access this content, sign up for the premium content.

>> Back to course content.