Skip to content

Add more examples for pyiceberg view#3414

Open
MonkeyCanCode wants to merge 4 commits into
apache:mainfrom
MonkeyCanCode:pyiceberg_view_doc
Open

Add more examples for pyiceberg view#3414
MonkeyCanCode wants to merge 4 commits into
apache:mainfrom
MonkeyCanCode:pyiceberg_view_doc

Conversation

@MonkeyCanCode
Copy link
Copy Markdown

Closes #3413

Rationale for this change

Adds more examples around view support.

Are these changes tested?

Yes. Those had been tested locally with local Polaris.

Are there any user-facing changes?

No.

Copy link
Copy Markdown
Contributor

@gabeiglio gabeiglio left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! left some small comments but overall looks good

Comment thread mkdocs/docs/api.md
Comment thread mkdocs/docs/api.md Outdated
Comment thread mkdocs/docs/api.md Outdated
Comment thread mkdocs/docs/api.md Outdated
@MonkeyCanCode
Copy link
Copy Markdown
Author

@gabeiglio thanks for the review. All feedbacks had been addressed now.

Comment thread mkdocs/docs/api.md
## Create a view

PyIceberg supports view operations.
If the REST server does not indicate support for view endpoints, you can enable it by setting `"view-endpoints-supported": "true"`:
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 think we should be encouraging this pattern. If a Catalog says they don't support view endpoints (through /v1/config), we shouldn't tell people to ignore that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rambleraptor, what is your suggestion? This config property was introduced for backward compatibility. Older REST servers may not send endpoints field in the ConfigResponse even if view operations are supported.

Comment thread mkdocs/docs/api.md
Comment on lines +1540 to +1545
"uri": "http://127.0.0.1:8181",
"s3.endpoint": "http://127.0.0.1:9000",
"py-io-impl": "pyiceberg.io.pyarrow.PyArrowFileIO",
"s3.access-key-id": "admin",
"s3.secret-access-key": "password",
"view-endpoints-supported": "true",
Copy link
Copy Markdown
Member

@ebyhr ebyhr May 26, 2026

Choose a reason for hiding this comment

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

Documenting view-endpoints-supported is a good idea. However, placing it under Create a view seems unusual because other view operations also require it in older REST catalog implementations.

How about keeping ## Views and mentioning this snippet there? Each section can be a H3 ###.
Or, we could add the property to configuration.md.

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.

So the create/load/check tables are all H2. Thus, I proceeded with the same for views. I like the idea of keeping ## Views, however, I am not sure if we should make the rest H3 as they will be a bit off compare to the table ones. WDYT?

Comment thread mkdocs/docs/configuration.md Outdated
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.

Docs: Add documentation/examples of supported View operations

4 participants