Skip to content

bigfunctions > explore_table

explore_table

Call or Deploy explore_table ?

✅ You can call this explore_table bigfunction directly from your Google Cloud Project (no install required).

  • This explore_table function is deployed in bigfunctions GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error).
  • Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
  • You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions. This is particularly useful if you want to create private functions (for example calling your internal APIs). Discover the framework

Public BigFunctions Datasets:

Region Dataset
eu bigfunctions.eu
us bigfunctions.us
europe-west1 bigfunctions.europe_west1
asia-east1 bigfunctions.asia_east1
... ...

Description

Signature

explore_table(fully_qualified_table)

Description

Show table infos and column statistics

See the result as a data visualization in BigQuery Console!

The result of this function can be vizualized as an html report directly in BigQuery Console!

  1. Install this bookmarklet: bigfunctions (it has to be done only once)
  2. Open BigQuery console
  3. Click on the installed bookmarklet.
    • From now on, the bookmarklet code will observe the BigQuery console page.
    • If a BigQuery result appears with a unique cell containing html content, it will be rendered.
  4. You will have to click on the bookmarklet again:
    • If you refresh the Bigquery console page,
    • If you open the BigQuery console in a new tab of your browser.
  5. Run the query of the example and open the result of the latest subquery. The result will be shown as a nice html content.


bookmarklet usage

Examples

call bigfunctions.eu.explore_table("bigfunctions.eu.natality");
select html from bigfunction_result;
call bigfunctions.us.explore_table("bigfunctions.us.natality");
select html from bigfunction_result;
call bigfunctions.europe_west1.explore_table("bigfunctions.europe_west1.natality");
select html from bigfunction_result;

screenshot

Need help using explore_table?

The community can help! Engage the conversation on Slack

For professional suppport, don't hesitate to chat with us.

Found a bug using explore_table?

If the function does not work as expected, please

  • report a bug so that it can be improved.
  • or open the discussion with the community on Slack.

For professional suppport, don't hesitate to chat with us.

Use cases

The explore_table function, as described, provides information and statistics about a BigQuery table. Here are some use cases:

  • Data Discovery and Understanding: When working with a new or unfamiliar dataset, explore_table can quickly provide a high-level overview of the table's structure, including column names, data types, and basic statistics like minimum, maximum, and average values. This helps users understand the data they're working with without writing complex queries.

  • Data Quality Assessment: By examining the statistics generated by explore_table, analysts can identify potential data quality issues. For instance, unexpected minimum or maximum values might indicate errors in the data collection or processing pipeline. Null value counts can highlight missing data problems.

  • Exploratory Data Analysis (EDA): explore_table can be a starting point for EDA. The function's output can guide further investigation, helping analysts decide which columns are of interest and what kind of analysis to perform.

  • Data Documentation and Reporting: The function can automatically generate documentation about a table's schema and characteristics, saving analysts time and ensuring consistency in data documentation. This information can be included in reports or shared with other team members.

  • Debugging and Troubleshooting: When data pipelines or queries produce unexpected results, explore_table can help pinpoint the source of the problem. By comparing the statistics of a table before and after a transformation, analysts can identify discrepancies and track down errors.

Concrete Example Scenario:

Imagine a data analyst working with a large public dataset like the BigQuery natality table (as mentioned in the documentation's examples). This table contains information about births in the US. The analyst wants to understand the distribution of baby weights and see if there are any outliers or missing values in this column. Instead of writing multiple queries to gather this information, they can simply call explore_table("bigfunctions.us.natality") and quickly get a summary of the weight_pounds column, including min, max, average, and null counts. This would immediately reveal the overall distribution and highlight any potential data issues.

Spread the word

BigFunctions is fully open-source. Help make it a success by spreading the word!

Share on Add a on