Created 06-23-2023 07:48 AM
I run NiFi on a docker engine (official image). It works fine but now I would like as part of a flow to connect to a MySQL instance.
This requires me to configure a Database Driver Class Name. The value I found in an example on Internet (com.mysql.jdbc.Driver) requires a .jar (sorry, I know nothing about Java).
What is the proper way to make this file available to NiFi? (not on a docker level - I have a volume mounted and can put is over there, but on a NiFi level, i.e. how to make NiFi aware of this file)
Created on 06-23-2023 09:48 AM - edited 06-23-2023 09:49 AM
@Wpq To enable nifi to use the mysql driver jar, you should copy that jar file into the nifi node file system. Additionally, the file will need to be owned by the same user running nifi. For example: usually the "nifi" user. If you have a multi node cluster, the file should exist in all nodes in the same location. Once you get into nifi UI. Configure a Database Connection Pool Controller Service referencing your driver. When the path and permissions are right, you will be able to enable that Controller Service. Once enabled you can use it with many processors such as ExecuteSQL.
Created on 06-23-2023 09:48 AM - edited 06-23-2023 09:49 AM
@Wpq To enable nifi to use the mysql driver jar, you should copy that jar file into the nifi node file system. Additionally, the file will need to be owned by the same user running nifi. For example: usually the "nifi" user. If you have a multi node cluster, the file should exist in all nodes in the same location. Once you get into nifi UI. Configure a Database Connection Pool Controller Service referencing your driver. When the path and permissions are right, you will be able to enable that Controller Service. Once enabled you can use it with many processors such as ExecuteSQL.
Created 06-23-2023 11:14 AM
@steven-matison thank you! I thought that I needed to somehow inject this jar into NiFi, in addition to providing it.