Create a Simple Diagram

Top Previous Topic Next Topic  Print this topic

In this example, Data Architect will be used to retrieve records from a database.

To accomplish this, follow the steps below:

 

XML Output

1. Connecting to the database

2. Inserting a table data source

3. Mapping the table data to output fields

4. Viewing the output

 

Excel Output

To generate Microsoft Excel output, the CTRL + N keys must be pressed and the Excel Document Output option selected. Then, the steps presented below must be followed.

 


 

Step 1: Connecting to the database

Note:

This step is required only if a suitable connection is not already configured in the Data Connections bar.

The Add Data Connection button add_data_connection_button, located in the Data Connections dialog bar must be selected, in order to display the Add Connection dialog, where the connection options can be set.

The Connection Name, Provider Type and File Path are mandatory. Also, the User Name and Password fields must be provided if the Database requires them.

 

tablesample1

 

For this example, a Microsoft SQL Server File, located in "C:\Users\Public\Documents\Ecrion\Data Aggregation Server 2013\Samples\Database Samples" folder will be used.

 

 

 

Step 2: Inserting a table data source

 

To insert a data source table, the table must be dragged from the Data Connections dialog bar and dropped on the designed working space. An alternative would be to select the Table button, located in the Database group, under the Home tab, and select the table (or view) from which data will be aggregated.

These actions will display the Insert Datasource dialog.

By default, all table columns are selected for insertion, but the user can choose which columns will be used by leaving them unchecked.

 

example1-0

 

For this example, only the Emp table will be used. After selecting the OK button, a new object, representing the customized table, will be inserted into the document.

 

 

example1-1

 

Step 3: Mapping the table data to output fields

 

In the newly added table element, a connection must be created between the table and the output, by clicking and dragging a line from the arrow corresponding to the "Table: Emp" element to the "ns:root" element located in the "Xml Output" element.

 

A "ns:dbo.emp" element should be displayed in the "Xml Output" element as a child of "ns:root". This way, the Emp table has been connected to an element sequence named "ns:dbo.emp".

 

Next, each arrow corresponding to the "FIRST_NAME" and "LAST_NAME" fields must be dragged onto the "ns:dbo.emp" element. Two new attributes will be automatically created by Data Architect, with the names of the corresponding field.

 

 

 

example1-2

 

Step 4: Viewing the output

 

To view the output, the user must access the Output View. The following XML will be displayed:

 

 

       <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

       <ns:root xmlns:ns="http://www.tempuri.org/XML">

               <ns:dbo.emp last-name="Brown" first-name="John"/>

               <ns:dbo.emp last-name="Jane" first-name="Mary"/>

               <ns:dbo.emp last-name="Clark" first-name="Arthur"/>

       </ns:root>