mirror of
https://github.com/valitydev/clickhouse-sink-connector.git
synced 2024-11-06 10:35:21 +00:00
split commands for copy+paste
This commit is contained in:
parent
0a57412780
commit
2b01571692
@ -109,8 +109,13 @@ kubectl -n $NAMESPACE get statefulset
|
|||||||
```
|
```
|
||||||
|
|
||||||
Fill MySQL with data
|
Fill MySQL with data
|
||||||
|
|
||||||
|
Port forward to make MySQL accessible
|
||||||
```bash
|
```bash
|
||||||
kubectl -n mysql port-forward service/mysql 3306:3306
|
kubectl -n mysql port-forward service/mysql 3306:3306
|
||||||
|
```
|
||||||
|
Load
|
||||||
|
```bash
|
||||||
cat deploy/sql/mysql_schema_employees.sql | mysql --host=127.0.0.1 --port=3306 --user=root --password=root
|
cat deploy/sql/mysql_schema_employees.sql | mysql --host=127.0.0.1 --port=3306 --user=root --password=root
|
||||||
cat deploy/sql/mysql_dump_employees.sql | mysql --host=127.0.0.1 --port=3306 --user=root --password=root --database=test
|
cat deploy/sql/mysql_dump_employees.sql | mysql --host=127.0.0.1 --port=3306 --user=root --password=root --database=test
|
||||||
echo "select count(*) from test.employees" | mysql --host=127.0.0.1 --port=3306 --user=root --password=root --database=test
|
echo "select count(*) from test.employees" | mysql --host=127.0.0.1 --port=3306 --user=root --password=root --database=test
|
||||||
@ -176,8 +181,11 @@ kubectl -n $NAMESPACE get pod
|
|||||||
```
|
```
|
||||||
|
|
||||||
Ensure schema registry is empty
|
Ensure schema registry is empty
|
||||||
|
Port forward to make schema registry accessible
|
||||||
```bash
|
```bash
|
||||||
kubectl -n registry port-forward service/schema-registry 8080:8080
|
kubectl -n registry port-forward service/schema-registry 8080:8080
|
||||||
|
```
|
||||||
|
```bash
|
||||||
firefox http://localhost:8080/ui/artifacts
|
firefox http://localhost:8080/ui/artifacts
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -231,8 +239,11 @@ kubectl -n $NAMESPACE apply -f <( \
|
|||||||
|
|
||||||
Ensure schema registry is **NOT empty**
|
Ensure schema registry is **NOT empty**
|
||||||
|
|
||||||
|
Port forward to make schema registry accessible
|
||||||
```bash
|
```bash
|
||||||
kubectl -n registry port-forward service/schema-registry 8080:8080
|
kubectl -n registry port-forward service/schema-registry 8080:8080
|
||||||
|
```
|
||||||
|
```bash
|
||||||
firefox http://localhost:8080/ui/artifacts
|
firefox http://localhost:8080/ui/artifacts
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -249,8 +260,11 @@ rpk topic consume --offset=300000 --num=1 SERVER5432.test.employees
|
|||||||
### sink
|
### sink
|
||||||
|
|
||||||
### create schema
|
### create schema
|
||||||
|
Port forward to make ClickHouse accessible
|
||||||
```bash
|
```bash
|
||||||
kubectl -n clickhouse port-forward service/clickhouse-clickhouse 9000:9000
|
kubectl -n clickhouse port-forward service/clickhouse-clickhouse 9000:9000
|
||||||
|
```
|
||||||
|
```bash
|
||||||
cat deploy/sql/clickhouse_schema_employees.sql | clickhouse-client --host=127.0.0.1 --port=9000 --multiline --multiquery --user=clickhouse_operator --password=clickhouse_operator_password
|
cat deploy/sql/clickhouse_schema_employees.sql | clickhouse-client --host=127.0.0.1 --port=9000 --multiline --multiquery --user=clickhouse_operator --password=clickhouse_operator_password
|
||||||
echo "desc employees" | clickhouse-client --host=127.0.0.1 --port=9000 --multiline --multiquery --user=clickhouse_operator --password=clickhouse_operator_password --database=test
|
echo "desc employees" | clickhouse-client --host=127.0.0.1 --port=9000 --multiline --multiquery --user=clickhouse_operator --password=clickhouse_operator_password --database=test
|
||||||
```
|
```
|
||||||
@ -291,10 +305,11 @@ kubectl -n $NAMESPACE apply -f <( \
|
|||||||
```
|
```
|
||||||
|
|
||||||
Check data
|
Check data
|
||||||
|
Port forward to make ClickHouse accessible
|
||||||
```bash
|
```bash
|
||||||
kubectl -n clickhouse port-forward service/clickhouse-clickhouse 9000:9000
|
kubectl -n clickhouse port-forward service/clickhouse-clickhouse 9000:9000
|
||||||
```
|
```
|
||||||
|
Check for data
|
||||||
```bash
|
```bash
|
||||||
echo "desc employees" | clickhouse-client --host=127.0.0.1 --port=9000 --multiline --multiquery --user=clickhouse_operator --password=clickhouse_operator_password --database=test
|
echo "desc employees" | clickhouse-client --host=127.0.0.1 --port=9000 --multiline --multiquery --user=clickhouse_operator --password=clickhouse_operator_password --database=test
|
||||||
echo "select count() from employees" | clickhouse-client --host=127.0.0.1 --port=9000 --multiline --multiquery --user=clickhouse_operator --password=clickhouse_operator_password --database=test
|
echo "select count() from employees" | clickhouse-client --host=127.0.0.1 --port=9000 --multiline --multiquery --user=clickhouse_operator --password=clickhouse_operator_password --database=test
|
||||||
|
Loading…
Reference in New Issue
Block a user