Adding custom SQL files in NiFi
You can add custom SQL files in NiFi using the NiFi toolkit and a custom NAR file.
Before you begin
Ensure that you have the NiFi toolkit installed and correctly configured for your
environment. In addition, ensure that you have installed and configured the
HCL_Commerce_Search_Bundle
project on your local machine. This
process is described in detail in steps 1 to 7 of Custom NiFi processors.
Procedure
- Create the following directory structure:
-
Add your custom SQL files inside the custom folder. The
naming convention for such custom SQL files is to use the prefix
X_
followed by the name of the SQL file. For example, you could create a file named X_DatabaseProductStage1a. - Build a custom NAR file by following steps 1 and 2 of Building and deploying a custom NAR file.
- Deploy the custom NAR file by following steps 3 and 4 in the same topic.
-
Once the custom NAR file is deployed, modify the value of the SQL location for
the respective process group and point it to the new SQL file.
The value of the SQL location variable in ProductStage1a will change from sql/DatabaseProductStage1a.sql to sql/custom/X_DatabaseProductStage1a.sql.