-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-serve-results
Signed-off-by: hengm3467 <[email protected]>
- Loading branch information
Showing
12 changed files
with
707 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,18 +16,12 @@ For RisingWave Cloud users, all Premium Edition features are available out of th | |
|
||
## Premium features | ||
|
||
The premium features are carefully selected based on the following criteria: | ||
|
||
- Seamless integration with proprietary or licensed open-source systems. | ||
- Advanced features that enhance development velocity and lower production deployment overhead. | ||
- Performance improvements for non-standard deployment environments. | ||
- Tailored features specifically requested by our paying customers. | ||
|
||
The following are Premium Edition features, which include a "Premium Edition Feature" note in the documentation. | ||
|
||
### SQL and security | ||
|
||
<CardGroup> <Card title="Time travel queries" icon="clock-rotate-left" href="/processing/time-travel-queries" horizontal /> <Card title="Secret management" icon="key" href="/operate/manage-secrets" horizontal /> </CardGroup> | ||
* [Time travel queries](/processing/time-travel-queries) | ||
* [Secret management](/operate/manage-secrets) | ||
|
||
### Schema management | ||
|
||
|
@@ -37,10 +31,25 @@ The following are Premium Edition features, which include a "Premium Edition Fea | |
|
||
### Connectors | ||
|
||
<CardGroup> <Card title="Sink to Snowflake" icon="snowflake" href="/integrations/destinations/snowflake" horizontal /> <Card title="Sink to DynamoDB" icon="database" href="/integrations/destinations/amazon-dynamodb" horizontal /> <Card title="Sink to OpenSearch" icon="magnifying-glass" href="/integrations/destinations/opensearch" horizontal /> <Card title="Sink to BigQuery" icon="table" href="/integrations/destinations/bigquery" horizontal /> <Card title="Sink to SharedMergeTree table engine on ClickHouse Cloud" icon="server" href="/integrations/destinations/clickhouse#supported-table-engines" horizontal /> <Card title="Sink to SQL Server" icon="database" href="/integrations/destinations/sql-server" horizontal /> <Card title="Direct SQL Server CDC source connector" icon="plug" href="/integrations/sources/sql-server-cdc" horizontal /> <Card title="Sink to Iceberg with glue catalog" icon="mountain" href="/integrations/destinations/apache-iceberg#glue-catelogs" horizontal /> <Card title="Ingest data from webhook" icon="laptop-code" href="/integrations/sources/webhook" horizontal /></CardGroup> | ||
* [Sink to Snowflake](/integrations/destinations/snowflake) | ||
* [Sink to DynamoDB](/integrations/destinations/amazon-dynamodb) | ||
* [Sink to OpenSearch](/integrations/destinations/opensearch) | ||
* [Sink to BigQuery](/integrations/destinations/bigquery) | ||
* [Sink to SharedMergeTree table engine on ClickHouse Cloud](/integrations/destinations/clickhouse#supported-table-engines) | ||
* [Sink to SQL Server](/integrations/destinations/sql-server) | ||
* [Direct SQL Server CDC source connector](/integrations/sources/sql-server-cdc) | ||
* [Sink to Iceberg with glue catalog](/integrations/destinations/apache-iceberg#glue-catelogs) | ||
* [Ingest data from webhook](/integrations/sources/webhook) | ||
|
||
For users who are already using these features in 1.9.x or earlier versions, rest assured that the functionality of these features will be intact if you stay on the version. If you choose to upgrade to v2.0 or later versions, an error will show up to indicate you need a license to use the features. | ||
|
||
The premium features are carefully selected based on the following criteria: | ||
|
||
- Seamless integration with proprietary or licensed open-source systems. | ||
- Advanced features that enhance development velocity and lower production deployment overhead. | ||
- Performance improvements for non-standard deployment environments. | ||
- Tailored features specifically requested by our paying customers. | ||
|
||
## How to access Premium Edition features | ||
|
||
For RisingWave Cloud users, all Premium Edition features are available out of the box without additional cost. | ||
|
@@ -104,4 +113,4 @@ RisingWave provides three levels of support packages: | |
|
||
## Pricing | ||
|
||
Pricing for RisingWave Premium will be based on the cluster size, measured in RisingWave Units (RWUs). The number of RWUs will be determined based on the scale of data ingestion, number of streaming jobs, and the complexity of use case. There could be additional factors as well. Please contact our sales at [[email protected]](mailto:[email protected]) for more details. | ||
For pricing details, please contact our sales at [[email protected]](mailto:[email protected]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
title: "Ingest data from MySQL table" | ||
description: "Describes how to ingest data from MySQL table to RisingWave using table-valued function." | ||
sidebarTitle: MySQL table | ||
--- | ||
|
||
RisingWave allows you to query MySQL tables directly with the `mysql_query` table-valued function (TVF). It offers a simpler alternative to Change Data Capture (CDC) when working with MySQL data in RisingWave. | ||
|
||
Unlike CDC, which continuously syncs data changes, this function lets you fetch data directly from MySQL when needed. Therefore, this approach is ideal for static or infrequently updated data, as it's more resource-efficient than maintaining a constant CDC connection. | ||
|
||
<Note> | ||
**PUBLIC PREVIEW** | ||
|
||
This feature is currently in public preview, meaning it is nearing the final product but may not yet be fully stable. If you encounter any issues or have feedback, please reach out to us via our [Slack channel](https://www.risingwave.com/slack). Your input is valuable in helping us improve this feature. For more details, see our [Public Preview Feature List](/changelog/product-lifecycle#features-in-the-public-preview-stage). | ||
</Note> | ||
|
||
<Note> | ||
Added in version 2.2. | ||
</Note> | ||
|
||
## Syntax | ||
|
||
Define `mysql_query` as follows: | ||
|
||
```sql | ||
mysql_query( | ||
hostname varchar, -- Database hostname | ||
port varchar, -- Database port | ||
username varchar, -- Authentication username | ||
password varchar, -- Authentication password | ||
database_name varchar, -- Target database name | ||
query varchar -- SQL query to execute | ||
) | ||
``` | ||
|
||
## Data type mapping | ||
|
||
The following table shows how MySQL data types are mapped to RisingWave data types: | ||
|
||
| MySQL Type | RisingWave Type | | ||
|:-----------|:----------------| | ||
| `bit(1)` | `boolean` | | ||
| `bit(>1)` | `bytea` | | ||
| `bool`/`boolean` | `smallint` | | ||
| `tinyint` | `smallint` | | ||
| `smallint` | `smallint` | | ||
| `mediumint` | `int` | | ||
| `int` | `int` | | ||
| `bigint` | `bigint` | | ||
| `float` | `float32` | | ||
| `double` | `float64` | | ||
| `decimal` | `decimal` | | ||
| `numeric` | `decimal` | | ||
| `year` | `int` | | ||
| `date` | `date` | | ||
| `time` | `time` | | ||
| `datetime` | `timestamp` | | ||
| `timestamp` | `timestamptz` | | ||
| `varchar` | `varchar` | | ||
| `char` | `varchar` | | ||
| `json` | `jsonb` | | ||
| `blob` | `bytea` | | ||
| `tinyblob` | `bytea` | | ||
| `mediumblob` | `bytea` | | ||
| `longblob` | `bytea` | | ||
| `array` | *unsupported* | | ||
| `enum` | *unsupported* | | ||
| `set` | *unsupported* | | ||
| `geometry` | *unsupported* | | ||
| `null` | *unsupported* | | ||
|
||
## Example | ||
|
||
1. In your MySQL database, create a table and populate it with sample data of various data types. | ||
|
||
```sql | ||
CREATE TABLE test ( | ||
id bigint primary key, v0 bit, v1 bool, v2 tinyint(1), | ||
v3 tinyint(2), v4 smallint, v5 mediumint, v6 integer, | ||
v7 bigint, v8 float, v9 double, v10 numeric(4, 2), | ||
v11 decimal(4, 2), v12 char(255), v13 varchar(255), | ||
v14 bit(10), v15 tinyblob, v16 blob, v17 mediumblob, | ||
v18 longblob, v19 date, v20 time, v21 timestamp, | ||
v22 json | ||
); | ||
|
||
INSERT INTO test SELECT | ||
1 as id, true as v0, true as v1, 2 as v2, 3 as v3, 4 as v4, 5 as v5, | ||
6 as v6, 7 as v7, 1.08 as v8, 1.09 as v9, 1.10 as v10, 1.11 as v11, | ||
'char' as v12, 'varchar' as v13, b'1010' as v14, x'16' as v15, x'17' as v16, | ||
x'18' as v17, x'19' as v18, '2021-01-01' as v19, '12:34:56' as v20, | ||
'2021-01-01 12:34:56' as v21, JSON_OBJECT('key1', 1, 'key2', 'abc'); | ||
``` | ||
|
||
2. In RisingWave, use `postgres_query` function to perform the query. | ||
|
||
```sql | ||
SELECT * | ||
FROM mysql_query('$MYSQL_HOST', '$MYSQL_TCP_PORT', '$RISEDEV_MYSQL_USER', '$MYSQL_PWD', 'tvf', 'select * from test;'); | ||
----RESULT | ||
1 t 1 2 3 4 5 6 7 1.08 1.09 1.10 1.11 char varchar \x000a \x16 \x17 \x18 \x19 2021-01-01 12:34:56 2021-01-01 12:34:56+00:00 {"key1": 1, "key2": "abc"} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: "Query data in RisingWave" | ||
description: "RisingWave allows you to access and use insights from your streaming data immediately. It also functions like any other database, allowing you to query batch or raw data that you've inserted." | ||
sidebarTitle: Overview | ||
--- | ||
|
||
This section explains how to query and interact with data in RisingWave. | ||
|
||
RisingWave offers several methods for serving results, catering to various use cases, from ad-hoc analysis to application integration. | ||
|
||
## Query with `SELECT` statements | ||
|
||
Retrieve data directly from RisingWave using standard SQL SELECT queries against tables or materialized views. Use this method for ad-hoc analysis, exploring the latest results, and extracting specific data subsets. | ||
|
||
For syntax details, see [`SELECT`](/sql/commands/sql-select). To learn how RisingWave processes data (ad-hoc or streaming), see [Ad-hoc vs. Streaming queries](/processing/overview#ad-hoc-on-read-vs-streaming-on-write). | ||
|
||
Connect to RisingWave with psql or any other PostgreSQL-compatible client to execute these queries. RisingWave is compatible with [many data visualization tools](/integrations/visualization/overview). Here are a few that we have tested: | ||
|
||
- [Beekeeper Studio](/integrations/visualization/beekeeper-studio) | ||
- [DBeaver](/integrations/visualization/dbeaver) | ||
- [Grafana](/integrations/visualization/grafana) | ||
- [Looker](/integrations/visualization/looker) | ||
- [Metabase](/integrations/visualization/metabase) | ||
- [Superset](/integrations/visualization/superset) | ||
|
||
**Key features**: | ||
|
||
- Uses familiar SQL syntax. | ||
- Provides immediate access to the most up-to-date results. | ||
- Offers flexibility to filter, aggregate, and join data. | ||
|
||
**Example**: Retrieve the latest aggregated results from a materialized view. | ||
|
||
## Integrate with PostgreSQL via foreign data wrapper (FDW) | ||
|
||
RisingWave seamlessly integrates with existing PostgreSQL ecosystems through its Foreign Data Wrapper (FDW) functionality. Query data in RisingWave's tables and materialized views as if it were part of your PostgreSQL database. This allows you to leverage existing PostgreSQL tools and workflows. | ||
|
||
For details, see [RisingWave as Postgres FDW](/query/risingwave-as-postgres-fdw). | ||
|
||
**Key features**: | ||
|
||
- Enables unified querying across RisingWave and PostgreSQL data. | ||
- Allows you to use existing PostgreSQL tools and applications. | ||
- Simplifies integration into existing data infrastructure. | ||
- Performance: While FDW offers convenience, it may introduce some performance overhead compared to directly querying RisingWave. RisingWave pushes down filters in `WHERE` clauses to optimize queries. However, complex queries with joins, aggregations, or `LIMIT` clauses are processed in PostgreSQL after fetching the data from RisingWave. | ||
|
||
**Example**: Join data in a PostgreSQL table with a continuously updated materialized view in RisingWave. | ||
|
||
## Subscribe to real-time updates | ||
|
||
RisingWave's subscription feature allows you to receive a continuous stream of updates from a materialized view directly, without needing an external message queue. This includes both existing data in the materialized view when the subscription is created and subsequent changes. You can choose to retrieve the full dataset or only incremental changes from a specific point using a subscription cursor. | ||
|
||
For details, see [Subscription](/query/subscription). | ||
|
||
**Key features**: | ||
|
||
- Provides real-time data updates directly from RisingWave. | ||
- Allows retrieving full or incremental data using a cursor. | ||
- Requires fewer components and less maintenance than external event stores. | ||
|
||
**Example**: Subscribe to a materialized view that tracks website user activity to power a live dashboard, receiving updates directly from RisingWave. | ||
|
||
## Access programmatically via SDK and client libraries | ||
|
||
RisingWave provides a [Python SDK](/python-sdk/intro) [`risingwave-py`](https://pypi.org/project/risingwave-py/) (currently in public preview) to help you develop event-driven applications. The SDK offers a simple way to perform ad-hoc queries, subscribe to changes, and define event handlers for tables and materialized views. | ||
|
||
Additionally, since RisingWave is compatible with Postgres, you can use standard PostgreSQL drivers to interact with RisingWave from your applications. | ||
|
||
Client libraries in various languages allow developers to interact with RisingWave programmatically and execute `SELECT` queries within their applications. | ||
|
||
For the list of available client libraries, see [Client Libraries](/client-libraries/overview). | ||
|
||
**Example**: Use the Python client library to fetch the latest results from a materialized view and display them in a financial data analysis application. | ||
|
||
## Choose the right method | ||
|
||
From the methods described above, select the one that best fits your needs, considering factors like query complexity, integration requirements, and team expertise. RisingWave ensures consistency across all methods. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: "Query from visualization tools" | ||
url: "/integrations/visualization/overview" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: "Query with SELECT statements" | ||
url: "/sql/commands/sql-select" | ||
--- |
Oops, something went wrong.