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

scd2 extension: active record literal changes #1275

Merged
merged 6 commits into from
Apr 25, 2024

Conversation

jorritsandbrink
Copy link
Collaborator

@jorritsandbrink jorritsandbrink commented Apr 24, 2024

Description

active record literal = literal used to indicate active records in scd2 tables

This PR

  • changes default active record literal from a high timestamp to NULL
  • introduces active_record_timestamp setting that gives users control over the active record literal
    • accepts None (default) or an object conforming to TAnyDateTime
@dlt.resource(
    ...,
    write_disposition={
        "disposition": "merge",
        "strategy": "scd2",
        "active_record_timestamp": "9999-12-31",  # e.g. `datetime` is also okay
    },
    ...
)

Related Issues

Partially implements #1252

@jorritsandbrink jorritsandbrink added the enhancement New feature or request label Apr 24, 2024
@jorritsandbrink jorritsandbrink requested a review from sh-rp April 24, 2024 12:25
@jorritsandbrink jorritsandbrink self-assigned this Apr 24, 2024
Copy link

netlify bot commented Apr 24, 2024

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit fe8c0ca
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/662a3e9de3a67f0008c40f7a
😎 Deploy Preview https://deploy-preview-1275--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@sh-rp sh-rp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks :) We just need the docs for it now, then we can merge!

@sh-rp
Copy link
Collaborator

sh-rp commented Apr 25, 2024

Merging since tests passed on prev commit, this was just a docs change.

@sh-rp sh-rp merged commit df6282b into devel Apr 25, 2024
45 of 47 checks passed
@rudolfix rudolfix deleted the 1252-scd2-active-record-literal-extension branch May 20, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants