Notes from BenDesk: Table Updates
Ben is our resident ZenDesk captain and manager of all help@ inquiries. We’re bringing you interesting inquiries from his inbox each month.
Question of the Month: How can I tell when my table was last updated in PAD?
BenDesk Answer: PAD lets you see a variety of information about your tables, including when they were updated, the row count, and storage use. To view this, navigate to the table you are interested in and click the ‘Details’ tab. The timestamp for when a table was last updated is listed as “Last modified” in the Table Info section. This is useful if you want to perform an ad-hoc check on a sync.
But if you’re interested in regularly monitoring the table or want to include any of this information in your reporting, it’s easier to query the “TABLES” view in PAD. This view contains one row for each table or view in your dataset and includes the same information as the BigQuery UI.
Below is an example query that will give you the creation timestamp, last updated timestamp, and row count of tables in a dataset. Please note that you’ll need to convert the timestamp using “TIMESTAMP_MILLIS()” so that it appears in a readable format:
*SELECTdataset_id,table_id,TIMESTAMP_MILLIS(creation_time) AS creation_time,TIMESTAMP_MILLIS(last_modified_time) AS last_modified_time,row_countFROM`bigquery-public-data`.`census_bureau_usa`.__TABLES__*
Do you have a question for BenDesk and the team? Partners can submit their asks to help@techallies.org.