HCL Commerce Version 9.1.10.0 or later

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

  1. Join the custom connector to your auth.reindexor live.reindex after their auth.reindex - Product Stage 1a (Main Document) and the following auth.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 as auth.reindex or live.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"
                }
            }
        ]
    }
  2. 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.
  3. Build your index.
    POST: https://CommerceServerName​​​:ts-app-port/wcs/resources/admin/index/dataImport/build?connectorId=auth.reindex&storeId=1
    For more information, see Build an index and verify that the profit margin field is indexed.

Results

Your custom SQL connector is now a part of the NiFi pipeline and imports data from the custom fields you specified.

What to do next

After indexing completes, check and ensure your fields are now in the index.
  • 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.