Import Table Content as XML Document
The steps for importing the data from a relational database table are the
following:
-
Go to menu
Clicking this action opens a dialog box with all the defined database connections:
Figure: Select Database Table Dialog Box
-
Select the connection to the database that contains the data.
Only connections configured in relational data sources can be used to import
data.
-
If you want to edit, delete, or add a data source or connection, click on the
Configure Database Sources button.
The Preferences/Data Sources
option page is opened.
-
Click Connect.
-
From the catalogs list, click on a schema and choose the required table.
-
Click the OK button.
The Import Criteria dialog box opens with a default query string
in the SQL Query pane:
Figure: Import from Database Criteria Dialog Box
The dialog box contains the following options:
-
Click the SQL Preview button.
The SQL Query string is editable. You can specify which fields
are considered.
Use aliases if the following statements are true:
- the query string represents a join operation of two or more tables
- columns that are selected from different tables have the same name
The use of aliases avoids the confusion of two columns being mapped to the same name in
the result document of the importing operation.
select s.subcat_id,
s.nr as s_nr,
s.name,
q.q_id,
q.nr as q_nr,
q.q_text
from faq.subcategory s,
faq.question q
where ...
The input data is displayed in tabular form in the Settings pane. The
XML Import Preview pane contains an example of what the generated
XML looks like.