Document Iceberg view location property#29764
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 969eb8851c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ```sql | ||
| CREATE VIEW recent_orders | ||
| WITH (location = 's3://my-bucket/example/views/recent_orders') |
There was a problem hiding this comment.
Remove unsupported view location example
This example documents CREATE VIEW ... WITH (location = ...), but the connector in this commit still rejects all Iceberg view properties: IcebergMetadata.createView requires viewProperties.isEmpty() before delegating to the catalog, and IcebergConnector does not register any view properties. In the documented JDBC V1/REST-view-endpoint contexts, users following this statement will get a failure instead of creating a view at the specified metadata location, so the docs should not advertise the property until the connector accepts it.
Useful? React with 👍 / 👎.
|
@ebyhr @findinpath Please review the documentation for accuracy thanks |
| (iceberg-views)= | ||
| #### Views | ||
|
|
||
| Iceberg catalogs that support views provide {ref}`sql-view-management`. When |
There was a problem hiding this comment.
Iceberg catalogs that support views provide {ref}
sql-view-management.
That's not a statement.
| #### Views | ||
|
|
||
| Iceberg catalogs that support views provide {ref}`sql-view-management`. When | ||
| creating a view in JDBC catalogs using schema version `V1` or REST catalogs with |
There was a problem hiding this comment.
Just follow a broader approach same as for the table properties
https://trino.io/docs/current/connector/iceberg.html#table-properties
Avoid getting into details and specifying details about jdbc/rest catalog support that may be subject to change.
| FROM orders | ||
| WHERE orderdate >= DATE '2024-01-01'; | ||
| ``` | ||
|
|
There was a problem hiding this comment.
i don't know whether the example is actually necessary.
Just mention the introductory sentence and the view properties table for now.
Add an Iceberg views section with a view properties table documenting the `location` property.
969eb88 to
1a4b73b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a4b73b12c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| * - `location` | ||
| - Optionally specifies the file system location URI for the view metadata | ||
| files. |
There was a problem hiding this comment.
Do not document unsupported view location property
Fresh evidence from the current checkout still shows the Iceberg connector does not expose view properties: Connector.getViewProperties() defaults to an empty list, IcebergConnector only overrides materialized-view properties (plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergConnector.java:219), and IcebergMetadata.createView rejects any non-empty viewProperties (plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java:3440-3442). In this commit, users following the newly documented CREATE VIEW ... WITH (location = ...) path will hit property validation or the create-view guard instead of setting the metadata location, so this should not be advertised until the connector actually registers and accepts the property.
Useful? React with 👍 / 👎.
|
Thanks for your review @findinpath , updated to follow the broader table properties style. |


Description
Document the Iceberg
locationview property for catalogs that support it.This adds an Iceberg views section with a view properties table, a
CREATE VIEW ... WITH (location = ...)example, and a note thatSHOW CREATE VIEWshows the currentlocation.Additional context and related issues
locationview property in Iceberg REST / JDBC catalogs #29739This is a documentation follow-up for #29724, which adds support for the
locationview property in Iceberg JDBC catalogs using schema versionV1and REST catalogs with view endpoints enabled.Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: