Comments (3)
@tdcmeehan, I have compiled a list of statements for various scenarios based on your proposed syntax and Iceberg spec. Let me know what you think.
Notes:
- Default retention policy: undefined period of time
- Default snapshot: current snapshot
- Snapshot retention: sets the minimum number of snapshots to retain on a branch and/or the maximum age of individual snapshots to retain on the branch.
Syntax for branches
- Create branch with default values:
ALTER TABLE iceberg.default.mytable CREATE BRANCH 'audit-branch'
- Create branch as of version:
ALTER TABLE iceberg.default.mytable CREATE BRANCH 'audit-branch' FOR SYSTEM_VERSION AS OF 3
- Create branch as of timestamp:
ALTER TABLE iceberg.default.mytable CREATE BRANCH 'audit-branch' FOR SYSTEM_TIME AS OF TIMESTAMP ‘2024-03-02 13:29:46.822 America/Los_Angeles‘
- Create branch with retention policy:
ALTER TABLE iceberg.default.mytable CREATE BRANCH 'audit-branch' FOR SYSTEM_VERSION AS OF 3 RETAIN 7 DAYS
- Create branch with snapshots retention:
ALTER TABLE iceberg.default.mytable CREATE BRANCH 'audit-branch' FOR SYSTEM_VERSION AS OF 3 RETAIN 7 DAYS WITH SNAPSHOT RETENTION 2 SNAPSHOTS 2 DAYS
Syntax for tags
- Create tag with default values:
ALTER TABLE iceberg.default.mytable CREATE TAG 'audit-tag'
- Create tag as of version:
ALTER TABLE iceberg.default.mytable CREATE TAG 'audit-tag' FOR SYSTEM_VERSION AS OF 3
- Create tag as of timestamp:
ALTER TABLE iceberg.default.mytable CREATE TAG 'audit-tag' FOR SYSTEM_TIME AS OF TIMESTAMP ‘2024-03-02 13:29:46.822 America/Los_Angeles‘
- Create tag with retention policy:
ALTER TABLE iceberg.default.mytable CREATE TAG 'audit-tag' FOR SYSTEM_VERSION AS OF 3 RETAIN 7 DAYS
from presto.
@s-akhtar-baig looks good to me, except retention policy examples don't seem to need to include SYSTEM_TIME
/SYSTEM_VERSION
(since they don't specify a time or version).
CC some other folks who may be interested in syntax discussions: @rschlussel @aditi-pandit @kaikalur @ClarenceThreepwood
from presto.
Oh yes, my bad! I have updated the two statements.
from presto.
Related Issues (20)
- Function to split an IP prefix into subnets HOT 1
- Issue with druid selecting empty columns HOT 6
- Add SQL Support for ALTER VIEW In Presto
- Pushdown semijoin below agg if keys are subset
- Tiny table joining two large tables should pre join both HOT 2
- [Native] Getting build issue after rebasing to latest Presto - 0.290-SNAPSHOT HOT 3
- Iceberg `timestamptz` should map to Presto `TIMESTAMP WITH TIME ZONE` type HOT 1
- Presto Router to support custom SPI plugin scheduler to route query HOT 1
- Columns should be left aligned HOT 2
- Document field_names_in_json_cast_enabled
- Hoist global windows without partition by into a join
- [Iceberg] While time travel Iceberg is not using schema respective to a given Snapshot HOT 5
- Distinct operation on UUID fails HOT 5
- Support enabling SSL for Prometheus connector
- SSL Support for Oracle Connector
- UNLOAD to write to a destination ( like S3 ) the result of a query HOT 4
- Round bytes to Gigabytes in error messages HOT 2
- [docs] Create session properties page as counterpart for (Configuration) Properties reference
- Support Google-style trailing comma in SELECT HOT 3
- Flakiness while trying to download Nodejs during Presto Build in CI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from presto.