Skip to main content

Viewing Metadata

Hubble publishes metadata which can help users determine which tables to query, how frequently the dataset updates, and general information about the dataset.

There are two ways to access this information:

BigQuery Explorer

When accessing Hubble from its starred link, the Explorer pane will load metadata about the crypto-stellar.crypto_stellar dataset.

Use the Toggle to view the contents of the Dataset. Clicking a table name will load the following:

  • Schema - detailed information about the table schema, including column definitions and data types. Viewing the schema helps write a SQL query
  • Details - general information about the table itself, including partitioning, clustering and table size. Viewing details helps with query optimization
  • Preview - raw sample data from the table. The data presented is the equivalent of running a SELECT * statement

INFORMATION_SCHEMA

BigQuery supports read-only, system-defined views that provide metadata information about BigQuery objects. The views can be queried via SQL from the BigQuery UI or Client Libraries.

note

Queries executed against the INFORMATION_SCHEMA cannot be cached and will incur data processing charges for each run.

From the BigQuery Editor, the following query will list all tables in Hubble:

# List all tables in Hubble
#standardSQL
select *
from `crypto-stellar.crypto_stellar`.INFORMATION_SCHEMA.TABLES;

If you want details on a particular table, you can return the table schema:

# List all columns for the accounts table
select table_name,
column_name,
is_nullable,
data_type,
is_partitioning_column
from `crypto-stellar.crypto_stellar`.INFORMATION_SCHEMA.COLUMNS
where table_name = "accounts";

More on the INFORMATION_SCHEMA can be found here.