Repository navigation
[0.2] handle catalog and namespace properly in Iceberg REST api (#324) - #742
Merged
tdas merged 2 commits intoNov 19, 2024
Merged
Conversation
…og#324) **PR Checklist** - [x] A description of the changes is added to the description of this PR. - [x] If there is a related issue, make sure it is linked to this PR. - [x] If you've fixed a bug or added code that should be tested, add tests! - [x] If you've added or modified a feature, documentation in `docs` is updated **Description of changes** Prior to this PR, users were required to lookup namespace and tables by supplying the uc catalog name in the namespace identifier which isn't proper and lead to problems. This PR implements the REST client flow of configuring calls to the API with a defined prefix containing the catalog name. The catalog name is now part of the API paths and broken apart from the namespace. Client (passes warehouse parameter) -> Server Config Endpoint (response has override for URL prefix) -> Client Subsequent calls to the API now has url prefixed with `/catalogs/{warehouse/catalog-name}` This PR "binds" the spark catalog to a UC catalog using the client config endpoint. Users must now add to their catalog configurations something like (example in spark): `"spark.sql.catalog.<spark-catalog-name>.warehouse": "<catalog-name>"` and now address tables like `<spark-catalog-name>.<namespace-name>.<table-name>` This should address unitycatalog#182 and parts of unitycatalog#3. --------- Signed-off-by: Alex Reid <[email protected]> (cherry picked from commit 3bf4a01)
Signed-off-by: Alex Reid <[email protected]>
tdas
approved these changes
Nov 19, 2024
tdas
left a comment
Contributor
There was a problem hiding this comment.
thank you for the backport!
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.
PR Checklist
docsis updatedDescription of changes
Prior to this PR, users were required to lookup namespace and tables by supplying the uc catalog name in the namespace identifier which isn't proper and lead to problems. This PR implements the REST client flow of configuring calls to the API with a defined prefix containing the catalog name. The catalog name is now part of the API paths and broken apart from the namespace.
Client (passes warehouse parameter) -> Server Config Endpoint (response has override for URL prefix) -> Client
Subsequent calls to the API now has url prefixed with
/catalogs/{warehouse/catalog-name}This PR "binds" the spark catalog to a UC catalog using the client config endpoint. Users must now add to their catalog configurations something like (example in spark):
"spark.sql.catalog.<spark-catalog-name>.warehouse": "<catalog-name>"and now address tables like<spark-catalog-name>.<namespace-name>.<table-name>This should address
#182 and parts of #3.
Signed-off-by: Alex Reid [email protected]
(cherry picked from commit 3bf4a01)
PR Checklist
docsis updatedDescription of changes