Integrating your custom connector into an existing pipeline in NiFi
In the final step of the tutorial, you integrate your new custom connector into an existing NiFi pipeline.
Procedure
-
Join the custom connector to your
auth.reindex
orlive.reindex
after theirauth.reindex - Product Stage 1a (Main Document)
and the followingauth.reindex - WaitLink - Product Stage 1a
. For more information, see Configure the connector in NiFi. https://help.hcltechsw.com/commerce/9.1.0/tutorials/tutorial/tsd_connectorconfigure_elastic.html)Where possible, use a Split Link pipe to call your custom connector from an existing default connector, such asauth.reindex
orlive.reindex
. For more information, see Split Link. Here is a code snippet that can be used to be added to the existing default connector to launch your custom connector:{ "name": "SplitLink", "label": "SplitLink - Custom Connector", "properties": [ { "name": "split.connector.name", "value": "auth.xfields", "scope": { "name": "Launch Connector", "type": "PROCESS_GROUP" } } ] }
- Ensure that you start all process groups. At the top level view of all pipelines (“NiFi Flow”) in the NiFi user interface, you can click the play button in the Operate box on the left side of the NiFi workspace canvas to start all pipeline process groups.
-
Build your index.
For more information, see Build an index and verify that the profit margin field is indexed.POST: https://CommerceServerName:ts-app-port/wcs/resources/admin/index/dataImport/build?connectorId=auth.reindex&storeId=1
Results
What to do next
- To list all indexes:
http://ElasticSearchServerName/IP:30200/_cat/indices?v
- To view your updated index:
http://ElasticSearchServerName/IP:30200/auth.storeId.product/_search?q=id.product=catentryId
- Test that your fields are returned using the Query service REST API.