feat(api): add upload endpoint and align upsert - #21
Merged
Conversation
Contributor
Author
|
@leo-altertable could you review this? I picked you because the affected client and test paths have no non-Albert ownership signal, and your Python stack ownership is the best match. CI is pending; the main review focus is the intentional breaking API correction: |
Member
|
@albert20260301 you need to implement the new |
Contributor
Author
redox
approved these changes
Jul 24, 2026
redox
pushed a commit
that referenced
this pull request
Jul 24, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.0](altertable-lakehouse-v0.3.1...altertable-lakehouse-v0.4.0) (2026-07-24) ### Features * **api:** add upload endpoint and align upsert ([#21](#21)) ([969e54d](969e54d)) ### Documentation * sync community documents ([#19](#19)) ([4a21043](4a21043)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
Client.uploadfor raw CSV, JSON, or Parquet bytes and binary streamsUploadModevalues:create,append, andoverwriteprimary_keyis required andmodeis not sentImpact analysis
This PR changes the Python Lakehouse client public surface in two places.
Client.upsertnow requiresprimary_key, matching the v0.12.0 Lakehouse spec. It also addsClient.upload(catalog, schema, table, mode, content, content_type=None), which sendsPOST /uploadwith the required query parameters and optional content type. Callers can pass bytes, a binary file stream, or a byte iterator.The endpoint contract matches
specs/lakehouse/SPEC.md: mode is restricted tocreate,append, oroverwrite; file format is conveyed byContent-Typewhen known, otherwise inferred by the service. Ruby, Java, and Rust already implement the same upload contract, so this removes the Python SDK divergence. No other SDK changes are needed.Validation
python3 -m py_compile src/altertable_lakehouse/client.py src/altertable_lakehouse/models.py tests/test_client.pygit diff --checkContent-Type, and 400 error handling.