# BigQuery data retention

This guide describes how to configure data retention on BigQuery
tables.

Depending on the Manufacturing Data Engine (MDE) operations log level a lot of data
may be stored in the [operations-log](https://docs.cloud.google.com/manufacturing-data-engine/docs/reference/bigquery-schemas.md.txt#operations_logs)
BigQuery table. Since MDE is using partitioned
tables you can manage retention as described in the [Managing partitioned tables](https://docs.cloud.google.com/bigquery/docs/managing-partitioned-tables.md.txt) guide.

## Update the partition expiration example

You can use the `ALTER TABLE` `SET OPTIONS` statement to update the expiration as
the following example shows:

```sql
ALTER TABLE mde_system.operations-log
  SET OPTIONS (
    -- Sets partition expiration to 30 days
    partition_expiration_days = 30);
```