Control: Tables with stale data should be reviewed
Description
If the data has not changed recently and has become stale, the table should be reviewed.
Usage
Run the control in your terminal:
powerpipe control run gcp_thrifty.control.bigquery_table_stale_data
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_thrifty.control.bigquery_table_stale_data --share
Steampipe Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | bigquery_table_stale_data_max_days |
| The maximum number of days table data can be unchanged before it is considered stale. |
SQL
select self_link as resource, case when date_part('day', now() - (last_modified_time :: timestamptz)) > $1 then 'info' else 'ok' end as status, title || ' was changed ' || date_part('day', now() - (last_modified_time :: timestamptz)) || ' days ago.' as reason , location, projectfrom gcp_bigquery_table;