It is possible your Google account status may automatically delete data in BigQuery after 60-days. Typically, this is due to being in the Sandbox model or having a billing error or issue.
Google defines an entry-level tier of service for BigQuery:
The BigQuery sandbox gives you free access to the power of BigQuery subject to the sandbox's limits. The sandbox allows you to use the web UI in the Cloud Console without providing a credit card. You can use the sandbox without creating a billing account or enabling billing for your project.
However, the sandbox mode has significant limitations. As such, this mode is NOT suitable for anything other than the exploration of the features of the service. Openbridge strongly suggests that this mode is not used with our service. If you use or switch to this mode at any point, the risk of losing data is certain. Why?
Per Google Cloud, if you created or switched to a "sandbox" mode, the limits and quotas can be destructive to your data:
All datasets have the default table expiration time and the default partition expiration set to 60 days. Any tables, views, or partitions in partitioned tables automatically expire after 60 days.
As such, if you started with an account in Sandbox mode or had your account converted to sandbox mode due to a billing issue, Google will switch everything to a 60-day expiration.
Your data will expire and Openbridge will not be able to recover anything deleted by Google Cloud from its service. This is a setting in your account and outside of anything that Openbridge can control or fix.
Verify and Switch The 60-Day Expiration To Never Expire
You can edit the expiration date in BigQuery. However, you first have to ensure you are on a current, active paid billing plan for Google Cloud. To upgrade from the BigQuery sandbox, follow these steps:
Enable billing for your project
Remove or update the dataset's default table expiration.
Remove or update the dataset's default partition expiration.
Remove or update the expiration time for your tables.
Remove or update the expiration time for your views.
Remove or update the expiration time for your table partitions.
For example, you would first want to look at making sure table expiration is NOT enabled in your dataset:
Next, you need to review the setting for any tables or views and ensure they are set to be "default table expiration: Never"
or "default view expiration: Never"
To edit a table or view expiration, edit and select the expiration to be None
.
Restoring Deleted Resources
Per Google, if your tables have expired, you can recover them within 48 hours. For more information, see Restoring a deleted table. You can also view information about your BigQuery sandbox resources by using the audit logs. Audit logs show details such as whether a resource was created using the sandbox and when resources automatically expired.