feat: add per-load key to load_managed_table - #49
Merged
Conversation
load_managed_table gains an optional `key` — the merge key columns for delete/update/upsert loads, matched per-load instead of requiring a key declared at table creation. Omit it to use the table's declared key; ignored for replace/append. Requires hotdata>=0.8.0, which adds the `key` field to the load-request model.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an optional
keyargument toload_managed_table(on bothManagedDatabaseClientandRuntimeClient), forwarded intoLoadManagedTableRequest.key. This letsdelete/update/upsertloads carry their merge key per-load instead of requiring it to be declared at table creation. Omitkeyto use the table's declared key; ignored forreplace/append(fully backward compatible).Depends on
hotdata>=0.8.0(adds thekeyfield toLoadManagedTableRequest). ✅ Published to PyPI, anduv.lockis locked to it in this PR.Part of the per-load-key chain
runtimedb(server, merged & deployed) →hotdata 0.8.0(merged & published) → this PR →hotdata-dlt-destination(connector, next). A follow-up release PR bumps this package0.7.3 → 0.8.0.Tests
test_load_managed_table_forwards_key— thekeyis forwarded throughManagedDatabaseClientto the runtime client.test_load_managed_table_passes_key/test_load_managed_table_key_defaults_to_none— the key flows intoLoadManagedTableRequestand defaults toNonewhen omitted.Test (Python 3.12), changelog check, review). Verified locally againsthotdata 0.8.0.