Skip to content

Commit

Permalink
pic oversize (#965)
Browse files Browse the repository at this point in the history
* pic oversize

* half-pic

* update pic size
  • Loading branch information
yangj1211 authored Feb 7, 2024
1 parent c246663 commit c380374
Show file tree
Hide file tree
Showing 24 changed files with 439 additions and 137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ MatrixOne 社区欢迎所有开发者的加入和贡献!本章节旨在帮助
### **步骤 2:将仓库克隆至本地**

前往刚才您创建的 Fork 仓库,点击 `Code`,然后再点击**复制**图标,将库的网址复制到剪贴板。
![Clone your fork](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/contribution-guide/contribution-guide-clone.png)

<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/contribution-guide/contribution-guide-clone.png width=50% heigth=50%/>
</div>

然后,在您本地挑选一个合适的工作目录,打开命令行输入以下 Git 命令将文件克隆至您本地的目录:

```
Expand Down
8 changes: 6 additions & 2 deletions docs/MatrixOne/Deploy/MatrixOne-start-stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ kubectl get matrixonecluster -n${NS} ${MO_NAME}
kubectl describe matrixonecluster -n${NS} ${MO_NAME}
```

![](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/deploy/start-stop-4.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/deploy/start-stop-4.png width=50% heigth=50%/>
</div>

![](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/deploy/start-stop-5.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/deploy/start-stop-5.png width=50% heigth=50%/>
</div>

#### 检查 TNSet/CNSet/LogSet 状态

Expand Down
8 changes: 6 additions & 2 deletions docs/MatrixOne/Deploy/update-MatrixOne-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@
- ${REPO_URL}:是 Matrixone 公开镜像仓库,默认为 matrixorigin/matrixone。假如目标版本在 MatrixOne 的公开镜像仓库不存在,则需要同时修改镜像仓库的 URL 为实际的仓库:
![image-20230407094237806](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/deploy/image-20230407094237806.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/deploy/image-20230407094237806.png width=50% heigth=50%/>
</div>
![image-20230407094251938](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/deploy/image-20230407094251938.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/deploy/image-20230407094251938.png width=50% heigth=50%/>
</div>
3. 修改完成后,按 `:wq` 保存即可,MatrixOne Operator 会自动拉取新版本的镜像,并重启组件服务,包括 Log Service,TN 和 CN,你也可以通过以下命令观察其运行状态。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ MatrixOne 1.0 版本现在支持与数据可视化工具 Superset 集成。本
填写 MatrixOne 数据库的连接信息,包括主机、端口、用户名和密码。
![创建数据库连接](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/bi-connection/superset/superset-create-db-connection.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/bi-connection/superset/superset-create-db-connection.png width=40% heigth=40%/>
</div>
填写完毕后,点击 **CONNECT** 按钮,然后再点击 **FINISH**。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ Apache Flink 是一个强大的框架和分布式处理引擎,专注于进行

配置示例如下图所示:

![](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/flink/matrixone-flink-demo.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/flink/matrixone-flink-demo.png width=50% heigth=50%/>
</div>

2. 添加项目依赖,编辑项目根目录下的 `pom.xml` 文件,将以下内容添加到文件中:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ Apache Spark 是一个为高效处理大规模数据而设计的分布式计算
- **Package name**:com.matrixone.demo
- **JDK** 1.8

![项目初始化](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/spark/matrixone-spark-demo.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/spark/matrixone-spark-demo.png width=50% heigth=50%/>
</div>

2. 添加项目依赖,在项目根目录下的 `pom.xml` 内容编辑如下:

Expand Down Expand Up @@ -313,7 +315,9 @@ select * from test.person;
- **Package name**com.matrixone.demo
- **JDK** 1.8

![项目初始化](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/spark/matrixone-spark-demo.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/spark/matrixone-spark-demo.png width=50% heigth=50%/>
</div>

2. 添加项目依赖,在项目根目录下的 `pom.xml` 内容编辑如下:

Expand Down Expand Up @@ -409,7 +413,9 @@ CREATE TABLE `users` (

将 Hadoop 根目录下的 "etc/hadoop/core-site.xml""hdfs-site.xml" 以及 Hive 根目录下的 "conf/hive-site.xml" 这三个配置文件复制到项目的 "resource" 目录中。

![配置文件](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/spark/config-files.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/spark/config-files.png width=30% heigth=30%/>
</div>

### 步骤五:编写代码

Expand Down
32 changes: 24 additions & 8 deletions docs/MatrixOne/Develop/connect-mo/database-client-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,33 @@ MatrixOne 现在支持通过以下几种数据库客户端工具的方式连接
3. 点击 **Save** 保存设置。
![navicat_config](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/navicat-config.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/navicat-config.png width=50% heigth=50%/>
</div>
4. 双击左侧数据库目录中的 **MatrixOne**,图标点亮,连接成功。
5. 连接到 MatrixOne 后,在左侧数据库目录栏,你将看到 6 个默认系统数据库:
<img src="https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/navicat-databases.png" style="zoom: 60%;" />
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/navicat-databases.png width=50% heigth=50%/>
</div>
右侧窗口可查看有关此连接的基本信息:
<img src="https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/navicat-connection.png" style="zoom: 60%;" />
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/navicat-connection.png width=30% heigth=30%/>
</div>
## 通过 DBeaver 连接 MatrixOne 服务
1. 下载安装 [DBeaver](https://dbeaver.io/download/)。
2. 安装 DBeaver 完成后,打开 DBeaver,点击左上角**连接**图标,在弹窗中选择 **MySQL**,点击 **Next**。
![dbeaver-mysql](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/dbeaver-mysql.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/dbeaver-mysql.png width=50% heigth=50%/>
</div>
在 **Connect to a database** 窗口的 **Main** 区中填写如下参数:
Expand All @@ -95,16 +103,24 @@ MatrixOne 现在支持通过以下几种数据库客户端工具的方式连接
- **Password**: 111
- **Save password locally**: 勾选
![dbeaver-connection](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/dbeaver-connection.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/dbeaver-connection.png width=50% heigth=50%/>
</div>
3. 双击左侧目录中的 **MatrixOne**,连接 MatrixOne 服务。你可以在左侧目录树中看到默认的四个系统数据库:
![dbeaver-databases](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/dbeaver-databases.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/dbeaver-databases.png width=70% heigth=70%/>
</div>
4. 默认情况下,DBeaver 中不展示视图。如需显示完整的系统数据库,你可以右键单击 **MatrixOne**,选择 **Connection view** 并打开 **Show system objects**:
<img src="https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/show-system-objects.png" style="zoom: 40%;" />
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/show-system-objects.png width=50% heigth=50%/>
</div>
设置完成后,你将看到 6 个系统数据库。
![dbeaver-databases-with-view](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/dbeaver-databases-with-view.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/dbeaver-databases-with-view.png width=70% heigth=70%/>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,25 @@

2. 在 IDEA 中新建 Java 名称为 **testJDBC** 的项目并选择在 **Build System** 中选择 **Maven** 作为构建系统,点击 **Create**

![JDBC create project](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/JDBC_connect/JDBC-create-project.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/JDBC_connect/JDBC-create-project.png width=50% heigth=50%/>
</div>

3. 点击 **File > Project Structure**,进入到 **Project Setting**,点选 **Library**,并点击 **+** 按钮,添加 **From Maven**

![JDBC project structure](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/JDBC_connect/JDBC-project-structure.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/JDBC_connect/JDBC-project-structure.png width=40% heigth=40%/>
</div>

![JDBC add library](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/JDBC_connect/JDBC-from-maven.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/JDBC_connect/JDBC-from-maven.png width=50% heigth=50%/>
</div>

4. 输入框中输入 **mysql-connector-java** 搜索整个库,选择 **mysql:mysql-connector-java:8.0.30**,应用到本项目中。

![JDBC add driver](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/JDBC_connect/JDBC-add-driver.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/JDBC_connect/JDBC-add-driver.png width=70% heigth=70%/>
</div>

5. 修改 **src/main/java/org/example/Main.java** 中的默认 Java 源代码。如下面的代码示例中所示,这段代码使用连接地址和凭据创建连接。连接到 MatrixOne 后,你可以使用 Java 语言对 MatrixOne 数据库和表进行操作。

Expand Down
40 changes: 30 additions & 10 deletions docs/MatrixOne/Develop/import-data/bulk-load/load-s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,29 @@ LOAD DATA URL s3option{"endpoint"='cos.ap-shanghai.myqcloud.com', "access_key_id

1. 下载[数据文件](https://github.com/matrixorigin/matrixone/blob/main/test/distributed/resources/load_data/char_varchar_1.csv)。进入 **AWS S3 > buckets**,创建一个具有公共访问权限的存储桶 **test-loading** 并上传文件 *char_varchar_1.csv*

<img src="https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/create_bucket.png" style="zoom: 60%;" />
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/create_bucket.png width=70% heigth=70%/>
</div>

![public block](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/create_bucket_public_block.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/create_bucket_public_block.png width=70% heigth=70%/>
</div>

2. 获取或创建你的 AWS Access key。输入 **Your Account Name > Security Credentials**,获取你现有的访问密钥或创建一个新的访问密钥。

<img src="https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/security_credential.png" style="zoom: 60%;" />
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/security_credential.png width=40% heigth=40%/>
</div>

![Access Key](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/access_key.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/access_key.png width=90% heigth=90%/>
</div>

你可以从下载的凭据或此网页中获取 `Access key` 和 `Secret access key`。

![Retrieve Access Key](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/retrieve_access_key.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/retrieve_access_key.png width=70% heigth=70%/>
</div>

3. 启动 MySQL 客户端,在 MatrixOne 中创建表,SQL 示例如下:

Expand Down Expand Up @@ -190,19 +200,29 @@ create external table t1(col1 char(225)) url s3option{"endpoint"='cos.ap-shangha
1. 下载[数据文件](https://github.com/matrixorigin/matrixone/blob/main/test/distributed/resources/load_data/char_varchar_1.csv)。进入 **AWS S3 > buckets**,创建一个具有公共访问权限的存储桶 **test-loading** 并上传文件 *char_varchar_1.csv*。
<img src="https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/create_bucket.png" style="zoom: 60%;" />
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/create_bucket.png width=70% heigth=70%/>
</div>
![public block](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/create_bucket_public_block.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/create_bucket_public_block.png width=70% heigth=70%/>
</div>
2. 获取或创建你的 AWS Access key。输入 **Your Account Name > Security Credentials**,获取你现有的访问密钥或创建一个新的访问密钥。
<img src="https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/security_credential.png" style="zoom: 60%;" />
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/security_credential.png width=40% heigth=40%/>
</div>
![Access Key](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/access_key.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/access_key.png width=90% heigth=90%/>
</div>
你可以从下载的凭据或此网页中获取 `Access key` 和 `Secret access key`。
![Retrieve Access Key](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/retrieve_access_key.png)
<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/develop/load_S3/retrieve_access_key.png width=70% heigth=70%/>
</div>
3. 启动 MySQL 客户端,指定 S3 文件到外部表:
Expand Down
55 changes: 44 additions & 11 deletions docs/MatrixOne/Develop/read-data/multitable-join-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,18 @@
内连接的连接结果只返回匹配连接条件的行。
|语法 | 图示 |
|---|---|
|SELECT <select_list> FROM TableA A INNER JOIN TableB B ON A.Key=B.Key|![innerjoin](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/inner_join.png)|
- 语法
```sql
SELECT <select_list> FROM TableA A INNER JOIN TableB B ON A.Key=B.Key
```

- 图示

<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/inner_join.png width=30% heigth=30%/>
</div>

内连接有两种书写方式,在结果上是完全等价的:

Expand Down Expand Up @@ -213,19 +222,43 @@ LIMIT 10;

左外连接会返回左表中的所有数据行,以及右表当中能够匹配连接条件的值,如果在右表当中没有找到能够匹配的行,则使用 NULL 填充。

|语法 | 图示 |
|---|---|
|SELECT <select_list> FROM TableA A LEFT JOIN TableB B ON A.Key=B.Key|![leftjoin](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/left_join.png)|
|SELECT <select_list> FROM TableA A LEFT JOIN TableB B ON A.Key=B.Key WHERE B.Key IS NULL|![leftjoinwhere](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/left_join_where.png)|
- 语法

```sql
SELECT <select_list> FROM TableA A LEFT JOIN TableB B ON A.Key=B.Key
```

```sql
SELECT <select_list> FROM TableA A LEFT JOIN TableB B ON A.Key=B.Key WHERE B.Key IS NULL
```

- 图示

<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/left_join.png width=30% heigth=30%/>
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/left_join_where.png width=30% heigth=30%/>
</div>

- `RIGHT JOIN`

右外连接返回右表中的所有记录,以及左表当中能够匹配连接条件的值,没有匹配的值则使用 NULL 填充。

|语法 | 图示 |
|---|---|
|SELECT <select_list> FROM TableA A RIGHT JOIN TableB B ON A.Key=B.Key|![leftjoinwhere](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/right_join.png)|
|SELECT <select_list> FROM TableA A RIGHT JOIN TableB B ON A.Key=B.Key WHERE A.Key IS NULL|![leftjoinwhere](https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/right_join_where.png)|
- 语法

```sql
SELECT <select_list> FROM TableA A RIGHT JOIN TableB B ON A.Key=B.Key
```

```sql
SELECT <select_list> FROM TableA A RIGHT JOIN TableB B ON A.Key=B.Key WHERE A.Key IS NULL
```

- 图示

<div align="center">
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/right_join.png width=30% heigth=30%/>
<img src=https://community-shared-data-1308875761.cos.ap-beijing.myqcloud.com/artwork/docs/reference/right_join_where.png width=30% heigth=30%/>
</div>

语句示例如下:

Expand Down
Loading

0 comments on commit c380374

Please sign in to comment.