-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Document table_changes
Iceberg table function
#21406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document table_changes
Iceberg table function
#21406
Conversation
FROM | ||
TABLE( | ||
system.table_changes( | ||
"SCHEMA" => 'default', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SCHEMA
and TABLE
are reserved words, so we'll have to quote them to avoid unwanted sql syntax issues.
cc @martint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats kinda bad .. why did those parameters not use the same approach as in https://trino.io/docs/current/connector/iceberg.html#migrate-table
so schema_name
and table_name
and also stick with lower case parameter names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we maybe fix the implementation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9db2912
to
22bd647
Compare
838a6f5
to
983b48f
Compare
VALUES | ||
('url1', 'domain1', 1), | ||
('url2', 'domain2', 2), | ||
('url3', 'domain1', 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the domain values here and below different on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the page_url
& domain
are supposed to be the primary key so to say of the table that can be used in downstream processes to identify the history of changes performed on a tuple.
Note that the same example slightly adapted is employed in Trino Delta Lake connector as well.
983b48f
to
db0edd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Ideally add the sql language identifier to all the query code snippets .. also not sure if you want approval from another maintainer.
Description
Documentation follow-up from #15677
Additional context and related issues
Fixes #21227
Iceberg Spark counterpart https://iceberg.apache.org/docs/latest/spark-procedures/#create_changelog_view
Delta Lake
table_changes
table function documenation https://trino.io/docs/current/connector/delta-lake.html#table-changesRelease notes
(x) This is not user-visible or is docs only, and no release notes are required.