Skip to content

feat(managed): add add_managed_table for additive schema evolution#32

Merged
eddietejeda merged 1 commit into
mainfrom
feat/add-managed-table
Jun 30, 2026
Merged

feat(managed): add add_managed_table for additive schema evolution#32
eddietejeda merged 1 commit into
mainfrom
feat/add-managed-table

Conversation

@eddietejeda

Copy link
Copy Markdown
Contributor

Summary

Adds HotdataClient.add_managed_table(database, table, *, schema), a thin wrapper over the SDK's DatabasesApi.add_database_table endpoint. It declares a new table on an existing managed database (added empty / declared-but-unloaded; populate via load_managed_table).

This unblocks additive schema evolution for downstream consumers (notably the dlt destination), which currently must snapshot every table, delete the whole managed database, recreate it with the union of tables, and reload all data just to add one table.

Changes

  • hotdata_framework/client.py: new add_managed_table method (mirrors delete_managed_table) + AddManagedTableRequest import.
  • tests/test_client.py: unit test asserting the endpoint is called with the right args and the response is mapped to ManagedTable (synced=False, last_sync=None).
  • CHANGELOG.md: [Unreleased] note.

Verification

  • uv run pytest — all green (incl. new test).
  • ruff check — clean.

Follow-up

A release (minor bump) is needed so the dlt destination can pin the new version and drop its destructive-recreate workaround.

Wraps the SDK add_database_table endpoint so callers can declare a new
table on an existing managed database without recreating it. The table
is added empty (declared-but-unloaded) and populated via load_managed_table.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean, well-scoped addition. Mirrors the existing managed-table methods, wraps ApiException consistently, and is covered by a meaningful test. LGTM.

@eddietejeda eddietejeda merged commit dabcd59 into main Jun 30, 2026
4 checks passed
@eddietejeda eddietejeda deleted the feat/add-managed-table branch June 30, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant