Creating a Data Source (Simple SQL Designer)

A Data Source is a handle provided for Unified Data Browser that is used to connect to a database table. The Data Source stores SQL commands to select, insert, update, and delete entries in the database table. SELECT configuration is required. Insert, Update, and Delete configurations are optional. Follow these instructions to create a Data Source.

 

To Add a Data Source:

  1. Open the Workbench. Expand your project folder, then the Data Connectivity node, then the Databases node.

  2. Expand your selected data connection. For instance, in the example below, we are adding a data source to the Northwind database found within the SQL Connection node. Right-click the database node, then select Add Data Source, as shown below.

New Data Source Selection

 

-OR-

 

Select your desired database connection then click on the Add Data Source button in the Edit section of the Home ribbon, as shown below.

 

Add Data Source Button

  1. This opens the Data Source properties window, as shown below. Enter a name for your Data Source in the text entry field.

New Data Source

 

The Data Source properties are comprised of three tabs:

Data Selection Tab

Data Selection Command

Configure Command

Clicking the Configure Command link opens the Configure SELECT Command window, shown below.

 

Configure SELECT Command Window - Table Query Command Type Selected

 

Select the query type

Table Query

Select a query

You can then expand the database schemas in order to select desired items (e.g. Tables, Views, etc.) for the query.

 

Click the Next button once you have completed editing these settings. The window will advance to the next panel, shown below.

 

Second Panel of Selected Table Query Command Type

 

Customize the query

Click the Next button once you have completed editing these settings. The window will advance to the next panel, shown below.

 

Third Panel of Selected Table Query Command Type

 

Configure Parameters

Click the Finish button to proceed. You will see the following Warning message.

 

Table Query Command Type Selection Warning

Click the Ok button to proceed. If the provided settings require additional parameters, you will be able to enter them in the Schema Auto Detection - Parameter values required window.

 

If the provided settings did not require any additional parameters, the Data Selection Schema section of the Data Source properties will then be automatically filled according to the SELECT Command settings (as shown below).

 

Data Selection Schema Filled from SELECT Command Settings

 

Custom Query

 

Configure SELECT Command Window - Custom Query Command Type Selected

Create a custom query

Click the Next button once you have completed editing these settings. The window will advance through additional panels, similar to the Custom_Query settings described above.

 

Stored Procedure

 

Configure SELECT Command - Stored Procedure Command Type Selected

Select a query

You can then expand the database schemas in order to select desired items for the query.

 

Click the Next button once you have completed editing these settings. The window will advance to the next panel, shown below.

 

Second Panel of Selected Stored Procedure Command Type

 

Customize the query

Click the Next button once you have completed editing these settings. The window will advance to the next panel, shown below.

 

Third Panel of Selected Table Query Command Type

 

Configure Parameters

Click the Finish button to proceed. If the provided settings require additional parameters, you will be able to enter them in the Schema Auto Detection - Parameter values required window.

 

If the provided settings did not require any additional parameters, the Data Selection Schema section of the Data Source properties will then be automatically filled according to the SELECT Command settings (as shown below).

 

Data Selection Schema Filled from SELECT Command Settings

Advanced Configurator

Clicking the Advanced Configurator link opens the SQL Command Designer window, shown below.

 

SQL Command Designer Window

 

The SQL Command Designer window provides options to add Tables and Columns, Records Grouping, and Records Filtering/Sorting.

 

Click OK once you have completed constructing your command. The Data Selection Schema section of the Data Source properties will then be automatically filled.

Test Command

The Test Command link can be used once a Data Selection Command has been set (either via Table Query, Custom Query, Stored Procedure or via the Advanced Configurator). Clicking the Test Command link at that point opens the "Test the data source configuration Window", shown below.

 

Test the data source configuration Window

Click the Close button to return to the Data Source properties.

Data Selection Schema

Data Modification Tab

The Data Modification Tab allows users to configure INSERT, DELETE and UPDATE commands, in addition to the SELECT command configured on the Data Selection tab of the Data Source properties.

 

Data Modification Tab

Data Modification Options

INSERT

Configure INSERT Command Window - Partially Completed with Prior Settings from the SELECT Command

DELETE

Configure DELETE Command Window - Partially Completed with Prior Settings from the SELECT Command

UPDATE

Configure UPDATE Command Window - Partially Completed with Prior Settings from the SELECT Command

Data Refresh Tab

The Data Refresh tab allows users to set the data refresh mechanism (time period or triggers) properties for the configured Data Source.

 

Data Refresh Tab

Refresh Options

Refresh Triggers

Selecting 'By Triggers' as a Refresh Type activates this section of the tab. Click on the "+ Click here to add new item" link in order to add a new trigger item, where you can enter a Tag Name in the text entry field or click on the button in order to open the Data Browser and navigate to your selected Tag Name.

  1. Click on Apply then Close to save your changes and return to the Tree Explorer, where your new Data Source will appear.

See Also:

Connecting to Open Databases

Creating a Data Item

Creating a Data Manipulator