Nessie Query Syntax preview
By default, table references are applied to the current Nessie commit context (which was specified from your last USE SQL command). However, you can specify a different table reference point for the table in the query.
FROM <table_path>
[ AT {
REF[ERENCE] <reference>
| BRANCH <branch_name>
| TAG <tag_name>
| COMMIT <commit_hash>
| TIMESTAMP <timestamp>
}
]
Parameters
<table_path>
String
The path of the table that you want to query. The table must be in the Nessie repository.
Optional Parameters
AT
Specify a reference point for the current SQL session. When this parameter is omitted, the current reference point is used.
- REF[ERENCE] <reference>: Identifies the branch, tag, commit, or timestamp that you want to use as the new commit reference point.
- BRANCH <branch_name>: Changes the commit reference point to the specified branch.
- TAG <tag_name>: Changes the commit reference point to the specified tag.
- COMMIT <commit_hash>: Changes the commit reference point to the specified commit.
- TIMESTAMP <timestamp>: Changes the commit reference point to the specified timestamp.
Examples
SELECT *
FROM nessie_repo.demo_table AT REF main_branch
SELECT *
FROM nessie_repo.demo_table AT TIMESTAMP ‘2022-01-01 17:30:50.000’
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.