code: public Long updateDatasetExpiration(DatasetInfo dataset) {
      // [START bigquery_update_dataset_expiration]
      Long beforeExpiration = dataset.getDefaultTableLifetime();
  
      Long oneDayMilliseconds = 24 * 60 * 60 * 1000L;
      DatasetInfo.Builder builder = dataset.toBuilder();
      builder.setDefaultTableLifetime(oneDayMilliseconds);
      bigquery.update(builder.build()); // API request.
      // [END bigquery_update_dataset_expiration]
  
      return beforeExpiration;
    }
docs: [VARIABLE bigquery.getDataset(DatasetId.of("my_dataset"))]