-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into peng/alter-sink-targe…
…t-table
- Loading branch information
Showing
123 changed files
with
1,867 additions
and
707 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
25 changes: 25 additions & 0 deletions
25
e2e_test/iceberg/test_case/iceberg_sink_no_partition_append_only_table_verify.slt
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,25 @@ | ||
statement ok | ||
CREATE SOURCE iceberg_source | ||
WITH ( | ||
connector = 'iceberg', | ||
s3.endpoint = 'http://127.0.0.1:9301', | ||
s3.region = 'us-east-1', | ||
s3.access.key = 'hummockadmin', | ||
s3.secret.key = 'hummockadmin', | ||
catalog.type = 'storage', | ||
warehouse.path = 's3://icebergdata/demo', | ||
database.name = 'demo_db', | ||
table.name = 'no_partition_append_only_table', | ||
); | ||
|
||
query I | ||
SELECT id from iceberg_source ORDER by id; | ||
---- | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
|
||
statement ok | ||
DROP SOURCE iceberg_source |
25 changes: 25 additions & 0 deletions
25
e2e_test/iceberg/test_case/iceberg_sink_partition_append_only_table_verify.slt
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,25 @@ | ||
statement ok | ||
CREATE SOURCE iceberg_source | ||
WITH ( | ||
connector = 'iceberg', | ||
s3.endpoint = 'http://127.0.0.1:9301', | ||
s3.region = 'us-east-1', | ||
s3.access.key = 'hummockadmin', | ||
s3.secret.key = 'hummockadmin', | ||
catalog.type = 'storage', | ||
warehouse.path = 's3://icebergdata/demo', | ||
database.name = 'demo_db', | ||
table.name = 'partition_append_only_table', | ||
); | ||
|
||
query I | ||
SELECT id from iceberg_source ORDER by id; | ||
---- | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
|
||
statement ok | ||
DROP SOURCE iceberg_source |
25 changes: 25 additions & 0 deletions
25
e2e_test/iceberg/test_case/iceberg_sink_range_partition_append_only_table_verify.slt
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,25 @@ | ||
statement ok | ||
CREATE SOURCE iceberg_source | ||
WITH ( | ||
connector = 'iceberg', | ||
s3.endpoint = 'http://127.0.0.1:9301', | ||
s3.region = 'us-east-1', | ||
s3.access.key = 'hummockadmin', | ||
s3.secret.key = 'hummockadmin', | ||
catalog.type = 'storage', | ||
warehouse.path = 's3://icebergdata/demo', | ||
database.name = 'demo_db', | ||
table.name = 'range_partition_append_only_table', | ||
); | ||
|
||
query I | ||
SELECT id from iceberg_source ORDER by id; | ||
---- | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
|
||
statement ok | ||
DROP SOURCE iceberg_source |
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
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,86 @@ | ||
# Demo: Sinking to Microsoft SQL Server | ||
|
||
In this demo, we want to showcase how RisingWave is able to sink data to Microsoft SQL Server. | ||
|
||
|
||
1. Launch the cluster: | ||
|
||
```sh | ||
docker-compose up -d | ||
``` | ||
|
||
The cluster contains a RisingWave cluster and its necessary dependencies, a datagen that generates the data, a SQL Server instance for sink. | ||
|
||
2. Create the SQL Server table: | ||
|
||
```sh | ||
docker exec -it sqlserver-server /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P SomeTestOnly@SA -Q " | ||
CREATE DATABASE SinkTest; | ||
GO | ||
USE SinkTest; | ||
GO | ||
CREATE TABLE t_many_data_type ( | ||
k1 int, k2 int, | ||
c_boolean bit, | ||
c_int16 smallint, | ||
c_int32 int, | ||
c_int64 bigint, | ||
c_float32 float, | ||
c_float64 float, | ||
c_decimal decimal, | ||
c_date date, | ||
c_time time, | ||
c_timestamp datetime2, | ||
c_nvarchar nvarchar(1024), | ||
c_varbinary varbinary(1024), | ||
PRIMARY KEY (k1,k2) | ||
); | ||
GO" | ||
``` | ||
|
||
3. Create the RisingWave table and sink: | ||
|
||
```sh | ||
docker exec -it postgres-0 psql -h 127.0.0.1 -p 4566 -d dev -U root -c " | ||
CREATE TABLE t_many_data_type_rw ( | ||
k1 int, k2 int, | ||
c_int16 smallint, | ||
c_int32 int, | ||
c_int64 bigint, | ||
c_float32 float, | ||
c_float64 double, | ||
c_timestamp timestamp, | ||
c_nvarchar string | ||
) WITH ( | ||
connector = 'datagen', | ||
datagen.split.num = '1', | ||
datagen.rows.per.second = '100', | ||
fields.k1.kind = 'random', | ||
fields.k1.min = '0', | ||
fields.k1.max = '10000', | ||
fields.k2.kind = 'random', | ||
fields.k2.min = '0', | ||
fields.k2.max = '10000' | ||
); | ||
CREATE SINK s_many_data_type FROM t_many_data_type_rw WITH ( | ||
connector = 'sqlserver', | ||
type = 'upsert', | ||
sqlserver.host = 'localhost', | ||
sqlserver.port = 1433, | ||
sqlserver.user = 'SA', | ||
sqlserver.password = 'SomeTestOnly@SA', | ||
sqlserver.database = 'SinkTest', | ||
sqlserver.table = 't_many_data_type', | ||
primary_key = 'k1,k2', | ||
); | ||
" | ||
``` | ||
|
||
4. Verify the result in SQL Server, for example: | ||
|
||
```sh | ||
docker exec -it sqlserver-server /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P SomeTestOnly@SA -Q " | ||
SELECT count(*) FROM SinkTest.dbo.t_many_data_type; | ||
" | ||
``` |
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,46 @@ | ||
--- | ||
services: | ||
sqlserver-server: | ||
container_name: sqlserver-server | ||
image: mcr.microsoft.com/mssql/server:2022-latest | ||
hostname: sqlserver-server | ||
ports: | ||
- 1433:1433 | ||
environment: | ||
ACCEPT_EULA: 'Y' | ||
SA_PASSWORD: 'SomeTestOnly@SA' | ||
risingwave-standalone: | ||
extends: | ||
file: ../../docker/docker-compose.yml | ||
service: risingwave-standalone | ||
postgres-0: | ||
container_name: postgres-0 | ||
extends: | ||
file: ../../docker/docker-compose.yml | ||
service: postgres-0 | ||
grafana-0: | ||
extends: | ||
file: ../../docker/docker-compose.yml | ||
service: grafana-0 | ||
minio-0: | ||
extends: | ||
file: ../../docker/docker-compose.yml | ||
service: minio-0 | ||
prometheus-0: | ||
extends: | ||
file: ../../docker/docker-compose.yml | ||
service: prometheus-0 | ||
volumes: | ||
risingwave-standalone: | ||
external: false | ||
postgres-0: | ||
external: false | ||
grafana-0: | ||
external: false | ||
minio-0: | ||
external: false | ||
prometheus-0: | ||
external: false | ||
message_queue: | ||
external: false | ||
name: risingwave-compose |
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
Oops, something went wrong.