Skip to content

Commit

Permalink
groupBy
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsimha committed Feb 6, 2024
1 parent a28c020 commit c139be2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/source/chip/2-Fluent-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,19 @@ As mentioned, in Chronon the select clause is exclusively reserved for projectio



#### Group By
At this point we have a fully formed source we can now support union, groupBy and join on the fully formed source


```python

src
.groupBy(key1, key2)
.defaultWindows([1d, 7d])
.agg(
last_k(col1, k = 10, windows = [1d, 7d], buckets = [bucket1, bucket2]),
approx_uniq(col2, lg_k = 20),
last(col3, buckets = [bucket1, bucket2])
)
.temporalAccuracy() # optional
.derive(alias1 = expr1, alias2 = expr2)
```

0 comments on commit c139be2

Please sign in to comment.