Get data from a database view
Create a database query to get data from a database view.
-
On the properties panel of the
Data access activity, click
Configure.
The Data access configuration - <Activity name> dialog box is displayed.
-
You can select one of the following for
Database connection.
-
Local (Default): Select the process or server variable to specify the database connection string that holds the details of the relational database.
-
External: To use the database connection from external storage, enter the secret name for the connection secret stored in the configured external storage.
By default, the Tables option is selected and all tables within the selected database are available on the Tables list.
-
- On the Type list, select Views.
- On the Views list, select the view to retrieve records for. All existing views are listed and all the columns for the views appear under Available columns.
- On the Available columns list, select the columns to add records to and click .
-
To get the records for the selected view, select one of the following options on the
Return list.
Option Description Multiple rows
Retrieves multiple rows.
-
Map the Return result set to output parameter to the dynamic complex variable.
-
Map the Return row count to output parameter to the long variable.
Single row
Returns a single row. (Default: Single row)
Use aggregate
Retrieves the minimum and maximum values and the row count.
-
To retrieve the minimum value of a column, select Min value for the column, and on the Output min value to list, select the variable that holds the minimum value.
-
To retrieve the maximum value of a column, select Max value for that column, and on the Output max value to list, select the variable that holds the maximum value.
-
To get the count of rows within a table, select Count rows and on the Return row count to list select the variable that holds the count of rows.
-
You must map all the output parameters with the relevant variables.
-
ODBC and OLEDB do not support xml data type.
-
- Configure the query in the same way as for retrieving a table. See Get records from a database table.
- Click OK.