Skip to content

Commit

Permalink
Merge branch 'main' into ecommerce-demos
Browse files Browse the repository at this point in the history
  • Loading branch information
emile-00 authored Dec 20, 2024
2 parents e2d489b + c941cea commit 9b85e8b
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 38 deletions.
1 change: 1 addition & 0 deletions changelog/product-lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Below is a list of all features in the public preview phase:

| Feature name | Start version |
| :-- | :-- |
| [EXPLAIN FORMAT JSON](/sql/commands/sql-explain#explain-options)| 2.2 |
| [Ingest data from Postgres table](/integrations/sources/postgresql-table) | 2.1 |
| [Ingest data from webhook](/integrations/sources/webhook) | 2.1 |
| [Shared source](/sql/commands/sql-create-source#shared-source) | 2.1 |
Expand Down
4 changes: 2 additions & 2 deletions demos/betting-behavior-analysis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Once RisingWave is installed and deployed, run the three SQL queries below to se
bet_amount FLOAT,
result VARCHAR,
profit_loss FLOAT,
timestamp TIMESTAMP
timestamp TIMESTAMPTZ
);
```

Expand All @@ -62,7 +62,7 @@ Once RisingWave is installed and deployed, run the three SQL queries below to se
expected_return FLOAT,
current_odds FLOAT,
profit_loss FLOAT,
timestamp TIMESTAMP
timestamp TIMESTAMPTZ
);
```

Expand Down
4 changes: 2 additions & 2 deletions demos/inventory-management-forecast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Once RisingWave is installed and deployed, run the two SQL queries below to set
CREATE TABLE inventory (
warehouse_id INT,
product_id INT,
timestamp TIMESTAMP,
timestamp TIMESTAMPTZ,
stock_level INT,
reorder_point INT,
location VARCHAR
Expand All @@ -41,7 +41,7 @@ Once RisingWave is installed and deployed, run the two SQL queries below to set
warehouse_id INT,
product_id INT,
quantity_sold INT,
timestamp TIMESTAMP
timestamp TIMESTAMPTZ
);
```

Expand Down
16 changes: 8 additions & 8 deletions demos/market-data-enrichment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Once RisingWave is installed and deployed, run the two SQL queries below to set
```sql
CREATE TABLE raw_market_data (
asset_id INT,
timestamp TIMESTAMP,
price FLOAT,
timestamp TIMESTAMPTZ,
price NUMERIC,
volume INT,
bid_price FLOAT,
ask_price FLOAT
bid_price NUMERIC,
ask_price NUMERIC
);
```
2. The table `enrichment_data` contains external data that adds context to the raw market data. It includes additional metrics such as historical volatility, sector performance, and sentiment scores.
Expand All @@ -39,10 +39,10 @@ Once RisingWave is installed and deployed, run the two SQL queries below to set
CREATE TABLE enrichment_data (
asset_id INT,
sector VARCHAR,
historical_volatility FLOAT,
sector_performance FLOAT,
sentiment_score FLOAT,
timestamp TIMESTAMP
historical_volatility NUMERIC,
sector_performance NUMERIC,
sentiment_score NUMERIC,
timestamp TIMESTAMPTZ
);
```

Expand Down
4 changes: 2 additions & 2 deletions demos/market-trade-surveillance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Once RisingWave is installed and deployed, run the two SQL queries below to set
CREATE TABLE trade_data (
trade_id INT,
asset_id INT,
timestamp TIMESTAMP,
timestamp TIMESTAMPTZ,
price NUMERIC,
volume INT,
buyer_id INT,
Expand All @@ -40,7 +40,7 @@ Once RisingWave is installed and deployed, run the two SQL queries below to set
```sql
CREATE TABLE market_data (
asset_id INT,
timestamp TIMESTAMP,
timestamp TIMESTAMPTZ,
bid_price NUMERIC,
ask_price NUMERIC,
price NUMERIC,
Expand Down
4 changes: 2 additions & 2 deletions demos/sports-risk-profit-analysis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Once RisingWave is installed and deployed, run the two SQL queries below to set
position_id INT,
league VARCHAR,
position_name VARCHAR,
timestamp TIMESTAMP,
timestamp TIMESTAMPTZ,
stake_amount FLOAT,
expected_return FLOAT,
max_risk FLOAT,
Expand All @@ -47,7 +47,7 @@ Once RisingWave is installed and deployed, run the two SQL queries below to set
bookmaker VARCHAR,
market_price FLOAT,
volume INT,
timestamp TIMESTAMP
timestamp TIMESTAMPTZ
);
```

Expand Down
29 changes: 16 additions & 13 deletions get-started/rw-premium-edition-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,22 @@ A result of `t` means the key is valid; an error message indicates an invalid ke

## Support

RisingWave Premium edition offers the premium support:

| **Support feature** | **Standard** | **Premium** |
| :--- | :--- | :--- |
| Service hours | 12x5 | 24x7 |
| Response time | Critical - 4 hours | Critical - 1 hour |
| | High - 12 hours | High - 4 hours |
| | Medium - 24 hours | Medium - 12 hours |
| | Low - 48 hours | Low - 24 hours |
| Dedicated Slack channel | No | Yes |
| Max technical contacts | 2 | 8 |
| Named support engineer | No | Yes |
| Solution engineer access | 2 hours per month | 8 hours per month |
RisingWave provides three levels of support packages:

| **Support Package** | **Starter** | **Pro** | **Mission-Critical** |
| :--- | :--- | :--- | :--- |
| Service Hours | 8 am - 6 pm (M-F; Local Time) | 24x7 | 24x7 |
| Support Type | Standard | Premium | Premium|
| Support SLA | Urgent - 4 hrs | Urgent - 2 hrs | Urgent - 1 hr |
| | High - 12 hrs | High - 8 hrs | High - 4 hrs |
| | Normal - 48 hrs | Normal - 24 hrs | Normal - 12 hrs |
| | Low - 1 week | Low - 48 hrs | Low - 24 hrs |
|Designated Technical Account Manager | No |No | Yes|
| Slack / Team Channels | No | Yes | Yes |
|Scheduled Service Engagement| - |8 hrs / month | 16 hrs / month |
| Business Reviews | Annually | Quarterly | Monthly |
| Pricing | Included with RisingWave Premium Edition | $5,000 / month | $10,000 / month |
| Additional PRO Service Hours | $200 / hr | $200 / hr | $200 / hr |

## Pricing

Expand Down
3 changes: 3 additions & 0 deletions integrations/destinations/apache-kafka.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ When creating a Kafka sink in RisingWave, you can specify the following Kafka-sp
| retry.backoff.ms | properties.retry.backoff.ms | int |
| receive.message.max.bytes | properties.receive.message.max.bytes | int |
| ssl.endpoint.identification.algorithm | properties.ssl.endpoint.identification.algorithm | str |
| statistics.interval.ms | properties.statistics.interval.ms | int |


Set `properties.ssl.endpoint.identification.algorithm` to `none` to bypass the verification of CA certificates and resolve SSL handshake failure. This parameter can be set to either `https` or `none`. By default, it is `https`.

To monitor Kafka metrics in Grafana, set `properties.statistics.interval.ms` to a non-zero value. The granularity is 1000ms.

Starting with version 2.0, the default value for `properties.message.timeout.ms` has changed from 5 seconds to **5 minutes**, aligning with the default setting in the [official Kafka library](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md).


Expand Down
4 changes: 3 additions & 1 deletion integrations/sources/kafka.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ When creating a source in RisingWave, you can specify the following Kafka parame
| queued.min.messages | properties.queued.min.messages | int |
| receive.message.max.bytes | properties.receive.message.max.bytes | int |
| ssl.endpoint.identification.algorithm | properties.ssl.endpoint.identification.algorithm | str |
| statistics.interval.ms | properties.statistics.interval.ms | int |

To monitor Kafka metrics in Grafana, set `properties.statistics.interval.ms` to a non-zero value. The granularity is 1000ms.

The additional Kafka parameters `queued.min.messages` and `queued.max.messages.kbytes` are specified with `properties.queued.min.messages` and `properties.queued.max.messages.kbytes`, respectively, when creating the source.

Expand Down Expand Up @@ -372,7 +375,6 @@ To create a Kafka source with a PrivateLink connection, in the WITH section of y
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| privatelink.targets | The PrivateLink targets that correspond to the Kafka brokers. The targets should be in JSON format. Note that each target listed corresponds to each broker specified in the properties.bootstrap.server field. If the order is incorrect, there will be connectivity issues. |
| privatelink.endpoint | The DNS name of the VPC endpoint. If you're using RisingWave Cloud, you can find the auto-generated endpoint after you created a connection. See details in [Create a PrivateLink connection](/cloud/create-a-connection/#whats-next). |
| connection.name | The name of the connection. This parameter should only be included if you are using a connection created with the [CREATE CONNECTION](/sql/commands/sql-create-connection) statement. Omit this parameter if you have provisioned a VPC endpoint using privatelink.endpoint (recommended). |

Here is an example of creating a Kafka source using a PrivateLink connection. Notice that `{"port": 9094}` corresponds to the broker `broker1-endpoint`, `{"port": 9095}` corresponds to the broker `broker2-endpoint`, and `{"port": 9096}` corresponds to the broker `broker3-endpoint`.

Expand Down
36 changes: 36 additions & 0 deletions integrations/visualization/grafana.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,39 @@ GRANT SELECT ON MATERIALIZED VIEW mv_name TO grafanareader;
See the [GRANT](/sql/commands/sql-grant) command for more details.

Now that RisingWave is added as a database, you can start creating dashboards within Grafana using the data in RisingWave.

## Configure Grafana to read data from RisingWave Cloud

Grafana can also be configured to visualize and monitor data from a RisingWave Cloud cluster, allowing you to build charts and real-time dashboards based on tables and materialized views. Follow these steps to integrate RisingWave as a data source in Grafana.

### Add RisingWave Cloud as a Data Source in Grafana

1. Access Data Source Settings. In Grafana, navigate to **Configuration > Data Sources** from the left-hand sidebar.
2. Add a New Data Source. Click the **Add Data Source** button at the top of the page.
3. From the list of available database integrations, choose **PostgreSQL**. RisingWave is PostgreSQL-compatible, so this option works perfectly for connecting to it.
4. Configure PostgreSQL connection by filling in the following connection details based on your RisingWave Cloud cluster:

- **Host**: Provide the hostname of your RisingWave Cloud instance. The format will typically be something like: `your-rw-cluster-host-url:4566`.
- **Database**: Enter the database name as `dev`.
- **User**: Use the username associated with your RisingWave Cloud cluster.
<Frame><img src="/images/grafana_step_4.png"/></Frame>

- **Password**: Enter the password for the corresponding username.
- **TLS/SSL Mode**: Set this to `verify-full` for secure connections. This will ensure that data transferred between Grafana and RisingWave is encrypted and verified.
5. Optional fields such as **File System Path** and **Certificate Content** can be left blank.

<Frame><img src="/images/grafana_step_5.png"/></Frame>

6. Test the Connection. Once you’ve entered the required fields, scroll down and click the **Save & Test** button to check the connection. If successful, Grafana will confirm that it can connect to your RisingWave Cloud instance.

<Frame><img src="/images/grafana_step_6.png"/></Frame>

### Create dashboards and visualizations

After adding RisingWave as a data source, you can now create dynamic dashboards and real-time visualizations using tables and materialized views from your RisingWave Cloud cluster.

- Start by creating a new dashboard. Go to **Dashboards > New Dashboard** and select **Add New Panel**.
- Use the Grafana query editor to write SQL queries that extract data from your RisingWave tables or materialized views. Since RisingWave is PostgreSQL-compatible, the query syntax will follow PostgreSQL standards.
- Visualize data. Choose from Grafana's wide range of visualization options (e.g. time series, bar charts, tables) to represent your data in a meaningful way.

With this setup, you can build real-time dashboards in Grafana, powered by the high-performance and advanced real-time data processing capabilities of RisingWave Cloud.
2 changes: 1 addition & 1 deletion mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
"topbarCtaButton": {
"name": "Sign up free",
"url": "https://cta-service-cms2.hubspot.com/web-interactives/public/v1/track/redirect?encryptedPayload=AVxigLIaHq9bV2ny%2Bylsa2ufL0aDuPwRHOnPeLB8Dg8h3WWdPj%2Fg5HXOjsxb%2FhdWQgEX2mh109JeIBvFte7pCD3RrX5ahG43fTSJi%2BQ5AO3w7aeF12T8Yla48tly6s4wGZx%2BUZ%2BjcMy9Mi7KXuXPpVJjsS4CIsfkjZFXrMlCWSA0F3%2B8zFuEyfPgWtPK&webInteractiveContentId=171085305230&portalId=24308934&__hstc=32235681.2d5f24c3ccf7421d72a0c77bd87a6414.1728930378881.1728930378881.1728971470212.2&__hssc=32235681.1.1728971470212&__hsfp=2296146515",
"url": "https://cta-service-cms2.hubspot.com/web-interactives/public/v1/track/redirect?encryptedPayload=AVxigLIVNzabNcOPWI6bnbgE5v5wBhWy6pk6dNZ0jpoHYTJVXYdKJ2sN2%2Bz81tvbqU9obUFnA6qJBV3VfxEI3LOXQz%2FR1xANlR5nhw9CzFWt250u2%2B%2FfsHip8lVRCRiV%2FX0l10HpM%2BZWdr%2FmPAe%2BTHYRotiKZ1nJ494JNXcirwOZXbhlh5RTBgXXdxwxHyst&webInteractiveContentId=183953770777&portalId=24308934",
"arrow": false,
"style": "roundedRectangle"
},
Expand Down
2 changes: 1 addition & 1 deletion sql/commands/sql-alter-materialized-view.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ALTER MATERIALIZED VIEW mv1 SET BACKFILL_RATE_LIMIT=0;
-- Set backfill rate limit to 1
ALTER MATERIALIZED VIEW mv1 SET BACKFILL_RATE_LIMIT=1;

-- Disable the backfill
-- Disable the backfill rate limit
ALTER MATERIALIZED VIEW mv1 SET BACKFILL_RATE_LIMIT=DEFAULT;
```

Expand Down
2 changes: 1 addition & 1 deletion sql/commands/sql-alter-table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,6 @@ ALTER TABLE t1 SET BACKFILL_RATE_LIMIT=0;
-- Alter backfill rate limit
ALTER TABLE t1 SET BACKFILL_RATE_LIMIT=1000;

-- Disable the backfill
-- Disable the backfill rate limit
ALTER TABLE t1 SET BACKFILL_RATE_LIMIT=DEFAULT;
```
18 changes: 13 additions & 5 deletions sql/commands/sql-explain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,24 @@ EXPLAIN [ ( option [ , ... ] ) ] statement;

#### `EXPLAIN` options

| Option | Description | |
| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **VERBOSE** \[ TRUE \| FALSE \] | Show additional information regarding the execution plan such as the table catalog of the state table and the schema of each operator. | |
| **TRACE** \[ TRUE \| FALSE \] | Show the trace of each optimization stage, not only the final plan. | |
| **TYPE** \[ PHYSICAL \| LOGICAL | DISTSQL \] | Show the execution plan of a specific phase.PHYSICAL — Show the batch plan or stream plan.LOGICAL — Show the optimized logical plan.DISTSQL — Show the distributed query plan for batch or stream. |
| Option | Supported values | Description |
| :----------- | :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **VERBOSE** | `[ TRUE \| FALSE ]` | Show additional information regarding the execution plan such as the table catalog of the state table and the schema of each operator. |
| **TRACE** | `[ TRUE \| FALSE ]` | Show the trace of each optimization stage, not only the final plan. |
| **TYPE** | `[ PHYSICAL \| LOGICAL \| DISTSQL ]` | Show the execution plan of a specific phase.<ul><li>PHYSICAL — Show the batch plan or stream plan.</li><li>LOGICAL — Show the optimized logical plan.</li><li>DISTSQL — Show the distributed query plan for batch or stream.</li></ul> |
| **FORMAT** | `[ TEXT \| JSON ]` | <ul><li>FORMAT JSON - Show the `logical` and `physical` plans in JSON format while ignoring `trace` and `distsql` options.</li><li>FORMAT TEXT - Match the current output format of `EXPLAIN`.</li></ul> |

<Note>
The boolean parameter `[ TRUE | FALSE ]` specifies whether the specified option should be enabled or disabled. Use `TRUE` to enable the option, and `FALSE` to disable it. It defaults to `TRUE` if the parameter is not specified.
</Note>

<Note>
**PUBLIC PREVIEW**

`EXPLAIN FORMAT JSON` 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>

## Examples

The following statement shows the execution plan of a `SELECT` statement.
Expand Down

0 comments on commit 9b85e8b

Please sign in to comment.