0
votes

I heavily use bigQuery and there are now quite a number of intermediate tables. Because teammates can upload their own tables, I do not understand all the tables well.

I want to check if a table have not been used for a long time, then check if it can be deleted manually.

Is there anyone know how to do?

Many thanks

2

2 Answers

2
votes

You could use logs if you have access. If you made yourself familiar with how to filter log entries you can find out about your usage quite easily: https://cloud.google.com/logging/docs/quickstart-sdk#explore

There's also the possibility of exporting logs to big query - so you could analyze them using SQL - I guess that's even more convenient.

0
votes

You can get table specific meta data via the TABLES command.

SELECT *,TIMESTAMP_MILLIS(LAST_MODIFIED_TIME) ACCESS_DATE
FROM [DATASET].__TABLES__

The mentioned code snippet should provide you with the last access date.