Skip to content
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

Define default aggregation for a measurement #70

Open
Seddryck opened this issue Jul 30, 2023 · 0 comments
Open

Define default aggregation for a measurement #70

Seddryck opened this issue Jul 30, 2023 · 0 comments
Labels
arrangers Receive a model an optimize or transform it modeling Feature to receive a command, translate it to a dialect and query the source. new-feature Request for a new feature in the tool

Comments

@Seddryck
Copy link
Owner

It should be possible to define a default aggregation for each measurement when specifying the Timeseries. The default aggregation is defined by the keyword DEFAULT AGGREGATION. Values can be all aggregations except COUNT.

CREATE TIMESERIES WindEnergy AS (
...
    Forecasted MEASUREMENT DEFAULT AGGREGATION SUM,
...
)

The default aggregation can be used anywhere by replacing the explicit aggregation by the keyword AGGREGATE.

SELECT
    Instant,
    AGGREGATE(Forecasted)
FROM
    WindEnergy

should be equivalent to

SELECT
    Instant,
    SUM(Forecasted)
FROM
    WindEnergy
@Seddryck Seddryck added the new-feature Request for a new feature in the tool label Jul 30, 2023
@Seddryck Seddryck added modeling Feature to receive a command, translate it to a dialect and query the source. mounting Attach a dataset to a query engine and define its structure. arrangers Receive a model an optimize or transform it labels Jul 30, 2023
@Seddryck Seddryck removed the mounting Attach a dataset to a query engine and define its structure. label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrangers Receive a model an optimize or transform it modeling Feature to receive a command, translate it to a dialect and query the source. new-feature Request for a new feature in the tool
Projects
None yet
Development

No branches or pull requests

1 participant