Skip to main content
Pentaho Documentation

Add a JDBC Data Source

You may need to obtain database connection information from your system administrator, such as the URL, port number, JDBC connection string, database type, and user credentials.
Follow this procedure to add a standard JDBC data source in Report Designer.
  1. Select the Data tab in the upper right pane. By default, Report Designer starts in the Structure tab, which shares a pane with Data.
  2. Click the yellow cylinder icon in the upper left part of the Data pane, or right-click Data Sets. A drop-down menu with a list of supported data source types appears.
  3. Select JDBC from the drop-down menu. The JDBC Data Source window appears.
  4. If you want to provide parameters that contain different database connection authentication credentials, click the Edit Security button in the upper left corner of the window, then type in the fields or variables that contain the user credentials you want to store as a parameter with this connection. The role, username, and password will be available as a security parameter when you are creating your report.
  5. Above the Connections pane on the left, click the round green + icon to add a new data source. If you installed the Pentaho sample data, several SampleData entries appear in the list. These sample data sources are useless if you do not have the Pentaho HSQLDB sample database installed, so if you don't have that, you can safely delete the SampleData entries. If you do have Pentaho's HSQLDB samples installed, it may be advantageous to leave the sample data sources intact in the event that you want to view the sample reports and charts at a later time.
  6. In the Database Connection dialog, type in a concise but reasonably descriptive name for this connection in the Connection Name field; select your database brand from the Connection Type list; select the access type in the Access list at the bottom; then type in your database connection details into the fields in the Settings section on the right. The Access list changes according to the connection type you select; the settings section will change depending on which item in the access list you choose.
  7. Click the Test button to ensure that the connection settings are correct. If they are not, the ensuing error message should give you some clues as to which settings need to be changed. If the test dialogue says that the connection to the database is OK, then click the OK button to complete the data source configuration.
Now that your data source is configured, you must design or enter an SQL query before you can finish adding the data source. See Create Queries With SQL Query Designer for more details on using SQL Query Designer, or Dynamic Query Scripting for more information on building dynamic queries through scripts.