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

Document unofficial Singer extension: ACTIVATE_VERSION #2463

Closed
MeltyBot opened this issue Jan 12, 2021 · 3 comments
Closed

Document unofficial Singer extension: ACTIVATE_VERSION #2463

MeltyBot opened this issue Jan 12, 2021 · 3 comments

Comments

@MeltyBot
Copy link
Contributor

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/2508

Originally created by @DouweM on 2021-01-12 22:46:35


As explained by Jeff Huth in Slack:

Most taps are upsert only; either FULL_TABLE (all records) or INCREMENTAL (only records on/after the bookemark). But there are a few taps out there that use ACTIVATE_VERSION . This is an undocumented feature and only works if the target is set up to deal with this... basically, it loads ALL records with a version, then (logically?) deletes earlier version(s) of the records with the same Primary Key. These allow you to upsert + delete (to logically delete the "delta" records).

Imagine you load 100 records from a table today; then you delete 5 records and load 95 records tomorrow. This feature "deletes" the delta 5 records.

Most database targets allow for this. But some file-based targets and even singer-check-tap target fail when you try to run these taps.

tap-google-sheets is a tap that uses this.

The ACTIVATE_VERSION message is not currently documented in the the Singer spec (issue to change that: singer-io/getting-started#71), but it is included in the singer-python library (where it's marked as experimental): https://github.com/singer-io/singer-python/blob/master/singer/messages.py#L137

While this feature may be experimental from the Singer spec's perspective, it is implemented by at least one tap/target pair that's supported out of the box by Meltano, so it's effectively standardized and worth documenting:

We are also planning to support this feature in taps and targets built using the Singer SDK: https://gitlab.com/meltano/singer-sdk/-/issues/18

@MeltyBot
Copy link
Contributor Author

@pnadolny13
Copy link
Contributor

pnadolny13 commented Dec 19, 2022

I'm not sure this resolves this issue enough to close it but theres https://hub.meltano.com/singer/docs#activate-version which describes the feature.

cc @tayloramurphy will you close this if you think those docs resolve this issue.

@tayloramurphy
Copy link
Collaborator

@pnadolny13 we can close. It's a start but I think we'll want to do more if/when we bring that to the SDK.

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

No branches or pull requests

3 participants