Extending Ingest connectors
HCL Commerce provides default Ingest connectors that perform data ingestion and transformation tasks to ready the data for the search index. You can use them as is or can customize these default Ingest connectors as per your business requirements using the Search Ingest Service API. This topic describes what customizations you can make and how you can manage these customizations and move them across different versions.
Customizations
- Customize the structure of the default Ingest connectors (upgrade)
-
Make structural changes to the default Ingest connectors. A structural change refers to adding or removing pipes (process groups) from the default connectors. For example, adding profit margin pipes to the default auth.reindex connector.
To do the structural change:- 1. Get the full connector descriptor JSON of the specific
connector using the endpoint,
GET /connector/{connectorID}
Note: You an also retriever the full connector descriptor JSON of the specific connector from the Ingest container, profile/apps/search-ingest.ear/search-ingest.war/WEB-INF/classes/deployments - After retrieving the full JSON, copy the full descriptor into a new file and edit the structure as per your requirements.
- Use Upgrade API with the full connector descriptor (ConnectorDescriptorJson) having the structural change.
- 1. Get the full connector descriptor JSON of the specific
connector using the endpoint,
- Customize property and configuration of the default/existing components (update)
- Make properties and configuration changes to the process groups,
processors, connections, and controller services. To make these changes, place the
update descriptor JSON file inside the container in the folder
(/profile/apps/search-ingest.ear/search-ingest.war/WEB-INF/classes/deployments/customization).
Based on this, the Search Ingest Service API automatically runs the Update API with
this update descriptor JSON provided for customizing the properties and configuration of the
default Ingest connectors.Note: For more information about creating an update descriptor JSON, refer to Updating NiFi process group, processor, controller service using Ingest connector descriptor
Manage customizations
- Upgrade JSON body or the Update JSON body depending upon the customizations you make
(structure change or configuration and property change). Note: Upgrade API can also perform Update API functionality.
- To Update the API, ensure that the pipe and the property exist in the process group, processor, connection, and controller service.
- To Upgrade the API, ensure that the pipe is added to Registry.
If the Upgrade API was executed with queued data or Ingest Service processes running and the NiFi UI Status Bar indicates invalid components, the Upgrade process will fail. The queue must be cleared by locating the Process Groups in the pipeline that has queued flowfile data. Stop the Process Groups that have queued data. For more information, see Stopping a component.
/connectors/auth.reindex/upgrade
Move customizations across versions
Kubernetes Deployment
The deployment script checks the version of the NiFi images. If it matches, then Nifi PV is not deleted. If it does not match then, NiFi PV is cleared out. When the PV is cleared out, all customizations done on the previous version are also cleared out.
- Any customizations related to structure need to be done manually again by following the process mentioned in the Customizations section.
- Any customizations related to property and configuration can be done
automatically using Ingest:
- Start Ingest docker service.
- Move the update descriptor JSON inside the container, /profile/apps/search-ingest.ear/search-ingest.war/WEB-INF/classes/deployments/customization
- Commit the container to create a custom image.
- Use the normal deployment script with a custom Ingest image tag.