'Bigquery Data got deleted automatically

Google Analytics data got stored in 2 tables

  1. events_{{Date}}
  2. events_intraday_{{Date}} We need t-1 data always and somedays google moves data from events_intraday_ to the events table and somedays it won't move. So I created a clone of the events table as new_{{date}} and I wrote a cron to copy events_intraday_{{Date}} one day earlier data to new_{{date}}. It is working fine. The issue is that without any intervention the newly added data to new_{{date}} got deleted automatically.


Solution 1:[1]

Since you observed that the data got deleted automatically, it could be because of the table expiration settings. If a table's expiration is reached, the table itself will be dropped. If the table is partitioned, the respective partitions that have reached the expiration duration will be dropped.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kabilan Mohanraj