You add a JDBC data source to CAS Console by specifying connection information, a JDBC driver class, and a SQL query to execute against the database. The data source executes the SQL query against the database, and each row in the result set becomes an Endeca record. Each column in a row becomes an MDEX property on the record.
Before using the JDBC data source, you must install the JDBC driver into CAS. For details, see "Installing a JDBC driver into CAS" in the CAS Developer's Guide.
To add a JDBC data source:
Select JDBC from the list and click Add.
The Data Source tab displays.
In Name, specify a unique name for the data source to distinguish it from other data sources in the CAS Console.
You can create a data source name with alphanumeric characters, underscores, dashes, and periods. All other characters are invalid for a name.
In Driver class, specify the fully qualified Java class name for the JDBC driver.
For example:
com.mysql.jdbc.Driver
In JDBC URL, specify the connection string that includes, at a minimum, the database vendor, the host and port, and the database instance name. If desired, you can also specify the Username and Password as part of the connection string.
For example:
jdbc:mysql://localhost:3306/my_database
Optionally, in Username, specify a valid user account for the data base and then specify a corresponding value for Password.
Optionally, in Connection Properties, specify any additional connection properties that your database may require. Specify properties in the format:
name=value
.For example:
MaxPoolSize=10
If necessary, click Add Another to create additional connection properties.
In SQL/Record Generation, specify a SQL query to execute against the database.
For example:
SELECT * FROM my_table;
In Key Column, specify the name of the column in the database that you want to map to the record ID property in the generated records.
The values of this column must be unique across all records being returned in the result set of the SQL query.
Click Save or select the Advanced Settings tab to continue configuring the data source.
The data source displays Acquisition Steps where you can add manipulators, revise the data source configuration if necessary, or start acquiring data from the data source.
At this point, you can add manipulators, acquire data from the data source, and monitor its status.