'完成查询,传输,导出的说明'

This commit is contained in:
黎润豪 2021-12-27 10:24:28 +08:00
parent d3fea87686
commit 6f219d28a4
11 changed files with 53 additions and 1 deletions

BIN
img/DBeaverExport1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
img/DBeaverExport2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
img/DBeaverExport3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
img/DBeaverExport4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
img/DBeaverExport5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
img/DBeaverExport6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
img/DBeaverExport7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
img/DBeaverExport8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
img/DBeaverFilter1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
img/DBeaverQuery.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -8,7 +8,59 @@ DBeaver是一个优秀的开源数据库访问工具。因为大部分学校都
- 驱动拉取仓库配置
打开`菜单 -> 窗口 -> 首选项 -> 连接 -> 驱动 -> Maven`在这加上阿里云的maven仓库并上移至顶上。这个配置生效需要重启DBeaver
打开`菜单 -> 窗口 -> 首选项 -> 连接 -> 驱动 -> Maven`在这加上阿里云的maven仓库并上移至顶上。这个配置生效需要重启DBeaver
![DBAliyunMaven](../img/DBAliyunMaven.jpg)
## 查询
- 过滤使用
![DBeaverFilter1](../img/DBeaverFilter1.jpg)
如图,这里填写`where`查询条件部分的sql即可实现筛选。
- 自定义SQL编辑查询
`菜单 -> SQL编辑器 -> SQL 编辑器`即可打开SQL编辑器进行查询。
![DBeaverQuery](../img/DBeaverQuery.jpg)
## 跨表传输
有时候,我们需要进行将公共测试库的数据导到本地的数据库来做本地测试。这时候我们就需要将测试环境的数据拉到本地。
1. 右击需要输出的数据表,点击导出数据
![DBeaverExport1](../img/DBeaverExport1.jpg)
2. 选择需要输出类型为`数据库表`
![DBeaverExport2](../img/DBeaverExport2.jpg)
3. 点击`Choose...`按钮,选择输入的数据源
![DBeaverExport3](../img/DBeaverExport3.jpg)
4. 调整抽取设置
![DBeaverExport4](../img/DBeaverExport4.jpg)
5. 剩下的都继续按下一步完成即可
![DBeaverExport5](../img/DBeaverExport5.jpg)
## 数据导出
有时候我们需要导出一些数据给客户或提供给自己进行导入接口测试。我们提供数据通常使用Excel文档。这时我们就可以使用DBeaver导出CSV文档。
1. 右击需要导出的数据表,点击导出数据
![DBeaverExport1](../img/DBeaverExport1.jpg)
2. 选择需要输出类型为`CSV`
![DBeaverExport6](../img/DBeaverExport6.jpg)
3. 抽取设置和格式设置都是用默认设置
4. 在输出设置中,需要记住编码类型
![DBeaverExport7](../img/DBeaverExport7.jpg)
5. 确认后按继续完成CSV文件导出
Excel支持CSV文件的读取和excel文档的另存。但另存时长数字会变成科学计数法。在另存后科学计数法会变成字符串导致内容丢失。因此我们不可以使用Excel进行另存。因此我写了一个[小工具](http://47.107.61.133:3000/lirh/csvconvert)进行转换。
> 除了常规的数据表导出我们还可以将SQL编辑器的查询结果集导出。如![DBeaverExport8](../img/DBeaverExport8.jpg)