public final class AnalyticQuery extends Object
Modifier and Type | Method and Description |
---|---|
Table |
execute()
Executes the query adding all the calculated columns to a new table.
|
void |
executeInPlace()
Executes the query and adds all the calculated columns directly to the source table.
|
Table |
getTable()
The Table behind the query.
|
static AnalyticQuerySteps.NumberingQuerySteps.FromStep |
numberingQuery()
Entry point for the fluent Numbering Query Builder.
|
static AnalyticQuerySteps.FullAnalyticQuerySteps.FromStep |
query()
Entry point for the fluent analytic query builder.
|
static AnalyticQuerySteps.QuickQuerySteps.FromStep |
quickQuery()
Entry point for the fluent Analytic Query Builder.
|
String |
toSqlLikeString()
Creates a SQL like string for documentation purposes.
|
String |
toString() |
@Beta public static AnalyticQuerySteps.FullAnalyticQuerySteps.FromStep query()
An AnalyticQuery performs a calculation across a set of table rows that are somehow related to the current row.
Query includes steps for: FROM table_name [ PARTITION BY co1, col2... ] [ ORDER BY col1, col2...] window_frame_clauseAnalyticQuerySteps.DefineWindowFame
argument_listAnalyticQuerySteps.AnalyticFunctions
@Beta public static AnalyticQuerySteps.NumberingQuerySteps.FromStep numberingQuery()
A numbering assigns integer values to each row based on their position within the specified partition. Numbering queries require Order By.
Query includes steps for:
FROM table_name
[ PARTITION BY col1, col2...]
ORDER BY
argument_list AnalyticQuerySteps.NumberingFunctions
@Beta public static AnalyticQuerySteps.QuickQuerySteps.FromStep quickQuery()
query()
but skips the ORDER BY and PARTITION BY steps.
Query includes steps for: FROM table_name window_frame_clauseAnalyticQuerySteps.DefineWindowFame
argument_listAnalyticQuerySteps.AnalyticFunctions
public Table getTable()
Table
behind this query.public String toSqlLikeString()
public Table execute()
public void executeInPlace()
IllegalArgumentException
- if any of the calculated columns have the same name as one of
the columns in the FROM table.Copyright © 2019. All rights reserved.