turbot/gcp_thrifty

GitHub
Loading controls...

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:

steampipe check gcp_thrifty.control.bigquery_table_stale_data

Snapshot and share results via Steampipe Cloud:

steampipe login
steampipe check --share gcp_thrifty.control.bigquery_table_stale_data

Plugins & Tables

Params

ArgsNameDefaultDescriptionVariable
$1bigquery_table_stale_data_max_days
90
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,
project
from
gcp_bigquery_table;

Tags