Skip to content

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

Open
@madmacc

Description

[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
  )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions