You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the *Export Data Using Query* dialog to copy data to a file.
8
+
9
+
The *Export Data Using Query* dialog organizes the export of data through the
10
+
*General*, *Options* and *Query* tabs.
11
+
12
+
.. image:: images/export_query_general.png
13
+
:alt:Export data using query dialog general tab
14
+
:align:center
15
+
16
+
Use the fields in the *General* tab to specify export preferences:
17
+
18
+
* Enter the name of the target file in the *Filename* field.
19
+
Optionally, select the *Browse* icon (ellipsis) to the right to navigate
20
+
into a directory and select a file.
21
+
22
+
* Use the drop-down listbox in the *Format* field to specify the file type.
23
+
Select:
24
+
25
+
* *binary* for a .bin file.
26
+
* *csv* for a .csv file.
27
+
* *text* for a .txt file.
28
+
29
+
* Use the drop-down listbox in the *Encoding* field to specify the type of
30
+
character encoding.
31
+
32
+
.. image:: images/export_query_options.png
33
+
:alt:Export data using query dialog options tab
34
+
:align:center
35
+
36
+
* Use the fields in the *Options* tab to specify additional information:
37
+
38
+
* Move the *Header* switch to the *Yes* position to include the table header
39
+
with the data rows. If you include the table header, the first row of the
40
+
file will contain the column names.
41
+
* If you are exporting data, specify the delimiter that will separate the
42
+
columns within the target file in the *Delimiter* field. The separating
43
+
character can be a colon, semicolon, a vertical bar, or a tab.
44
+
* Specify a quoting character used in the *Quote* field. Quoting can be
45
+
applied to string columns only (i.e. numeric columns will not be quoted)
46
+
or all columns regardless of data type. The character used for quoting can
47
+
be a single quote or a double quote.
48
+
* Specify a character that should appear before a data character that matches
49
+
the *QUOTE* value in the *Escape* field.
50
+
* Use the *NULL String* field to specify a string that will represent a null
51
+
value within the source or target file.
52
+
53
+
Click the *Query* tab to continue.
54
+
55
+
.. image:: images/export_query.png
56
+
:alt:Export data using query dialog query tab
57
+
:align:center
58
+
59
+
Use the fields in the *Query* tab to write the query that will be exported:
60
+
61
+
* Use the *Export Data Query* field to specifies A SELECT, VALUES, INSERT, UPDATE,
62
+
DELETE, or MERGE command whose results are to be copied .
63
+
64
+
* Use *Force Quote columns* field to forces quoting to be used for all non-NULL
65
+
values in each specified column. NULL output is never quoted. This is a creatable
66
+
select control. If you would like to quote all columns then provide only '*' in
67
+
the field.
68
+
69
+
After completing the *Export Data Using Query* dialog, click the *OK* button to
70
+
perform the export. pgAdmin will notify you when the background
71
+
process completes:
72
+
73
+
.. image:: images/export_query_complete.png
74
+
:alt:Export data using query completion notification
75
+
:align:center
76
+
77
+
78
+
Use the *View Processes* button on the notification to open the *Process
79
+
Watcher* and review detailed information about the execution of the command
80
+
that performed the export:
81
+
82
+
Use the **End Process** button to end the Export process.
83
+
84
+
.. image:: images/export_query_pw.png
85
+
:alt:Export data using query process watcher
86
+
:align:center
87
+
88
+
.. note:: If you are running *pgAdmin* in *Server Mode* you can click on the |sm_icon| icon in the process watcher window to open the file location in the Storage Manager. You can use the :ref:`Storage Manager <storage_manager>` to download the exported file on the client machine .
Copy file name to clipboardExpand all lines: docs/en_US/import_export_data.rst
+32-8
Original file line number
Diff line number
Diff line change
@@ -33,18 +33,29 @@ Use the fields in the *General* tab to specify import and export preferences:
33
33
* Use the drop-down listbox in the *Encoding* field to specify the type of
34
34
character encoding.
35
35
36
+
* use the drop-down listbox in the *On Error* field to specify how to behave
37
+
when encountering an error converting a columns input value into its data type.
38
+
An error_action value of stop means fail the command, while ignore means discard
39
+
the input row and continue with the next one. The default is stop. This option is
40
+
available from PG/EPAS version 17 and above.
41
+
42
+
* use the drop-down listbox in the *Log Verbosity* field to specify the amount
43
+
of messages emitted by a COPY command: default or verbose. This is currently
44
+
used in Import only when ON_ERROR option is set to ignore. This option is
45
+
available from PG/EPAS version 17 and above.
46
+
36
47
.. image:: images/import_export_options.png
37
48
:alt:Import Export data dialog options tab
38
49
:align:center
39
50
40
51
* Use the fields in the *Options* tab to specify additional information:
41
52
42
-
* Move the *OID* switch to the *Yes* position to include the *OID* column.
43
-
The *OID* is a system-assigned value that may not be modified. The default
44
-
is *No*.
45
53
* Move the *Header* switch to the *Yes* position to include the table header
46
54
with the data rows. If you include the table header, the first row of the
47
55
file will contain the column names.
56
+
* Move the *Freeze* switch to the *Yes* position to requests copying the
57
+
data with rows already frozen, just as they would be after running the
58
+
VACUUM FREEZE command.
48
59
* If you are exporting data, specify the delimiter that will separate the
49
60
columns within the target file in the *Delimiter* field. The separating
50
61
character can be a colon, semicolon, a vertical bar, or a tab.
@@ -54,8 +65,11 @@ Use the fields in the *General* tab to specify import and export preferences:
54
65
be a single quote or a double quote.
55
66
* Specify a character that should appear before a data character that matches
56
67
the *QUOTE* value in the *Escape* field.
57
-
* Use the *NULL Strings* field to specify a string that will represent a null
68
+
* Use the *NULL String* field to specify a string that will represent a null
58
69
value within the source or target file.
70
+
* Use the *Default String* field to specify a string that will represent a default value.
71
+
Each time the string is found in the input file, the default value of the corresponding
72
+
column will be used. This option is available from PG/EPAS version 16 and above.
59
73
60
74
Click the *Columns* tab to continue.
61
75
@@ -71,29 +85,39 @@ or exported:
71
85
the left of the column name. Click an empty spot inside the field to access
72
86
the drop-down list.
73
87
88
+
* If enabled, click inside the *Force Quote columns* field to forces quoting
89
+
to be used for all non-NULL values in each specified column. NULL output is
90
+
never quoted. To delete a column, click the *x* to the left of the column name.
91
+
74
92
* If enabled, click inside the *NOT NULL columns* field to select one or more
75
93
columns that will not be checked for a NULL value. To delete a column, click
76
94
the *x* to the left of the column name.
77
95
96
+
* If enabled, click inside the *NULL columns* field to match the specified columns
97
+
values against the null string, even if it has been quoted, and if a match is
98
+
found set the value to NULL. To delete a column, click the *x* to the left of the
99
+
column name.
100
+
78
101
After completing the *Import/Export data* dialog, click the *OK* button to
79
-
perform the import or export. pgAdmin will inform you when the background
102
+
perform the import or export. pgAdmin will notify you when the background
80
103
process completes:
81
104
82
105
.. image:: images/import_export_complete.png
83
106
:alt:Import Export data completion notification
84
107
:align:center
85
108
86
-
Use the **Stop Process** button to stop the Import/Export process.
87
109
88
-
Use the *Click here for details* link on the notification to open the *Process
110
+
Use the *View Processes* button on the notification to open the *Process
89
111
Watcher* and review detailed information about the execution of the command
90
112
that performed the import or export:
91
113
114
+
Use the **End Process** button to end the Import/Export process.
115
+
92
116
.. image:: images/import_export_pw.png
93
117
:alt:Import Export data process watcher
94
118
:align:center
95
119
96
-
.. note:: If you are running *pgAdmin* in *Server Mode* you can click on the |sm_icon| icon in the process watcher window to open the file location in the Storage Manager. You can use the :ref:`Storage Manager <storage_manager>` to download the backup file on the client machine .
120
+
.. note:: If you are running *pgAdmin* in *Server Mode* you can click on the |sm_icon| icon in the process watcher window to open the file location in the Storage Manager. You can use the :ref:`Storage Manager <storage_manager>` to download the exported file on the client machine .
0 commit comments