pub enum TableVersion {
ForSystemTimeAsOf(Expr),
TimestampAsOf(Expr),
VersionAsOf(Expr),
Function(Expr),
Changes {
changes: Expr,
at: Expr,
end: Option<Expr>,
},
}Expand description
Specifies a table version selection, e.g. FOR SYSTEM_TIME AS OF or AT(...).
Variants§
ForSystemTimeAsOf(Expr)
When the table version is defined using FOR SYSTEM_TIME AS OF.
For example: SELECT * FROM tbl FOR SYSTEM_TIME AS OF TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 HOUR)
TimestampAsOf(Expr)
When the table version is defined using TIMESTAMP AS OF.
Databricks supports this syntax.
For example: SELECT * FROM tbl TIMESTAMP AS OF CURRENT_TIMESTAMP() - INTERVAL 1 HOUR
VersionAsOf(Expr)
When the table version is defined using VERSION AS OF.
Databricks supports this syntax.
For example: SELECT * FROM tbl VERSION AS OF 2
Function(Expr)
When the table version is defined using a function.
For example: SELECT * FROM tbl AT(TIMESTAMP => '2020-08-14 09:30:00')
Changes
Snowflake CHANGES clause for change tracking queries.
For example:
SELECT * FROM t
CHANGES(INFORMATION => DEFAULT)
AT(TIMESTAMP => TO_TIMESTAMP_TZ('...'))
END(TIMESTAMP => TO_TIMESTAMP_TZ('...'))https://docs.snowflake.com/en/sql-reference/constructs/changes
Trait Implementations§
Source§impl Clone for TableVersion
impl Clone for TableVersion
Source§fn clone(&self) -> TableVersion
fn clone(&self) -> TableVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more