Skip to content

Commit ff0a378

Browse files
feat: add docs for SQL editor. (timescale#3354)
* feat: add docs for SQL editor. Co-authored-by: Rahil Sondhi <[email protected]>
1 parent 06bc71e commit ff0a378

File tree

12 files changed

+158
-69
lines changed

12 files changed

+158
-69
lines changed

.data/redirects.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ const redirector = new ThreeOhOneRedirector({
389389
]
390390
]
391391
})
392+
.add(
393+
"/use-timescale/latest/popsql",
394+
"https://docs.timescale.com/getting-started/latest/run-queries-from-console/"
395+
)
392396
.add(
393397
"/ai/latest/pgvectorize",
394398
"https://docs.timescale.com/ai/latest/pgvectorizer"
@@ -606,7 +610,7 @@ const redirector = new ThreeOhOneRedirector({
606610
)
607611
.add(
608612
"/cloud/latest/create-a-service",
609-
"https://https://docs.timescale.com/getting-started/latest/services/"
613+
"https://docs.timescale.com/getting-started/latest/services/"
610614
)
611615
.add(
612616
"/cloud/latest/customize-configuration",
@@ -675,7 +679,7 @@ const redirector = new ThreeOhOneRedirector({
675679
)
676680
.add(
677681
"/use-timescale/latest/services/create-a-service",
678-
"https://https://docs.timescale.com/getting-started/latest/services/"
682+
"https://docs.timescale.com/getting-started/latest/services/"
679683
)
680684
.add(
681685
"/cloud/latest/service-explorer",
@@ -767,7 +771,7 @@ const redirector = new ThreeOhOneRedirector({
767771
.add("/faq", "https://docs.timescale.com/timescaledb/latest/overview/faq/")
768772
.add(
769773
"/forge/getting-started-forge/",
770-
"https://https://docs.timescale.com/getting-started/latest/services/"
774+
"https://docs.timescale.com/getting-started/latest/services/"
771775
)
772776
.add("/forge", "https://docs.timescale.com/cloud/latest/")
773777
.add("/getting-started", "https://docs.timescale.com/getting-started/latest/")
@@ -789,7 +793,7 @@ const redirector = new ThreeOhOneRedirector({
789793
)
790794
.add(
791795
"/getting-started/exploring-forge",
792-
"https://https://docs.timescale.com/getting-started/latest/services/"
796+
"https://docs.timescale.com/getting-started/latest/services/"
793797
)
794798
.add(
795799
"/getting-started/exploring-forge/forge-configuration",
@@ -1027,7 +1031,7 @@ const redirector = new ThreeOhOneRedirector({
10271031
)
10281032
.add(
10291033
"/latest/getting-started/exploring-forge",
1030-
"https://https://docs.timescale.com/getting-started/latest/services/"
1034+
"https://docs.timescale.com/getting-started/latest/services/"
10311035
)
10321036
.add(
10331037
"/latest/getting-started/exploring-forge/forge-multi-node",

_partials/_cloud-connect.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
1-
<Procedure>
1+
## Check your service and connect to it
22

3-
### Check your service and connect to it
3+
<Procedure>
44

55
To ensure a Timescale service is running correctly:
66

7-
1. In the [Services section in Timescale Console][services-portal], check that your service is marked as `Running`.
7+
1. **Check your service**
8+
9+
In [Timescale Console][services-portal], select a service and check that it is marked as `Running`.
10+
11+
![Check service is running](https://assets.timescale.com/docs/images/cloud-sql-editors.png)
12+
13+
1. **Connect to your service**
814

9-
1. Use PopSQL or psql to connect to your service:
10-
- [Setup PopSQL][popsql]: Follow the instructions to easily connect to your service in the UI.
11-
- [psql][install-psql]: Connect to your service with the value of `Service URL` from the config file you
12-
just saved.
15+
Use either:
16+
- A Cloud SQL editor from Timescale Console:
17+
- [SQL editor][run-sqleditor]: in Timescale Console, click `SQL editor`. You can now run queries for this service.
18+
- [PopSQL][popsql]: in Timescale Console, click `PopSQL`, then follow the instructions to easily connect to
19+
this service with PopSQL.
20+
- The command line:
21+
- [psql][install-psql]: connect to your service with the value of `Service URL` from the config file you
22+
just saved:
1323

14-
<CodeBlock canCopy={true} showLineNumbers={false} children={`
15-
psql "postgres://tsdbadmin:<PASSWORD>@<HOST>:<PORT>/tsdb?sslmode=require"
16-
`} />
24+
<CodeBlock canCopy={true} showLineNumbers={false} children={`
25+
psql "postgres://tsdbadmin:<PASSWORD>@<HOST>:<PORT>/tsdb?sslmode=require"
26+
`} />
1727

18-
You are connected to your service and are now able to issue commands.
28+
You are connected to your service and can issue commands.
1929

20-
1. Create a PostgreSQL table, copy the following into [PopSQL][popsql] or psql, then run your query:
30+
1. **Create a PostgreSQL table**
31+
32+
Copy the following into your SQL editor, then run your query:
2133

2234
```sql
2335
CREATE TABLE stocks_real_time (
@@ -28,9 +40,16 @@ To ensure a Timescale service is running correctly:
2840
);
2941
```
3042

31-
1. Check that the table exists.
32-
- In PopSQL, you see the table in the UI.
33-
- In psql, run the `\dt` command, You see the table listing in your service. To disconnect, type `exit`.
43+
1. **Check that the table exists**
44+
45+
- **SQL editor**: run the following query:
46+
```sql
47+
SELECT * FROM information_schema.tables where table_name = 'stocks_real_time';
48+
```
49+
You see the table listed in the UI.
50+
51+
- **PopSQL**: the table is automatically displayed when you run the `CREATE` query.
52+
- **psql**: run the `\dt` command. You see the table listing for your service. To disconnect, type `exit`.
3453

3554

3655
Quick recap, you find configuration information about your
@@ -43,4 +62,6 @@ config file.
4362
[account-portal]: https://console.cloud.timescale.com/dashboard/account
4463
[services-portal]: https://console.cloud.timescale.com/dashboard/services
4564
[install-psql]: /use-timescale/:currentVersion:/integrations/query-admin/psql/
46-
[popsql]: /use-timescale/:currentVersion:/popsql/
65+
[popsql]: /getting-started/:currentVersion:/run-queries-from-console/#popsql
66+
[run-sqleditor]: /getting-started/:currentVersion:/run-queries-from-console/#sql-editor
67+
[install-psql]: /use-timescale/:currentVersion:/integrations/query-admin/psql/

_partials/_cloud-installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<Procedure>
1+
## Create a Timescale account
22

3-
### Create a Timescale account
3+
<Procedure>
44

55
To set up Timescale:
66

_partials/_cloud-intro.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
Timescale is a cloud-based PostgreSQL platform for resource-intensive workloads. We help you build faster, scale further, and stay under budget. Timescale offers the following PostgreSQL database optimizations:
1+
Timescale Cloud is a cloud-based PostgreSQL platform for resource-intensive workloads. We help you build faster,
2+
scale further, and stay under budget. Timescale Cloud offers the following PostgreSQL optimized database services:
23

3-
- [**Time-series data**](https://www.timescale.com/blog/what-is-a-time-series-database/#what-is-a-time-series-database): a
4-
TimescaleDB instance optimized for your time-series and analytics workloads. Get automated dynamic data partitioning, hybrid row-columnar storage, advanced compression techniques, incremental up-to-date materializations, and specialized analysis functions as well as cloud-only features like transparent tiering and low-cost object storage.
5-
6-
- **All other workloads**: a [Dynamic PostgreSQL](https://www.timescale.com/dynamic-postgresql) instance where you select a compute range, only paying for the base and the amount of extra CPU as you scale.
4+
- **[Time-series and Analytics][create-service]**: a Timescale DB instance optimized for your
5+
[time-series and analytics][what-is-time-series] workloads. Get automated dynamic data partitioning, hybrid
6+
row-columnar storage, advanced compression techniques, incremental up-to-date materializations, and specialized
7+
analysis functions as well as cloud-only features like transparent tiering and low-cost object storage.
8+
- **[Dynamic PostgreSQL][create-service]**: for all other workloads. A PostgreSQL instance with a
9+
[dynamic compute range][what-is-dynamic-postgres] aligned to your business needs. You select a compute range, only
10+
paying for the base and the amount of extra CPU as you scale.
711

812
All databases are extended with lightning fast vector search, and include all the cloud tooling you'd expect for production use,
913
with automatic backups, high availability, read replicas, data forking, connection pooling, usage-based storage, and much more.
14+
15+
[what-is-time-series]: https://www.timescale.com/blog/what-is-a-time-series-database/#what-is-a-time-series-database
16+
[what-is-dynamic-postgres]: https://www.timescale.com/dynamic-postgresql
17+
[create-service]: /getting-started/:currentVersion:/services/

getting-started/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ layout_components: [next_prev_large]
66
content_group: Getting started
77
---
88

9-
import Install from "versionContent/_partials/_cloud-installation.mdx";
10-
import CreateService from "versionContent/_partials/_cloud-create-service.mdx";
11-
import Connect from "versionContent/_partials/_cloud-connect.mdx";
129
import CloudIntro from "versionContent/_partials/_cloud-intro.mdx";
1310
import TimescaleIntro from "versionContent/_partials/_timescale-intro.mdx";
1411
import WhereNext from "versionContent/_partials/_where-to-next.mdx";
@@ -22,6 +19,7 @@ Each database instance in Timescale is called a service.
2219
This section shows you how to:
2320

2421
1. [Create and connect to a Timescale service][services-create]
22+
1. [Run queries from Timescale Console][run-queries-from-console]
2523
1. [Ingest some real financial data into your database][ingest-data]
2624
1. [Construct some interesting queries][queries] <FeaturedCTA href="/getting-started/latest/queries/#try-it-out-code-block-1" data-tracking="cta-try-out-queries">Try out some <b>live queries</b></FeaturedCTA>
2725
1. [Create and query a continuous aggregates][caggs]
@@ -34,6 +32,7 @@ Already know the basics? See the
3432
[use-timescale]: /use-timescale/:currentVersion:/
3533
[services-create]: /getting-started/:currentVersion:/services#create-your-timescale-account
3634
[services-connect]: /getting-started/:currentVersion:/services/#connect-to-your-service
35+
[run-queries-from-console]: /getting-started/:currentVersion:/run-queries-from-console/
3736
[ingest-data]: /getting-started/:currentVersion:/time-series-data/
3837
[queries]: /getting-started/:currentVersion:/queries/
3938
[caggs]: /getting-started/:currentVersion:/aggregation/

getting-started/page-index/page-index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ module.exports = [
99
href: "services",
1010
excerpt: "Create a Timescale service and connect to it",
1111
},
12+
{
13+
title: "Run your queries from Timescale Console",
14+
href: "run-queries-from-console",
15+
excerpt: "Run your queries securely from inside Timescale Console",
16+
},
1217
{
1318
title: "Tables and hypertables",
1419
href: "tables-hypertables",

use-timescale/popsql.md renamed to getting-started/run-queries-from-console.md

Lines changed: 63 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,51 @@
11
---
2-
title: PopSQL
3-
excerpt: Use PopSQL to run SQL queries, create charts and dashboards, and collaborate with teammates.
2+
title: Run your queries from Timescale Console
3+
excerpt: Use PopSQL or SQL editor to run SQL queries, create charts and dashboards, and collaborate with teammates.
44
keywords: [popsql, sql editor, chart, dashboard]
55
---
66

7-
# PopSQL
7+
# Run your queries from Timescale Console
88

9-
You use Timescale's [PopSQL](https://popsql.com) editor to write queries, visualize data, and share your results.
9+
As Timescale Cloud is based on PostgreSQL, you can use lots of [different tools][integrations] to
10+
connect to your service and interact with your data. To securely manage your date from inside
11+
Console, Timescale offers the following Cloud SQL editors:
12+
13+
- [SQL editor][run-sqleditor]: a simple UI to run queries for each individual service.
14+
- [PopSQL][run-popsql]: a comprehensive UI that you use to write queries, visualize data,
15+
and share your results.
16+
17+
If you prefer the command line to a Cloud SQL editor, use [psql][install-psql].
18+
19+
## SQL editor
20+
21+
SQL editor is an integrated secure UI that you use to run queries and see the results
22+
for an Timescale Cloud service.
23+
24+
![Screenshot of SQL editor](https://assets.timescale.com/docs/images/sqleditor.png)
25+
26+
To enable or disable SQL editor in your service, click `Operations` > `Service management`, then
27+
update the setting for SQL editor.
28+
29+
### Run queries from Console with SQL editor
30+
31+
<Procedure>
32+
33+
To use SQL editor with Timescale:
34+
35+
1. **Open SQL editor from Timescale Console**
36+
37+
1. In [Timescale Console][timescale-console-services], select a service.
38+
1. Click `SQL editor`. You can now run queries for this service.
39+
40+
4. **Run a test query**
41+
42+
Type your query in the UI, then click `Run`. The results appear in the lower window.
43+
44+
</Procedure>
45+
46+
## PopSQL
47+
48+
You use [PopSQL](https://popsql.com) to write queries, visualize data, and share your results.
1049

1150
![Screenshot of PopSQL](https://assets.timescale.com/docs/images/popsql_product_screenshot.png)
1251

@@ -30,15 +69,14 @@ Available features are:
3069
- **[Query variables](https://docs.popsql.com/docs/query-variables)**: Use Liquid to
3170
parameterize your queries or use `if` statements.
3271

72+
### Connect to your Timescale Cloud service with PopSQL
3373
<Procedure>
3474

35-
## Get started
36-
3775
To use PopSQL with Timescale:
3876

3977
1. **Open PopSQL from Timescale Console**
4078

41-
Log in to [Timescale Console](https://console.cloud.timescale.com/), then click `PopSQL`.
79+
Log in to [Timescale Console][timescale-console], then click `PopSQL`.
4280

4381
![PopSQL button within Timescale
4482
Console](https://assets.timescale.com/docs/images/popsql_button_in_console.png)
@@ -85,9 +123,9 @@ Now you have set up PopSQL, see how to easily do the following:
85123

86124

87125

88-
## FAQ
126+
### PopSQL FAQ
89127

90-
### How do I access PopSQL?
128+
#### How do I access PopSQL?
91129

92130
Either:
93131

@@ -104,7 +142,7 @@ Either:
104142
This resyncs your Timescale project with your PopSQL organization. Any new services are added automatically.
105143

106144

107-
### What if my service is within a VPC?
145+
#### What if my service is within a VPC?
108146

109147
If your Timescale Service runs inside a VPC, do one of the following to enable access for PopSQL:
110148

@@ -113,14 +151,14 @@ If your Timescale Service runs inside a VPC, do one of the following to enable a
113151
- When you configure the connection in PopSQL, under `Advanced Options`, enable `Connect over SSH`
114152
- Add PopSQL's static IPs (`23.20.131.72, 54.211.234.135`) to your allowlist
115153

116-
### What happens if another member of my Timescale project opens PopSQL?
154+
#### What happens if another member of my Timescale project opens PopSQL?
117155

118156
A PopSQL user account is created for the Timescale project member. This
119157
user is automatically added to your PopSQL organization. Unless you
120158
[share the connection within PopSQL](https://docs.popsql.com/docs/shared-connections), this
121159
new user must input their own credentials for each service/connection.
122160

123-
### Will using PopSQL affect the performance of my Timescale service?
161+
#### Will using PopSQL affect the performance of my Timescale Cloud service?
124162

125163
There are a few factors to consider:
126164

@@ -138,11 +176,20 @@ If you'd like to prevent write operations such as insert or update. Instead
138176
of using the `tsdbadmin` superuser, create a read-only user for your service and
139177
use that within PopSQL.
140178

141-
### How does pricing work?
179+
## Cloud SQL editor seats
142180

143-
Timescale customers get PopSQL Business for free for up to 10 users. To add more than 10 seats to your account, [Contact us](https://www.timescale.com/contact) for further assistance.
181+
* **Timescale Cloud**: the number of Cloud SQL editor seats you are allocated depends on your
182+
[Pricing Plan][pricing-plan-features].
183+
* **PopSQL**: there is a free plan available to everyone, as well as paid plans. See [PopSQL Pricing](https://popsql.com/pricing) for full
184+
details.
144185

145-
PopSQL has a free plan available to everyone, as well as paid plans. See [PopSQL Pricing](https://popsql.com/pricing) for full details.
146186

147187

148-
[readreplica]: /use-timescale/:currentVersion:/ha-replicas/read-scaling/
188+
[readreplica]: /use-timescale/:currentVersion:/ha-replicas/read-scaling/
189+
[run-popsql]: /getting-started/:currentVersion:/run-queries-from-console/#popsql
190+
[run-sqleditor]: /getting-started/:currentVersion:/run-queries-from-console/#sql-editor
191+
[integrations]: /use-timescale/:currentVersion:/integrations/query-admin/
192+
[timescale-console]: https://console.cloud.timescale.com/
193+
[timescale-console-services]: https://console.cloud.timescale.com/dashboard/services
194+
[pricing-plan-features]: https://www.timescale.com/pricing#features
195+
[install-psql]: /use-timescale/:currentVersion:/integrations/query-admin/psql/

0 commit comments

Comments
 (0)