Skip to content

Commit

Permalink
fix: add note about hypertables for time buckets. (#3448)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy-the-fish authored Sep 17, 2024
1 parent 6009bb9 commit 6bd4710
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion api/add_dimension.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ SELECT add_dimension('conditions', by_hash('location', 2));
[regular-hypertables]: /api/:currentVersion:/hypertable/create_hypertable/
[add-dimension-old]: /api/:currentVersion:/hypertable/add_dimension_old/
[rn-2130]: /about/:currentVersion:/release-notes/#timescaledb-2130-on-2023-11-28
[hash-partition]: /api/:currentVersion:/hypertable/add_dimension/#hash-partitions
[hash-partition]: /api/:currentVersion:/hypertable/add_dimension/#hash-partitions
13 changes: 5 additions & 8 deletions use-timescale/hypertables/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@ keywords: [hypertables, create]

# Create hypertables

<Highlight type="note">
This code uses the new generalized hypertable API introduced in
TimescaleDB 2.13. The [old interface for `create_hypertable` is also
available](/api/:currentVersion:/hypertable/create_hypertable_old/).
</Highlight>

After [creating a Timescale database][install], you're ready to create your
first hypertable. Creating a hypertable is a two-step process:

1. Create a PostgreSQL table as usual
1. Convert it to a hypertable

You can also create distributed hypertables. For more information, see the
[distributed hypertables section][create-distributed-hypertable].
<Highlight type="note">
This code uses the new generalized hypertable API introduced in
TimescaleDB 2.13. The [old interface for `create_hypertable` is also
available](/api/:currentVersion:/hypertable/create_hypertable_old/).
</Highlight>

## Create a hypertable

Expand Down
7 changes: 4 additions & 3 deletions use-timescale/time-buckets/about-time-buckets.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ keywords: [time buckets]

# About time buckets

The [`time_bucket`][time_bucket] function allows you to aggregate data into
buckets of time, for example: 5 minutes, 1 hour, or 3 days. It's similar to
PostgreSQL's [`date_bin`][date_bin] function, but it gives you more
The [`time_bucket`][time_bucket] function allows you to aggregate data in a
[hypertable][create-hypertable] into buckets of time. For example: 5 minutes, 1 hour, or 3 days.
It's similar to PostgreSQL's [`date_bin`][date_bin] function, but it gives you more
flexibility in bucket size and start time.

Time bucketing is essential to working with time-series data. You can use it to
Expand Down Expand Up @@ -101,3 +101,4 @@ parameter.
[origin]: /api/:currentVersion:/hyperfunctions/time_bucket/#optional-arguments-for-interval-time-inputs
[time_bucket]: /api/:currentVersion:/hyperfunctions/time_bucket/
[use-time-buckets]: /use-timescale/:currentVersion:/time-buckets/use-time-buckets/
[create-hypertable]: /use-timescale/:currentVersion:/hypertables/create/
3 changes: 2 additions & 1 deletion use-timescale/time-buckets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ keywords: [time buckets]

# Time buckets

Time buckets enable you to aggregate data by time interval. For example, you can
Time buckets enable you to aggregate data in [hypertables][create-hypertable] by time interval. For example, you can
group data into 5-minute, 1-hour, and 3-day buckets to calculate summary values.

* [Learn how time buckets work][about-time-buckets] in Timescale
* [Use time buckets][use-time-buckets] to aggregate data

[about-time-buckets]: /use-timescale/:currentVersion:/time-buckets/about-time-buckets/
[use-time-buckets]: /use-timescale/:currentVersion:/time-buckets/use-time-buckets/
[create-hypertable]: /use-timescale/:currentVersion:/hypertables/create/
5 changes: 3 additions & 2 deletions use-timescale/time-buckets/use-time-buckets.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ keywords: [time buckets]

# Aggregate time-series data with time_bucket

The `time_bucket` function helps you group your data, so you can perform
aggregate calculations over arbitrary time intervals. It is usually used
The `time_bucket` function helps you group in a [hypertable][create-hypertable] so you can
perform aggregate calculations over arbitrary time intervals. It is usually used
in combination with `GROUP BY` for this purpose.

This section shows examples of `time_bucket` use. To learn how time buckets
Expand Down Expand Up @@ -97,3 +97,4 @@ The function returns `2021-01-04 00:00:00`. The start time of the time bucket is
the Monday of that week, at midnight.

[time-buckets]: /use-timescale/:currentVersion:/time-buckets/
[create-hypertable]: /use-timescale/:currentVersion:/hypertables/create/

0 comments on commit 6bd4710

Please sign in to comment.