[sql] Export result set on Dbeaver to CSV

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

  • Run my query --> select the result --> export the result set --> select export to clipboard --> done

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

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:

exporting data set

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.

This question is related to sql csv dbeaver

The answer is


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

  1. Execute your query
  2. Right click any anywhere in the results
  3. click "Export resultset..." to open the export wizard
  4. Choose the format you want (CSV according to your question)
  5. Review the settings in the next panes when clicking "Next".
  6. Set the folder where the file will be created, and "Finish"

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


In newer versions of DBeaver you can just :

  1. right click the SQL of the query you want to export
  2. Execute > Export from query
  3. Choose the format you want (CSV according to your question)
  4. Review the settings in the next panes when clicking "Next".
  5. Set the folder where the file will be created, and "Finish"

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.


The problem was the box "open new connection" that was checked. So I couldn't use my temporary table.


Is there a reason you couldn't select your results and right click and choose Advanced Copy -> Advanced Copy? I'm on a Mac and this is how I always copy results to the clipboard for pasting.


Questions with sql tag:

Passing multiple values for same variable in stored procedure SQL permissions for roles Generic XSLT Search and Replace template Access And/Or exclusions Pyspark: Filter dataframe based on multiple conditions Subtracting 1 day from a timestamp date PYODBC--Data source name not found and no default driver specified select rows in sql with latest date for each ID repeated multiple times ALTER TABLE DROP COLUMN failed because one or more objects access this column Create Local SQL Server database Export result set on Dbeaver to CSV How to create temp table using Create statement in SQL Server? SQL Query Where Date = Today Minus 7 Days How do I pass a list as a parameter in a stored procedure? #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’ MySQL Error: : 'Access denied for user 'root'@'localhost' SQL Server IF EXISTS THEN 1 ELSE 2 How to add a boolean datatype column to an existing table in sql? Presto SQL - Converting a date string to date format What is the meaning of <> in mysql query? Change Date Format(DD/MM/YYYY) in SQL SELECT Statement Convert timestamp to date in Oracle SQL #1292 - Incorrect date value: '0000-00-00' Postgresql tables exists, but getting "relation does not exist" when querying SQL query to check if a name begins and ends with a vowel Find the number of employees in each department - SQL Oracle Error in MySQL when setting default value for DATE or DATETIME Drop view if exists Could not find server 'server name' in sys.servers. SQL Server 2014 How to create a Date in SQL Server given the Day, Month and Year as Integers TypeError: tuple indices must be integers, not str Select Rows with id having even number SELECT list is not in GROUP BY clause and contains nonaggregated column IN vs ANY operator in PostgreSQL How to insert date values into table Error related to only_full_group_by when executing a query in MySql How to select the first row of each group? Connecting to Microsoft SQL server using Python eloquent laravel: How to get a row count from a ->get() How to execute raw queries with Laravel 5.1? In Oracle SQL: How do you insert the current date + time into a table? Extract number from string with Oracle function Rebuild all indexes in a Database SQL: Two select statements in one query DB2 SQL error sqlcode=-104 sqlstate=42601 What difference between the DATE, TIME, DATETIME, and TIMESTAMP Types How to run .sql file in Oracle SQL developer tool to import database? Concatenate columns in Apache Spark DataFrame How Stuff and 'For Xml Path' work in SQL Server? Fatal error: Call to a member function query() on null

Questions with csv tag:

Pandas: ValueError: cannot convert float NaN to integer Export result set on Dbeaver to CSV Convert txt to csv python script How to import an Excel file into SQL Server? "CSV file does not exist" for a filename with embedded quotes Save Dataframe to csv directly to s3 Python Data-frame Object has no Attribute (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape How to write to a CSV line by line? How to check encoding of a CSV file Excel: macro to export worksheet as CSV file without leaving my current Excel sheet How to get rid of "Unnamed: 0" column in a pandas DataFrame? Key error when selecting columns in pandas dataframe after read_csv Use python requests to download CSV ValueError: not enough values to unpack (expected 11, got 1) TypeError: a bytes-like object is required, not 'str' in python and CSV How to add header row to a pandas DataFrame TypeError: list indices must be integers or slices, not str Pandas read_csv from url Write single CSV file using spark-csv Encoding Error in Panda read_csv Java - Writing strings to a CSV file Deleting rows with Python in a CSV file How to convert dataframe into time series? Load CSV file with Spark IndexError: too many indices for array How do I skip a header from CSV files in Spark? Error in file(file, "rt") : cannot open the connection Printing column separated by comma using Awk command line What does the error "arguments imply differing number of rows: x, y" mean? Read specific columns with pandas or other python module How do I read a large csv file with pandas? Pandas df.to_csv("file.csv" encode="utf-8") still gives trash characters for minus sign Adding double quote delimiters into csv file Writing .csv files from C++ Python import csv to list What does the "More Columns than Column Names" error mean? Adding a newline character within a cell (CSV) Python Pandas: How to read only first n rows of CSV files in? Maximum number of rows of CSV data in excel sheet Parsing a CSV file using NodeJS Download a file from HTTPS using download.file() Create Pandas DataFrame from a string Calculate summary statistics of columns in dataframe datetime dtypes in pandas read_csv Import multiple csv files into pandas and concatenate into one DataFrame How to avoid Python/Pandas creating an index in a saved csv? How to split CSV files as per number of rows specified? Skip rows during csv import pandas Batch file to split .csv file

Questions with dbeaver tag:

Export result set on Dbeaver to CSV