Created
July 30, 2019 18:28
-
-
Save relud/275efc475f292ad2e99e5ae13384a5eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.cloud import bigquery | |
client = bigquery.Client("moz-fx-data-shar-nonprod-efed") | |
all_live = sum( | |
client.get_table(table.full_table_id.replace(":", ".") + "$20190729").num_rows | |
for dataset in client.list_datasets() | |
if dataset.dataset_id.endswith("_live") | |
for table in client.list_tables(dataset.reference) | |
) | |
telemetry_live = sum( | |
client.get_table(table.full_table_id.replace(":", ".") + "$20190729").num_rows | |
for table in client.list_tables("telemetry_live") | |
) | |
print(f"telemetry_live: {telemetry_live:,.0f}") | |
print(f"*_live: {all_live:,.0f}") | |
print(f"difference: {all_live-telemetry_live:,.0f}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment