Skip to content

Document Iceberg view location property#29764

Open
ningsh7 wants to merge 1 commit into
trinodb:masterfrom
ningsh7:issue-29739-document-iceberg-view-location
Open

Document Iceberg view location property#29764
ningsh7 wants to merge 1 commit into
trinodb:masterfrom
ningsh7:issue-29739-document-iceberg-view-location

Conversation

@ningsh7

@ningsh7 ningsh7 commented Jun 5, 2026

Copy link
Copy Markdown

Description

Document the Iceberg location view 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 that SHOW CREATE VIEW shows the current location.

Additional context and related issues

This is a documentation follow-up for #29724, which adds support for the location view property in Iceberg JDBC catalogs using schema version V1 and 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:

## Section
* Fix some things. ({issue}`issuenumber`)

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

#29724 supports it

@ningsh7

ningsh7 commented Jun 5, 2026

Copy link
Copy Markdown
Author

@ebyhr @findinpath Please review the documentation for accuracy thanks

@ningsh7

ningsh7 commented Jun 5, 2026

Copy link
Copy Markdown
Author

It looks
76e4fe2b063d4234b3a5587203bef261

(iceberg-views)=
#### Views

Iceberg catalogs that support views provide {ref}`sql-view-management`. When

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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';
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.
@ningsh7 ningsh7 force-pushed the issue-29739-document-iceberg-view-location branch from 969eb88 to 1a4b73b Compare June 9, 2026 10:01

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment on lines +1204 to +1206
* - `location`
- Optionally specifies the file system location URI for the view metadata
files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@ningsh7

ningsh7 commented Jun 9, 2026

Copy link
Copy Markdown
Author

Thanks for your review @findinpath , updated to follow the broader table properties style.
Now it looks:
image

@ningsh7 ningsh7 requested a review from findinpath June 9, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants