Thursday, April 23, 2020

Lucidworks Fusion: JDBC Connector to connect to MySQL database

Configure Lucidworks Fusion's JDBC Connector to connect to locally installed MySQL database

Steps

1. Make sure a local database is running on your local machine by connecting to MySQL workbench and some database is configured. An example database that I have configured is chinook db, steps to configure it is in one of the blog posts.

2. Download driver from mysql website
https://dev.mysql.com/downloads/connector/j/
choose "platform independent" and unzip the downloaded zip/tar.gz

3. Upload this jar file to fusion blob storage as JDBC driver

4. Configure datasource with following configurations.

5. Save



Datasource configuration

{"id": "chinook_db_ds","created": "2020-04-24T03:06:35.578Z","modified": "2020-04-24T03:06:35.578Z","connector": "lucid.jdbc","type": "jdbc","pipeline": "SiePlmPoc","properties": {"commit_on_finish": true,"collection": "SiePlmPoc","url": "jdbc:mysql://localhost:3306/Chinook?useLegacyDatetimeCode=false&serverTimezone=UTC","initial_mapping": {"mappings": [],"skip": false,"id": "FromMap","type": "field-mapping","reservedFieldsMappingAllowed": false},"convert_type": true,"password": "xXx-Redacted-xXx","driver": "com.mysql.cj.jdbc.Driver","verify_access": true,"clean_in_full_import_mode": true,"max_docs": -1,"sql_select_statement": "select * from track","username": "root"}}