Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 firestore-bigquery-export - backup and remove old changelog rows #2222

Open
madmacc opened this issue Nov 26, 2024 · 0 comments
Open

🐛 firestore-bigquery-export - backup and remove old changelog rows #2222

madmacc opened this issue Nov 26, 2024 · 0 comments
Labels
type: feature request New feature or request

Comments

@madmacc
Copy link

madmacc commented Nov 26, 2024

[REQUIRED] Step 2: Extension name

This feature request is for extension: _ (firestore-bigquery-export)

What feature would you like to see?

Add the ability to automatically backup the change log rows into another table and delete them from the _raw_changelog table.
The large amount of data in this table is causing substantial cost increases to queries.

How would you use it?

This is my stackoverflow.
My current process is to make a copy of the _raw_changelog table and then use the SQL in the link above to delete the old changelog rows.

DELETE FROM your_dataset.your_table
  WHERE STRUCT(document_name, timestamp) NOT IN (
      SELECT AS STRUCT document_name, MAX(timestamp) AS timestamp
      FROM your_dataset.your_table
      GROUP BY document_name
  )
@madmacc madmacc added the type: feature request New feature or request label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant