Skip to content

Commit 7f08084

Browse files
Merge branch 'latest' into bm25search-open-sourcing
2 parents 8d81f4b + 55d9ee0 commit 7f08084

File tree

629 files changed

+5016
-4105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

629 files changed

+5016
-4105
lines changed

.github/ISSUE_TEMPLATE/broken_link_report.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ labels: bug, automated issue, link check
66
assignees: atovpeko
77
---
88

9-
The broken link check failed. Check [the workflow logs](https://github.com/timescale/docs/actions/workflows/daily-link-checker.yml) to identify the failing links.
9+
The broken link check failed. Check [the workflow logs][the-workflow-logs] to identify the failing links.
10+
11+
[the-workflow-logs]: https://github.com/timescale/docs/actions/workflows/daily-link-checker.yml

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ _Use this template for reporting bugs in the docs._
3535

3636
## Contributing to documentation
3737

38-
We welcome documentation contributions! For guidelines, see the [contributing guide](https://github.com/timescale/docs/blob/latest/CONTRIBUTING.md).
38+
We welcome documentation contributions! For guidelines, see the [contributing guide][contributing-guide].
39+
40+
[contributing-guide]: https://github.com/timescale/docs/blob/latest/CONTRIBUTING.md

.github/ISSUE_TEMPLATE/rfc.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ assignees: ''
2525

2626
## Contributing to documentation
2727

28-
We welcome documentation contributions! For guidelines, see the [contributing guide](https://github.com/timescale/docs/blob/latest/CONTRIBUTING.md).
28+
We welcome documentation contributions! For guidelines, see the [contributing guide][contributing-guide].
29+
30+
[contributing-guide]: https://github.com/timescale/docs/blob/latest/CONTRIBUTING.md

.github/pull_request_template.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Fixes #[insert issue link, if any]
88

99
# Writing help
1010

11-
For information about style and word usage, see the [Contribution guide](https://github.com/timescale/docs/blob/latest/CONTRIBUTING.md)
11+
For information about style and word usage, see the [Contribution guide][contribution-guide]
1212

1313
# Review checklists
1414

@@ -31,3 +31,5 @@ Reviewers: use this section to ensure you have checked everything before approvi
3131
* [ ] If the page index was updated, are redirects required
3232
and have they been implemented?
3333
* [ ] Have you checked the built version of this content?
34+
35+
[contribution-guide]: https://github.com/timescale/docs/blob/latest/CONTRIBUTING.md

.github/styles/templates/procedure.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ If necessary, a paragraph or two explaining more about how things work.
2626

2727
This section shows you how to:
2828

29-
* [Verb \<what the user will do>](#verb-what-the-user-will-do)
30-
* [Verb \<what the user will do if the procedure is cut into logical sections>](#verb-what-the-user-will-do-if-the-procedure-is-cut-into-logical-sections)
29+
* [Verb \<what the user will do>][verb-what-the-user-will-do-link]
30+
* [Verb \<what the user will do if the procedure is cut into logical sections>][verb-what-the-user-will-do-if-the-procedure-is-cut-into-logical-sections-link]
3131

3232
## Prerequisites
3333

@@ -99,8 +99,11 @@ of the same thing:
9999
You have \<what the user will do in this section>.
100100

101101
<!-- Add links here as variables -->
102-
[workflow-diagram]: https://plantuml.com/activity-diagram-beta
102+
103103
[create-a-service]: /getting-started/:currentVersion:/services
104-
[secure-vpc-aws]: /use-timescale/:currentVersion:/vpc/
105-
[install-linux]: /self-hosted/:currentVersion:/install/installation-linux/
106104
[gdsg]: https://developers.google.com/style/highlights
105+
[install-linux]: /self-hosted/:currentVersion:/install/installation-linux/
106+
[secure-vpc-aws]: /use-timescale/:currentVersion:/vpc/
107+
[verb-what-the-user-will-do-if-the-procedure-is-cut-into-logical-sections-link]: /.github/:currentVersion:/styles/templates/procedure/#verb-what-the-user-will-do-if-the-procedure-is-cut-into-logical-sections
108+
[verb-what-the-user-will-do-link]: /.github/:currentVersion:/styles/templates/procedure/#verb-what-the-user-will-do
109+
[workflow-diagram]: https://plantuml.com/activity-diagram-beta

CONTRIBUTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Each major doc section has a dedicated directory with `.md` files inside, repres
4646
Beneath the front matter, describe the error and its solution in regular Markdown. You can also use any other components allowed within the docs site.
4747

4848
The entry shows up on the troubleshooting pages for its associated products and topics. If the page doesn't already exist, add an entry for it in the page
49-
index, setting `type` to `placeholder`. See [Navigation tree](#navigation-tree).
49+
index, setting `type` to `placeholder`. See [Edit the navigation hierarchy][navigation-tree-link].
5050

5151
## Edit the navigation hierarchy
5252

@@ -77,7 +77,7 @@ The navigation hierarchy of a doc section is governed by `page-index/page-index.
7777
},
7878
```
7979

80-
See [Use $CLOUD_LONG section navigation][use-navigation] for reference.
80+
See [Use Tiger Data products navigation][use-navigation] for reference.
8181

8282
To change the structure, add or delete pages in a section, modify the corresponding `page-index.js`. An entry in a `page-index.js` includes the following fields:
8383

@@ -153,12 +153,14 @@ To make a documentation page more visible and clear for Google:
153153

154154
The previous documentation source is in the deprecated repository called [docs.timescale.com-content][legacy-source].
155155

156-
[legacy-source]: https://github.com/timescale/docs.timescale.com-content
157156

157+
[formatting]: _partials/_formatting_examples.md
158158
[google-style]: https://developers.google.com/style
159+
[legacy-source]: https://github.com/timescale/docs.timescale.com-content
159160
[markdown-syntax]: https://www.markdownguide.org/extended-syntax/
160-
[github-docs]: https://github.com/timescale/docs
161+
[navigation-tree-link]: /CONTRIBUTING/:currentVersion:/#edit-the-navigation-hierarchy
162+
[readme]: README.md
161163
[use-navigation]: use-timescale/page-index/page-index.js
162-
[formatting]: _partials/_formatting_examples.md
163164
[variables]: https://www.tigerdata.com/docs/variables-for-contributors/
164-
[readme]: README.md
165+
166+

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ See the [Contributing guide](CONTRIBUTING.md) for style and language guidance.
4747

4848
## Learn about Tiger Data
4949

50-
Tiger Data is Postgres made powerful. To learn more about the company and its products, visit [tigerdata.com](https://www.tigerdata.com).
50+
Tiger Data is Postgres made powerful. To learn more about the company and its products, visit [tigerdata.com][tigerdata-home].
5151

5252
[docs-issues]: https://github.com/timescale/docs/issues
53-
[github-fork]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo
54-
[github-clone]: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
5553
[gatsby]: https://www.gatsbyjs.com/
54+
[github-clone]: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
55+
[github-fork]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo
56+
[tigerdata-home]: https://www.tigerdata.com

_code-samples/toolkit/two-step_aggregation.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ The inner aggregate call creates a machine-readable partial form that can be use
1818
While the one-step calling convention is easier for the simple case, it becomes much more difficult and hard to reason about for slightly more complex use-cases detailed in the next section. We wanted the calling convention to remain consistent and easy to reason about so you can take advantage of the same functions even as you start doing more complicated analyses. This also to keeps the docs consistent and prevents adding special cases everywhere.
1919

2020
## Why We Use Two-Step Aggregates <a id="two-step-philosophy"></a>
21-
Interestingly, almost all $PG aggregates do a version of this [under the hood already](https://www.postgresql.org/docs/current/xaggr.html), where they have an internal state used for aggregation and then a final function that displays the output to the user.
21+
Interestingly, almost all $PG aggregates do a version of this [under the hood already][under-the-hood-already], where they have an internal state used for aggregation and then a final function that displays the output to the user.
2222

2323
So why do we make this calling convention explicit?
2424

2525
1. It allows different accessor function calls to use the same internal state and not redo work.
2626
2. It cleanly distinguishes the parameters that affect the aggregate and those that only affect the accessor.
27-
3. It makes it explicit how and when aggregates can be re-aggregated or "stacked" on themselves with logically consistent results. This also helps them better integrate with [continuous aggregates](/use-timescale/latest/continuous-aggregates).
27+
3. It makes it explicit how and when aggregates can be re-aggregated or "stacked" on themselves with logically consistent results. This also helps them better integrate with [continuous aggregates][continuous-aggregates].
2828
4. It allows for better retrospective analysis of downsampled data in continuous aggregates.
2929

3030
That might have been gibberish to some, so let's unpack it a bit.
@@ -92,11 +92,11 @@ SELECT
9292
approx_percentile(0.5, uddsketch(100, 0.01, val)) as less_accurate_median -- modify the terms for the aggregate get a new approximation
9393
FROM foo;
9494
```
95-
Here we can see which parameters are for the `uddsketch` aggregate (the number of buckets and the target error), and which arguments are for`approx_percentile` (the approx_percentile we want to extract). The optimizer will correctly combine the calls for the first two `uddsketch` calls but not for the third. It is also more clear to the user what is going on, and that I can't set my target error at read time, but rather only at calculation time (this is especially helpful for understanding the behavior of [continuous aggregates][continuous-aggregates]).
95+
Here we can see which parameters are for the `uddsketch` aggregate (the number of buckets and the target error), and which arguments are for`approx_percentile` (the approx_percentile we want to extract). The optimizer will correctly combine the calls for the first two `uddsketch` calls but not for the third. It is also more clear to the user what is going on, and that I can't set my target error at read time, but rather only at calculation time (this is especially helpful for understanding the behavior of [continuous aggregates][caggs]).
9696

9797
Combining all of these into one function, so we can use the one-step approach, can get unwieldy and unclear very quickly (ie imagine something like `approx_percentile_uddsketch(0.5, 1000, 0.001)`).
9898
<br>
99-
### Stacked aggregates and [continuous aggregate][continuous-aggregates] integration <a id="philosophy-reagg"></a>
99+
### Stacked aggregates and [continuous aggregate][caggs] integration <a id="philosophy-reagg"></a>
100100
Aggregates can be divided into two classes: ones that are "stackable" in their final form and ones that are not.
101101
What I'm calling stackable aggregates are ones like `sum`, `min`, `max` etc. that can be re-aggregated on themselves at different groupings without losing their meaning, ie:
102102

@@ -125,7 +125,7 @@ Or to say it more succinctly: the `sum` of a `sum` is the `sum` but the `avg` of
125125

126126
This is not to say that the `avg` of an `avg` is not a useful piece of information, it can be in some cases, but it isn't always what you want and it can be difficult to actually get the true value for non-stackable aggregates, for instance, for `avg` we can take the `count` and `sum` and divide the `sum` by the `count`, but for many aggregates this is not so obvious and for something like `percentile_agg` __LINK__ with a one-step aggregate, the user would simply have to re-implement most of the algorithm in SQL in order to get the result they want.
127127

128-
Two-step aggregates expose the internal, re-aggregateable form to the user so they can much more easily do this work, so we've tried to provide two-step aggregates wherever we can. This is especially useful for working with [continuous aggregates][continuous-aggregates], so if I create a continuous aggregate like so:
128+
Two-step aggregates expose the internal, re-aggregateable form to the user so they can much more easily do this work, so we've tried to provide two-step aggregates wherever we can. This is especially useful for working with [continuous aggregates][caggs], so if I create a continuous aggregate like so:
129129

130130
```SQL , ignore
131131
CREATE MATERIALIZED VIEW foo_15
@@ -151,6 +151,8 @@ GROUP BY id, time_bucket('1 day'::interval, bucket)
151151
##### NB: There are some two-step aggregates like `tdigest` __ADD LINK? and expose and other bits...__ when we document that function where two-step aggregation can lead to more error or different results, because the algorithm is not deterministic in its re-aggregation, but we will note that clearly in the documentation when that happens, it is unusual.
152152

153153
### Retrospective analysis over downsampled data <a id="philosophy-retro"></a>
154-
[Continuous aggregates][continuous-aggregates] (or separate aggregation tables powered by a cron job or a [custom job]( __LINK__ ) ) aren't just used for speeding up queries, they're also used for [data retention]( __LINK__ ). But this can mean that they are very difficult to modify as your data ages. Unfortunately this is also when you are learning more things about the analysis you want to do on your data. By keeping them in their raw aggregate form, the user has the flexibility to apply different accessors to do retrospective analysis. With a one-step aggregate the user needs to determine, say, which percentiles are important when we create the continous aggregate, with a two-step aggregate the user can simply determine they're going to want an approximate percentile, and then determine when doing the analysis whether they want the median, the 90th, 95th or 1st percentile. No need to modify the aggregate or try to re-calculate from data that may no longer exist in the system.
154+
[Continuous aggregates][caggs] (or separate aggregation tables powered by a cron job or a custom job aren't just used for speeding up queries, they're also used for data retention. But this can mean that they are very difficult to modify as your data ages. Unfortunately this is also when you are learning more things about the analysis you want to do on your data. By keeping them in their raw aggregate form, the user has the flexibility to apply different accessors to do retrospective analysis. With a one-step aggregate the user needs to determine, say, which percentiles are important when we create the continuous aggregate, with a two-step aggregate the user can simply determine they're going to want an approximate percentile, and then determine when doing the analysis whether they want the median, the 90th, 95th or 1st percentile. No need to modify the aggregate or try to re-calculate from data that may no longer exist in the system.
155155

156-
[continuous-aggregates]: /use-timescale/:currentVersion:/continuous-aggregates/about-continuous-aggregates/
156+
[caggs]: /use-timescale/:currentVersion:/continuous-aggregates/about-continuous-aggregates/
157+
[continuous-aggregates]: /use-timescale/:currentVersion:/continuous-aggregates
158+
[under-the-hood-already]: https://www.postgresql.org/docs/current/xaggr.html

_partials/_2-step-aggregation.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ The two-step aggregation pattern has several advantages:
2121
To learn more, see the [blog post on two-step
2222
aggregates][blog-two-step-aggregates].
2323

24-
[blog-two-step-aggregates]: https://www.timescale.com/blog/how-postgresql-aggregation-works-and-how-it-inspired-our-hyperfunctions-design
24+
[blog-two-step-aggregates]: https://www.tigerdata.com/blog/how-postgresql-aggregation-works-and-how-it-inspired-our-hyperfunctions-design
2525
[caggs]: /use-timescale/:currentVersion:/continuous-aggregates/about-continuous-aggregates/
26-

_partials/_add-data-blockchain.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ dataset and copy the data to your database.
1313
file that contains Bitcoin transactions for the past five days. Download:
1414

1515
<Tag type="download">
16-
[bitcoin_sample.zip](https://assets.timescale.com/docs/downloads/bitcoin-blockchain/bitcoin_sample.zip)
16+
17+
[bitcoin_sample.zip][bitcoin_samplezip]
18+
1719
</Tag>
1820

1921
1. In a new terminal window, run this command to unzip the `.csv` files:
@@ -39,6 +41,7 @@ dataset and copy the data to your database.
3941
4042
</Procedure>
4143
42-
[satoshi-def]: https://www.pcmag.com/encyclopedia/term/satoshi
44+
[bitcoin_samplezip]: https://assets.timescale.com/docs/downloads/bitcoin-blockchain/bitcoin_sample.zip
4345
[coinbase-def]: https://www.pcmag.com/encyclopedia/term/coinbase-transaction
4446
[connect-using-psql]: /integrations/:currentVersion:/psql#connect-to-your-service
47+
[satoshi-def]: https://www.pcmag.com/encyclopedia/term/satoshi

0 commit comments

Comments
 (0)