Skip to content

Passwordless data mode #4049

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions _partials/_cloud-connect-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,33 @@

1. **Connect to your $SERVICE_SHORT**

Connect using SQL editor in $CONSOLE or with psql in the command line:
Connect using data mode or SQL editor in $CONSOLE, or psql in the command line:

<Tabs label="Connect to your Timescale Cloud service">

<Tab title="Data mode in Console">

<Procedure>

1. In $CONSOLE, toggle `Data`.

1. Select your $SERVICE_SHORT in the connection drop-down in the top right.

![Select a connection](https://assets.timescale.com/docs/images/data-mode-connection-dropdown.png)

1. Run a test query:

```sql
SELECT CURRENT_DATE;
```

This query gives you the current date, you have successfully connected to your $SERVICE_SHORT.

</Procedure>

And that is it, you are up and running. Enjoy developing with $COMPANY.

</Tab>

<Tab title="SQL editor in Console">

Expand Down Expand Up @@ -55,7 +79,7 @@
SELECT CURRENT_DATE;
```

This query returns the current date. You have successfully connected to your $SERVICE_SHORT.
This query returns the current date. You have successfully connected to your $SERVICE_SHORT.

</Procedure>

Expand All @@ -66,9 +90,6 @@
</Tabs>

</Procedure>


You can also use the powerful [data mode][popsql] to connect and run queries on your service.

Quick recap. You:
- Manage your $SERVICE_SHORTs in the [$OPS_MODE][portal-ops-mode] in $CONSOLE: add $READ_REPLICAs and enable
Expand Down
2 changes: 1 addition & 1 deletion _partials/_cloud-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use as is, or extend with the capabilities specific to your business needs:
- **AI and vector**: $PG with vector extensions. Use $PG as a vector database with
purpose built extensions for building AI applications from start to scale. Get fast and accurate similarity search
with the pgvector and pgvectorscale extensions. Create vector embeddings and perform LLM reasoning on your data with
the $PGAI_SHORT extension.
the pgai extension.
- **PostgreSQL**: the trusted industry-standard RDBMS. Ideal for applications requiring strong data
consistency, complex relationships, and advanced querying capabilities. Get ACID compliance, extensive SQL support,
JSON handling, and extensibility through custom functions, data types, and extensions. $CLOUD_LONG continuously
Expand Down
103 changes: 51 additions & 52 deletions getting-started/run-queries-from-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import WhereNext from "versionContent/_partials/_where-to-next.mdx";

# Run your queries from $CONSOLE

As $CLOUD_LONG is based on PostgreSQL, you can use lots of [different tools][integrations] to
As $CLOUD_LONG is based on $PG, you can use lots of [different tools][integrations] to
connect to your $SERVICE_SHORT and interact with your data.

In $CONSOLE you can use the following ways to run SQL queries against your $SERVICE_SHORT:
Expand All @@ -20,8 +20,7 @@ In $CONSOLE you can use the following ways to run SQL queries against your $SERV
- [$SQL_ASSISTANT_SHORT in the $DATA_MODE][sql-assistant]: write, fix, and organize SQL faster and more accurately.

- [$SQL_EDITOR in the $OPS_MODE][run-sqleditor]: a simple $SQL_EDITOR in the $OPS_MODE that lets you run ad-hoc ephemeral
queries. This is useful for quick one-off tasks like creating an index on a small table or
inspecting `pg_stat_statements`.
queries. This is useful for quick one-off tasks like creating an index on a small table or inspecting `pg_stat_statements`.

If you prefer the command line to the $OPS_MODE $SQL_EDITOR in $CONSOLE, use [psql][install-psql].

Expand All @@ -35,17 +34,15 @@ Available features are:

- **Real-time collaboration**: work with your team directly in the $DATA_MODE query editor with live presence and multiple
cursors.
- **[Schema browser](https://docs.popsql.com/docs/schema)**: understand the structure of your $SERVICE_SHORT and see usage data on tables and columns.
- **[Schema browser][schema-browser]**: understand the structure of your $SERVICE_SHORT and see usage data on tables and columns.
- **[$SQL_ASSISTANT_SHORT][sql-assistant]**: write, fix, and organize SQL faster and more accurately using AI.
- **Autocomplete**: get suggestions as you type your queries.
- **[Version history](https://docs.popsql.com/docs/version-history)**: access previous versions of a query from the built-in revision history, or connect to a
git repo.
- **[Charts](https://docs.popsql.com/docs/creating-charts)**: visualize data from inside the UI rather than switch to Sheets or Excel.
- **[Schedules](https://docs.popsql.com/docs/scheduled-queries)**: automatically refresh queries and dashboards to create push alerts.
- **[Query variables](https://docs.popsql.com/docs/query-variables)**: use Liquid to parameterize your queries or use `if` statements.
- **Cross-platform**: works from [$CONSOLE][portal-data-mode] or download the
[desktop](https://popsql.com/download) app for macOS, Windows, and Linux.
- **Easy connection**: to $CLOUD_LONG, $PG, Redshift, Snowflake, BigQuery, MySQL, SQL Server, [and more](https://popsql.com/connections).
- **[Version history][version-history]**: access previous versions of a query from the built-in revision history, or connect to a git repo.
- **[Charts][charts]**: visualize data from inside the UI rather than switch to Sheets or Excel.
- **[Schedules][schedules]**: automatically refresh queries and dashboards to create push alerts.
- **[Query variables][query-variables]**: use Liquid to parameterize your queries or use `if` statements.
- **Cross-platform support**: work from [$CONSOLE][portal-data-mode] or download the [desktop app][popsql-desktop] for macOS, Windows, and Linux.
- **Easy connection**: connect to $CLOUD_LONG, $PG, Redshift, Snowflake, BigQuery, MySQL, SQL Server, [and more][popsql-connections].

### Connect to your $SERVICE_LONG in the $DATA_MODE

Expand All @@ -55,24 +52,21 @@ To connect to a $SERVICE_SHORT:

1. **Check your $SERVICE_SHORT is running correctly**

In [$CONSOLE][services-portal], check that your $SERVICE_SHORT is marked as `Running`.
In [$CONSOLE][services-portal], check that your $SERVICE_SHORT is marked as `Running`:

![Check $SERVICE_LONG is running](https://assets.timescale.com/docs/images/console-services-view.png)
![Check $SERVICE_LONG is running](https://assets.timescale.com/docs/images/timescale-console-services-view.png)

1. **Connect to your $SERVICE_SHORT**

1. In the [$DATA_MODE][portal-data-mode] in $CONSOLE, select a $SERVICE_SHORT in the connection drop-down.
1. Click the pencil icon next to the $SERVICE_SHORT name.
In the [$DATA_MODE][portal-data-mode] in $CONSOLE, select a $SERVICE_SHORT in the connection drop-down:

![Select a connection](https://assets.timescale.com/docs/images/data-mode-connections.png)

1. Click `Edit` next to `Username/Password` and enter [your connection details][connection-info] for this $SERVICE_SHORT, then click `Connect`.
![Select a connection](https://assets.timescale.com/docs/images/data-mode-connection-dropdown.png)

1. **Run a test query**

Type `SELECT CURRENT_DATE;` in `Scratchpad` and press `Run`:
Type `SELECT CURRENT_DATE;` in `Scratchpad` and click `Run`:

![Run a simple query](https://assets.timescale.com/docs/images/data-mode-scratchpad.png)
![Run a simple query](https://assets.timescale.com/docs/images/run-query-in-scratchpad.png)

Quick recap. You:
- Manage your $SERVICE_SHORTs in the [$OPS_MODE in $CONSOLE][portal-ops-mode]
Expand All @@ -83,23 +77,19 @@ Quick recap. You:

Now you have used the $DATA_MODE in $CONSOLE, see how to easily do the following:

- [Write a query](https://docs.popsql.com/docs/writing-a-query)
- [Share a query with your
teammates](https://docs.popsql.com/docs/sharing-a-link-to-your-query-and-results)
- [Create a chart from your
data](https://docs.popsql.com/docs/creating-charts)
- [Create a dashboard of multiple query
results](https://docs.popsql.com/docs/creating-dashboards)
- [Create schedules for your
queries](https://docs.popsql.com/docs/scheduled-queries)
- [Write a query][write-query]
- [Share a query with your teammates][share-query]
- [Create a chart from your data][create-chart]
- [Create a dashboard of multiple query results][create-dashboard]
- [Create schedules for your queries][create-schedule]

### $DATA_MODE_CAP FAQ

#### What if my $SERVICE_SHORT is within a $VPC?

If your $SERVICE_LONG runs inside a $VPC, do one of the following to enable access for the $POPSQL desktop app:

- Use $POPSQL's [bridge connector](https://docs.popsql.com/docs/bridge-connector).
- Use $POPSQL's [bridge connector][bridge-connector].
- Use an SSH tunnel: when you configure the connection in $POPSQL, under `Advanced Options` enable `Connect over SSH`.
- Add $POPSQL's static IPs (`23.20.131.72, 54.211.234.135`) to your allowlist.

Expand All @@ -119,7 +109,7 @@ If you have a small number of users running performant SQL queries against a
$SERVICE_SHORT with sufficient resources, then there should be no degradation to
performance. However, if you have a large number of users running queries, or if
the queries are computationally expensive, best practice is to create
a [$READ_REPLICA][readreplica] and send analytical queries there.
a [$READ_REPLICA][read-replica] and send analytical queries there.

If you'd like to prevent write operations such as insert or update, instead
of using the `tsdbadmin` user, create a read-only user for your $SERVICE_SHORT and
Expand Down Expand Up @@ -190,7 +180,6 @@ For best results with $SQL_ASSISTANT_SHORT:
* **Business logic**: $SQL_ASSISTANT_SHORT does not inherently know specific business terms
such as active user. Define these terms clearly to improve results.


### Security, privacy, and data usage

Security and privacy is prioritized in $CONSOLE. In [$DATA_MODE][portal-data-mode], project members
Expand All @@ -208,7 +197,6 @@ $SQL_ASSISTANT_SHORT settings are:
* **Sample data**: to give the LLM more context so you have better SQL suggestions, enable sample data sharing in the $SQL_ASSISTANT_SHORT preferences.
* **Telemetry**: to improve $SQL_ASSISTANT_SHORT, $COMPANY collects telemetry and usage data, including prompts, responses, and query metadata.


## $OPS_MODE_CAP $SQL_EDITOR

$SQL_EDITOR is an integrated secure UI that you use to run queries and see the results
Expand All @@ -233,38 +221,49 @@ To use $SQL_EDITOR:

1. **Run a test query**

Type your query in the UI, then click `Run`. The results appear in the lower window.
Type `SELECT CURRENT_DATE;` in the UI and click `Run`. The results appear in the lower window:

</Procedure>
![Run a simple query](https://assets.timescale.com/docs/images/run-query-in-sql-editor.png)

</Procedure>

## Cloud $SQL_EDITOR licenses

* **$SQL_EDITOR in the $OPS_MODE**: free for anyone with a [$CLOUD_LONG account][create-cloud-account].
* **Data mode**: the number of seats you are allocated depends on your [$PRICING_PLAN][pricing-plan-features].
[$SQL_ASSISTANT_SHORT][sql-assistant] is currently free for all users. In the future, limits or paid options may be
introduced as we work to build the best experience.
* **$POPSQL standalone**: there is a free plan available to everyone, as well as paid plans. See [$POPSQL Pricing][popsql-pricing] for full
details.

* **$POPSQL standalone**: there is a free plan available to everyone, as well as paid plans. See [$POPSQL Pricing][popsql-pricing] for full details.

<WhereNext />

[readreplica]: /use-timescale/:currentVersion:/ha-replicas/read-scaling/
[run-popsql]: /getting-started/:currentVersion:/run-queries-from-console/#data-mode
[run-sqleditor]: /getting-started/:currentVersion:/run-queries-from-console/#sql-editor
[bridge-connector]: https://docs.popsql.com/docs/bridge-connector
[charts]: https://docs.popsql.com/docs/creating-charts
[connection-info]: /integrations/:currentVersion:/find-connection-details/
[console]: https://console.cloud.timescale.com
[create-chart]: https://docs.popsql.com/docs/creating-charts
[create-cloud-account]: /getting-started/:currentVersion:/services/#create-a-timescale-cloud-account
[create-dashboard]: https://docs.popsql.com/docs/creating-dashboards
[create-schedule]: https://docs.popsql.com/docs/scheduled-queries
[install-psql]: /integrations/:currentVersion:/psql/
[integrations]: /integrations/:currentVersion:/
[timescale-console]: https://console.cloud.timescale.com/
[popsql-connections]: https://popsql.com/connections
[popsql-desktop]: https://popsql.com/download
[popsql-pricing]: https://popsql.com/pricing
[portal-data-mode]: https://console.cloud.timescale.com/dashboard/services?popsql
[portal-ops-mode]: https://console.cloud.timescale.com/dashboard/services
[pricing-plan-features]: https://www.timescale.com/pricing#features
[install-psql]: /integrations/:currentVersion:/psql/
[create-cloud-account]: /getting-started/:currentVersion:/services/#create-a-timescale-cloud-account
[portal-data-mode]: https://console.cloud.timescale.com/dashboard/services?popsql
[services-portal]: https://console.cloud.timescale.com/dashboard/services
[project-members]: /use-timescale/:currentVersion:/members/
[console]: https://console.cloud.timescale.com
[sql-editor-settings]: https://console.cloud.timescale.com/dashboard/settings?popsql=%2Fpreferences%2Fai
[portal-data-mode]: https://console.cloud.timescale.com/dashboard/services?popsql
[query-variables]: https://docs.popsql.com/docs/query-variables
[read-replica]: /use-timescale/:currentVersion:/ha-replicas/read-scaling/
[run-popsql]: /getting-started/:currentVersion:/run-queries-from-console/#data-mode
[run-sqleditor]: /getting-started/:currentVersion:/run-queries-from-console/#ops-mode-sql-editor
[schedules]: https://docs.popsql.com/docs/scheduled-queries
[schema-browser]: https://docs.popsql.com/docs/schema
[services-portal]: https://console.cloud.timescale.com/dashboard/services
[share-query]: https://docs.popsql.com/docs/sharing-a-link-to-your-query-and-results
[sql-assistant]: /getting-started/:currentVersion:/run-queries-from-console/#sql-assistant
[connection-info]: /integrations/:currentVersion:/find-connection-details/
[popsql-pricing]: https://popsql.com/pricing
[sql-editor-settings]: https://console.cloud.timescale.com/dashboard/settings?popsql=%2Fpreferences%2Fai
[timescale-console]: https://console.cloud.timescale.com/
[version-history]: https://docs.popsql.com/docs/version-history
[write-query]: https://docs.popsql.com/docs/writing-a-query
26 changes: 14 additions & 12 deletions getting-started/try-key-features-timescale-products.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ is made up of child tables called $CHUNKs. Each $CHUNK is assigned a range of ti
contains data from that range. When you run a query, $CLOUD_LONG identifies the correct $CHUNK and runs the query on it, instead of going through the entire table. You can also tune $HYPERTABLEs to increase performance
even more.

![Main features and tiered data](https://assets.timescale.com/docs/images/hypertable-structure.png )
![Main features and tiered data](https://assets.timescale.com/docs/images/hypertable-structure.png)

$HYPERTABLE_CAPs exist alongside regular $PG tables.
You use regular $PG tables for relational data, and interact with $HYPERTABLEs
Expand Down Expand Up @@ -106,7 +106,7 @@ relational and time-series data from external files.
SELECT create_hypertable('crypto_ticks', by_range('time'));
```
To more fully understand how $HYPERTABLEs work, and how to optimize them for performance by
tuning $CHUNK intervals and enabling $CHUNK_SKIPPING, see [the $HYPERTABLEs documentation][hypertables-section].
tuning $CHUNK intervals and enabling chunk skipping, see [the $HYPERTABLEs documentation][hypertables-section].

- For the relational data:

Expand All @@ -133,7 +133,7 @@ relational and time-series data from external files.
</Tabs>

To more fully understand how $HYPERTABLEs work, and how to optimize them for performance by
tuning $CHUNK intervals and enabling $CHUNK_SKIPPING, see [the $HYPERTABLEs documentation][hypertables-section].
tuning $CHUNK intervals and enabling chunk skipping, see [the $HYPERTABLEs documentation][hypertables-section].

1. **Have a quick look at your data**

Expand Down Expand Up @@ -172,18 +172,20 @@ $CONSOLE. You can also do this using psql.

<Tabs label="Upload data to ">

<Tab title="SQL Editor">
<Tab title="Data mode">

<Procedure>

1. **In [$CONSOLE][portal-ops-mode], select the $SERVICE_SHORT you uploaded data to, then click `SQL Editor`**
1. **Connect to your $SERVICE_SHORT**

In [$CONSOLE][portal-data-mode], select your $SERVICE_SHORT in the connection drop-down in the top right.

1. **Create a $CAGG**

For a $CAGG, data grouped using a $TIME_BUCKET is stored in a
$PG `MATERIALIZED VIEW` in a $HYPERTABLE. `timescaledb.continuous` ensures that this data
is always up to date.
In your SQL editor, use the following code to create a $CAGG on the real-time data in
In data mode, use the following code to create a $CAGG on the real-time data in
the `crypto_ticks` table:

```sql
Expand Down Expand Up @@ -228,10 +230,10 @@ $CONSOLE. You can also do this using psql.

<Procedure>

1. **In [$CONSOLE][portal-ops-mode], select the $SERVICE_SHORT you uploaded data to**.
1. **Click `Operations` > `Continuous aggregates`, select `crypto_ticks`, then click `Create a Continuous Aggregate`**.
1. **In [$CONSOLE][portal-ops-mode], select the $SERVICE_SHORT you uploaded data to**
1. **Click `Operations` > `Continuous aggregates`, select `crypto_ticks`, then click `Create a Continuous Aggregate`**
![$CAGG wizard](https://assets.timescale.com/docs/images/continuous-aggregate-wizard.png )
1. **Create a view called `assets_candlestick_daily` on the `time` column with an interval of `1 day`, then click `Next step`**.
1. **Create a view called `assets_candlestick_daily` on the `time` column with an interval of `1 day`, then click `Next step`**
1. **Update the view SQL with the following functions, then click `Run`**
```sql
CREATE MATERIALIZED VIEW assets_candlestick_daily
Expand Down Expand Up @@ -357,7 +359,7 @@ To set up data tiering:

1. **Set the time interval when data is tiered**

In $CONSOLE, click `SQL Editor`, then enable data tiering on a $HYPERTABLE with the following query:
In $CONSOLE, click `Data` to switch to the data mode, then enable data tiering on a $HYPERTABLE with the following query:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In $CONSOLE, click `Data` to switch to the data mode, then enable data tiering on a $HYPERTABLE with the following query:
In $CONSOLE, click `Data` to switch to data mode, then enable data tiering on a $HYPERTABLE with the following query:

```sql
SELECT add_tiering_policy('assets_candlestick_daily', INTERVAL '3 weeks');
```
Expand Down Expand Up @@ -386,9 +388,9 @@ To set up data tiering:
## Reduce the risk of downtime and data loss

By default, all $SERVICE_LONGs have rapid recovery enabled. However, if your app has very low tolerance
for downtime, $CLOUD_LONG offers $HA_REPLICAs. $HA_REPLICA_SHORTs are exact, up-to-date copies
for downtime, $CLOUD_LONG offers $HA_REPLICAs. HA replicas are exact, up-to-date copies
of your database hosted in multiple AWS availability zones (AZ) within the same region as your primary node.
$HA_REPLICA_SHORTa automatically take over operations if the original primary data node becomes unavailable.
HA replicas automatically take over operations if the original primary data node becomes unavailable.
The primary node streams its write-ahead log (WAL) to the replicas to minimize the chances of
data loss during failover.

Expand Down