Create a connector using Ingest
In this lesson, you create a connector using Ingest.
Before you start this step, you must complete the prerequisite step to Load cost price list.
Creating a connector in NiFi for the runtime environment
Note:
- This lesson creates a connector with the name "custom.auth". Ensure that you replace the name "custom.auth" with the required connector name.
- If you are connecting to the database for the production or live environment, replace “AUTH” with “LIVE" in the code.
To create a connector in Ingest service, use the following API:
http://ElasticSearchHostname/IP:30800/swagger-ui/index.html?url=/v3/api-docs&validatorUrl=#/Connector%20Configuration/createConnector
Complete the following steps to create the connector in the runtime environment:
- From the Swagger user interface, navigate to the API.
- Click Try it out.
- For the API body, use the code provided.
- Click Execute.
{
"name":"custom.auth",
"description":"This is the connector for the custom processing",
"pipes":[
{
"name":"ProfitMarginSchemaUpdateConnector"
},
{
"name":"ProfitMarginDatabaseConnectorPipe",
"properties":[
{
"name":"Database Driver Location(s)",
"value":"${AUTH_JDBC_DRIVER_LOCATION}",
"scope":{
"name":"Database Connection Pool",
"type":"CONTROLLER_SERVICE"
}
},
{
"name":"Database Driver Class Name ",
"value":"${AUTH_JDBC_DRIVER_CLASSNAME}",
"scope":{
"name":"Database Connection Pool",
"type":"CONTROLLER_SERVICE"
}
},
{
"name":"Database Connection URL",
"value":"${AUTH_JDBC_URL}",
"scope":{
"name":"Database Connection Pool",
"type":"CONTROLLER_SERVICE"
}
},
{
"name":"Database User",
"value":"${AUTH_JDBC_USER_NAME}",
"scope":{
"name":"Database Connection Pool",
"type":"CONTROLLER_SERVICE"
}
},
{
"name":"Password",
"value":"${AUTH_JDBC_USER_PASSWORD}",
"scope":{
"name":"Database Connection Pool",
"type":"CONTROLLER_SERVICE"
}
}
]
}
]
}