Is it possible to set a time to live for a column in BigQuery? If there are two records in table payment_details and timestamp, the data in BigQuery table should be deleted automatically if the timestamp is current time - timestamp is greater is 90 days.
Is it possible to set expiration time for records in BigQuery
2.1k Views Asked by Bhawna Joshi At
1
There are 1 best solutions below
Related Questions in GOOGLE-BIGQUERY
- Get the last data of my google analytics dataset
- Is there any form to write to BigQuery specifying the name of destination tables dynamically?
- How to obtain java repositories having maximum number of stars in GitHub-Archive
- Possible to create BigQuery Table/Schema without populating with Data?
- Google spreadsheet script authorisation to BigQuery
- Google BigQuery Optimization Strategies
- Error when I try to create different BigQuery tables at the same pipeline execution
- Run BigQuery without login authentication
- Is there a CityHash Python (2.7) Implementation for Google App Engine?
- pandas read_gbq returns httplib.ResponseNotReady
- Designing an API on top of BigQuery
- BigQuery row level security permissions
- What is the best way to fuzzy compare two tables
- Query Google Bigquery Through Python In Google App Engine
- How to integrate Google Bigquery with c# console application
Related Questions in SPRING-CLOUD-GCP-BIGQUERY
- CSV Export from Bigquery having columns surrounded with double quotes adding not working
- GCP Billing Data Bigquery
- BigQuery Requests never returns
- where to get tutorial to create a Big Query Project?
- Support UNION ALL function in BigQuery SQL Issue
- GCP - Bigquery with multiple conditions
- googleapis.com: connection throws com.google.cloud.bigquery.BigQueryException: sun.security.validator.ValidatorException PKIX path building failed
- Why is my Big Query Dataset connected to a G Sheet throwing an error when I'm trying to auto refresh it through an AppScript code?
- How to get paginated data from BigQuery in Java?
- SyntaxError when adding and subtracting with BigQuery
- Is it possible to set expiration time for records in BigQuery
- How to insert 38000 records in BigQuery using streaming insertAll?
- Spring boot BigQuery datasource connection
- which is the best way to query GCP usage cost from BigQuery in java?
- Trouble connecting to BigQuery using Google Cloud Client Library in a Spring Boot Application
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Solution 1:
BigQuery has a partition expiration feature. You can leverage that for your use case.
Essentially you need to create a partitioned table, and set the
partition_expiration_daysoption to 90 days.or if you have a table partitioned already by the right column
Solution 2:
You can setup a Scheduled Query that will prune hourly/daily your data that is older than 90 days. By writing a "Delete" query you have more control to actually combine other business logic, like only delete duplicate rows, but keep most recent entry even if it's older than 90 days.
Solution 3:
If you have larger business process that does the 90 day pruning based on other external factors, like an API response, and conditional evaluation, you can leverage Cloud Workflows to build and invoke a workflow regularly to automate the pruning of your data. See Automate the execution of BigQuery queries with Cloud Workflows article which can guide you with this.