将Dbeaver上的结果集导出为CSV [英] Export result set on Dbeaver to CSV

查看:3723
本文介绍了将Dbeaver上的结果集导出为CSV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常,我将Dbeaver用于Windows,并且总是像这样导出结果集:

Normally I use Dbeaver for windows and always export my result set like this:

  • 运行我的查询->选择结果->导出结果集->选择导出到剪贴板->完成

这一步一步地将结果集放入剪贴板,并且可以将其粘贴到任何要使用它的地方.

This step by step puts my result set in my clipboard and I can paste it wherever I want to work with it.

问题是,现在我在Mac上使用dbeaver,因此本指南无法正常工作. 我可以继续进行操作,直到选择下图所示的结果集为止:

The problem is that now I am using dbeaver for mac and this guide is not working. I can go on until the moment that I select my result set like in the image below:

但是,一旦我进一步进行,在最后一步中,我得到:无需查询

But once I go further in the process, in the last step I get: no query

请注意,在源"中假设显示的是源自结果集的查询,但实际上只显示了选择".

Note that in "source" it was suppose to show the query that originated the result set, but instead it says just "select.

结果是它没有选择我的结果或其他任何内容(除了成功"之外).

As a result it does't select my result or anything (besides being "successful").

通常,我的查询会自动显示在此处,并且我在菜单中找不到可解决此问题的任何选项.

Normally my query would show up there automatically and I couldn't find any option that corrects this problem in the menus.

推荐答案

您不需要使用剪贴板,您可以将整个结果集(不仅仅是看到的内容)直接导出到文件中:

You don't need to use the clipboard, you can export directly the whole resultset (not just what you see) to a file :

  1. 执行查询
  2. 右键单击结果中的任何地方
  3. 单击导出结果集..."以打开导出向导
  4. 选择所需的格式(根据您的问题为CSV)
  5. 单击下一步"时,在接下来的窗格中查看设置. (在我的情况下,无需更改任何内容)
  6. 设置将在其中创建文件的文件夹,然后完成"

导出在后台运行,完成后将显示一个弹出窗口.

The export runs in the background, a popup will appear when it's done.

在较新版本的DBeaver中,您可以:

In newer versions of DBeaver you can just :

  1. 右键单击要导出的查询的SQL
  2. 执行>从查询导出
  3. 选择所需的格式(根据您的问题为CSV)
  4. 单击下一步"时,在接下来的窗格中查看设置. (在我的情况下,无需更改任何内容)
  5. 设置将在其中创建文件的文件夹,然后完成"

导出在后台运行,完成后将显示一个弹出窗口.

The export runs in the background, a popup will appear when it's done.

与以前的导出方式相比,这节省了第一步(执行查询),这对于时间/资源密集型查询很方便.

Compared to the previous way of doing exports, this saves you step 1 (executing the query) which can be handy with time/resource intensive queries.

这篇关于将Dbeaver上的结果集导出为CSV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆