RubyMine 7.0.4 Help

Data Extractors dialog

To access this dialog:

  • From the Table Editor or the Result tab of the Database console:
    Click the Data Extractor button DataExtractorButton, then properties Configure Extractors.
  • From the Database tool window:
    Right-click the table or view of interest, select Save To File, then properties Configure Extractors.

Use this dialog to manage data extractors and their settings.

A data extractor is a named set of settings that define how to convert table data into CSV, TSV and other formats.

Data extractors are applied when table data are copied to the clipboard or saved in a file.

Note that for certain formats (CSV, TSV, HTML and custom formats), it may be useful to define more than one data extractor - each with different settings.

When you select an extractor in the list, you can view and edit the extractor settings in the area to the right.

Use add (Alt+Insert), delete (Alt+Delete), arrowUp (Alt+Up) and arrowDown (Alt+Down) to create, delete, and reorder the extractors.

Item Description
List of data extractors and examples
See an example for: Initially, each item in the list corresponds to a different target format. Format names are self-explanatory. Below, each of the formats is illustrated with an example. To generate the examples, the following table was used as a source.

Where appropriate, the Include columns names option was on, while the Include row numbers option was off.

Comma-separated Values (CSV)
id,name 1,George 2,Gordon
Tab-separated Values (TSV)
id name 1 George 2 Gordon
HTML Table
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <table border="1" style="border-collapse:collapse"> <tr><th>id</th><th>name</th></tr> <tr><td>1</td><td>George</td></tr> <tr><td>2</td><td>Gordon</td></tr></table> </body> </html>
SQL Insert Statements
INSERT INTO test.byron_names (id, name) VALUES (1, 'George'); INSERT INTO test.byron_names (id, name) VALUES (2, 'Gordon');
SQL Update Statements
UPDATE test.byron_names SET id = 1, name = 'George' WHERE id = 1; UPDATE test.byron_names SET id = 2, name = 'Gordon' WHERE id = 2;
<?xml version="1.0" encoding="UTF-8"?> <data> <row> <id>1</id> <name>George</name> </row> <row> <id>2</id> <name>Gordon</name> </row> </data>
[, { "id": 1, "name": "George" }, { "id": 2, "name": "Gordon" } ]
Custom-separated Values
|| id | name || || 1 | George || || 2 | Gordon ||

When generating this example the following settings were used (\t stands for a tab character, \n - for a new line):

Value separator: \t|\t    Line separator: \n

Line prefix: ||\t    Line suffix: \t||

Value quotation: " and "

Value quotation policy: As needed

Initially, there are no custom formats. To add one, click add and select Custom-separated Values.

Extractor settings
Title The name of the extractor. Corresponds to the name of the option in corresponding menus.
Include column names Select this check box if you want the column names to be included.
Include row numbers Select this check box if you want the row numbers to be included.
Allow transposition For CSV, TSV, HTML and custom formats: this setting defines how selected range of cells is copied to the clipboard.

If a table is shown transposed, and you copy a range of cells to the clipboard (Ctrl+C), the range is copied transposed (as shown) if the check box is selected, and non-transposed (as in the original table) otherwise.

Value / line separator For custom formats: a character or characters to be inserted between the values and at the end of a line (a table row).
Line prefix / suffix For custom formats: a character or characters to be added at the beginning and the end of a line (a table row). The suffix is inserted before the line separator.
Value quotation For custom formats: a character or characters to be added before and after a value.
Value quotation policy For custom formats: specify conditions for value quotation:
  • Always. All the values are quoted.
  • As needed. A value is quoted only if it contains Unicode whitespace characters and/or value separators.

See Also

Last modified: 4 February 2015
comments powered by Disqus