Assign JDBC data source
You can assign a JDBC data source to a dashboard component.
If you have defined one or more input parameters for the selected component the
Insert input parameter button is available for the
JDBC operator. By clicking the button you can insert a defined input parameter at the cursor position. Click on the inserted parameter for more options. See
Create Input Parameters.
Procedure
2. Click the JDBC button in the Add a data source area.
3. Select a JDBC database connection in the Data Source drop-down menu.
4. If required, you can upload XML files to the MashZone NextGen Repository. For this, click on Upload a file to open the File Resources administration area of the Admin Console.
To upload a file to the MashZone NextGen Repository administration privileges are required.
If you use an absolute URL, e.g. http://anyhost:8080/presto/files/admin_xml?1454486242000, then an authentication has to be set. All requests to the uploaded file will be made with the specified user / password combination.
If you us a relative URL, e.g. /presto/files/admin_xml?1454486242000, then an authentication is not required. All requests to the uploaded file will be made with the current logged in user.
In some cases, it might be necessary to grant view permission for a user. This can be done with the API console, e.g.:
{
"version":"1.1",
"sid":"PolicyService",
"svcVersion":"0.1",
"oid":"addPermissions",
"params":[
"fileName","type.entity.file","VIEW",
[{"principalId":"userID","principalTypeId":"User"}]]
}
fileName is the name that was specified while uploading the file.
userID is the id of the user, who should get the permission.
5. Click on the Refresh Rate icon and select a refresh rate in the drop-down menu. The Refresh Rate specifies the time until the source file is read in again. Default value is 30 sec. 6. You can optionally add HTTP headers to the URL. Click HTTP Headers and select a header in the drop-down menu and insert a parameter in the input field.
7. You can optionally add a HTTP basic access authentication or you can use an existing authentication defined in the MashZone NextGen administration. Click Authentication and enter a user name in the User input box. Enter the Password of the user and click Save Changes.
8. Enter a SQL query.
To have access to columns of the table it is necessary to add a SQL query command in the SQL Query input field, e. g. SELECT * FROM <table name>.
9. Click Next.
The data source is assigned to the selected dashboard component.
You can display a preview of the source data. Click the
Calculate peview icon of the operator.
In addition to the data source operator you can add further operators to transform the source data. See
Data transformation operators for details.