- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to use a MySQL connector in a dockerized instance of NiFi?
- Labels:
-
Apache NiFi
Created ‎06-23-2023 07:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@steven-matison thank you! I thought that I needed to somehow inject this jar into NiFi, in addition to providing it.
