Previous Next JavaScript must be enabled to correctly display this content

## 5.1.6 Unloading Data

Use the Unload Data page to export the contents of a table to a text file or XML document.

- Unloading a Text File
  Use the Unload Data wizard to export the contents of a table to a text file. For example, you could export an entire table to a comma-delimited file (.csv).
- Unloading to an XML Document
  Use the Unload Data wizard to export the contents of a table to an XML document adhering to the Canonical XML specification.

See Also:

Import, Export, Load, and Unload Options

Parent topic: Using Data Workshop

### 5.1.6.1 Unloading a Text File

Use the Unload Data wizard to export the contents of a table to a text file. For example, you could export an entire table to a comma-delimited file (.csv).

To unload a table to a text file:

1. On the Workspace home page, click the SQL Workshop icon.
2. Click Utilities.
3. Click Data Workshop.
4. Under Get Started, click Unload Data.

   The Unload Data Wizard appears.

5. Select Text Format and click Next.

   The Unload to Text - Columns appears.

6. On Unload Text - Columns, edit the following:
   1. Schema - Select the database schema that owns the object you would like to export.
   2. Table - Select the database table you would like export to a plain text format.
   3. Columns - Highlight the columns you would like to be part of this plain text file. Only Oracle built in data types except BLOB and BFILE are supported to unload.
   4. Where Clause - Enter SQL `WHERE` clause to limit the rows that are selected. For example: `DEPTNO = 10`
   5. Click Next.
7. For Options, enter the following:
   1. Separator - Specify the type of separator used to separate the column values on each line. The default value is a comma (,). To use a tab as a column separator, enter a backslash followed by the letter "t" ().
   2. Optionally Enclosed By - Use this option to specify how to identify text strings in a column. You can specify single or double quotation marks.
   3. Include Column Names - Check this box to include the name of each column in the text file.
   4. File Format - Select DOS to have the lines in the resulting file terminated by carriage returns and line feeds. Select UNIX to have the lines in the resulting file contain terminated by line feeds.
   5. File Character Set - Select the character set to encode the export file.
8. Click Unload Data.

   The file is downloaded.

Parent topic: Unloading Data

### 5.1.6.2 Unloading to an XML Document

Use the Unload Data wizard to export the contents of a table to an XML document adhering to the Canonical XML specification.

To unload a table to an XML document:

1. On the Workspace home page, click the Utilities icon.
2. Click Data Workshop.
3. Under data Unload, click to XML.
   The Unload to XML Wizard appears.
4. Under Get Started, click Unload Data.
   The Unload Data Wizard appears.
5. Select XML Format and click Next.
   The Unload to XML - Columns appears.
6. Select the appropriate schema.
7. Select the table to unload.
8. Highlight the columns to include.
9. (Optional) Enter a Where clause to limit the records unloaded, and click Unload Data.
   The File Download window appears.
10. Click Save to download the file.

Parent topic: Unloading Data