Creating JDBC (Beta) Input Data Source
JDBC Beta connector is the new version of JDBC connector and is the recommended connector for any new JDBC connectivity for better performance and configuration UI. Just like JDBC connector, it also allows the retrieval and processing of data from virtually any database, that has a JDBC driver.
Steps:
1. In the New Data Source page, select Input > JDBC Beta in the Connector drop-down list.
2. On the Connection tab, set either of the following connection settings:
· URL
Enter the URL specific to the database’s JDBC driver, the Driver Class Name specific to the driver, and the User Id and Password.
Select the Show Characters check box to display the entered characters.
· JNDI Name
Enter the JNDI resource name to be used.
NOTE |
The JNDI resource name needs to be on the form: jdbc/[resourcename] |
3. Adjust the Timeout, if needed. Default is 60.
4. Query definition and execution can be done, using either the query builder or freeform SQL. To use the query builder, select the Query Builder tab. Otherwise, proceed to step 5.
The Use Query Builder option is turned on by default.
4.1. Select the appropriate SQL Dialect in the drop-down list to be able to generate the correct SQL for the required data repository.
4.2. In the Table field, click to populate the drop-down list with tables. Select a table.
The SQL query is generated and displayed in the Preview Query text box.
Also, expanding the Join Tables displays the list of tables that you can join.
Use Search Tables to filter the list.
4.3. Perform a join by checking one or more tables in the list.
You can also opt to select other common fields.
The SQL query is generated and displayed in the Preview Query text box.
4.4. Click . The columns populate the Output Column section.
4.5. Individual columns can be added by selecting the corresponding Column check box in the Output Column listing. To select all of the columns, select the topmost check box.
The SQL query is generated and displayed in the Preview Query text box.
4.6. If the data returned is to be aggregated, then the Aggregate box should be checked. For each selected column, the possible aggregation methods are listed including:
¨ Text Columns: Count, Group By
¨ Date Columns: Count, Group By
¨ Numeric Columns: Sum, Count, Min, Max, Group By
4.7. Select the Parameterize check box and match the parameter to the appropriate column. By default, they will be matched by name.
The appropriate SQL Query is updated in the Preview Query text box.
4.8. If the data is to be filtered or aggregated on Date/Times, then a valid Date Time field needs to be selected from either a single Date/Time field, or a compound column created from a selected Date and a selected Time column.
4.9. Select the Constrain by Date Time check box, and enter From and To Date/Time constraints that are assumed to be in this time zone for incorporation into the query.
If the query is to filter/constrain the results on Date/Time, the constrain sections are completed.
5.. To use freeform SQL, select the SQL tab and turn on Use SQL toggle button.
5.1. Modify the SQL-like query language in the User Query text box.
NOTE |
· If you initially used the Query Builder then switched to the freeform SQL option, the content of Preview Query is copied to the User Query text box.
· Switching back to the Query Builder, the Preview Query is updated, keeping the User Query unmodified. · is enabled when User Query is non-empty and different from Preview Query. Click this button to update the User Query from the query builder. |
6. Select the Advanced tab.
Set the following property, if needed:
Property |
Description |
Use data modification query |
Signals that the table is created for writing data. This property is also used for filtering out target data tables for further data update action configuration |
7. Click . The new data source is added in the Data Sources list.