From 0d96c88768e8d751f4f487f90e883de66c835e1e Mon Sep 17 00:00:00 2001 From: gitea_admin Date: Mon, 12 Oct 2026 02:31:59 +0000 Subject: [PATCH] Add kamelet definition: aws-redshift-sink --- kamelet.json | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 kamelet.json diff --git a/kamelet.json b/kamelet.json new file mode 100644 index 0000000..3a9106f --- /dev/null +++ b/kamelet.json @@ -0,0 +1,174 @@ +{ + "apiVersion": "camel.apache.org/v1", + "kind": "Kamelet", + "metadata": { + "name": "aws-redshift-sink", + "annotations": { + "camel.apache.org/kamelet.support.level": "Stable", + "camel.apache.org/catalog.version": "4.22.1", + "camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxNjE1IDE3ODMuNyIgdmlld0JveD0iMCAwIDE2MTUgMTc4My43IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im04MDcuNSAxMzYzLjggNjc4LjMgMTYxLjV2LTEyNzAuNWwtNjc4LjMgMTYxLjV6IiBmaWxsPSIjMjA1Yjk3Ii8+PHBhdGggZD0ibTE0ODUuOCAyNTQuOCAxMjkuMiA2NC42djExNDEuM2wtMTI5LjIgNjQuNnptLTY3OC4zIDExMDktNjc4LjMgMTYxLjV2LTEyNzAuNWw2NzguMyAxNjEuNXoiIGZpbGw9IiM1MTkzY2UiLz48cGF0aCBkPSJtMTI5LjIgMjU0LjgtMTI5LjIgNjQuNnYxMTQxLjNsMTI5LjIgNjQuNnoiIGZpbGw9IiMyMDViOTciLz48cGF0aCBkPSJtOTc5LjggMTc4My43IDI1OC40LTEyOS4ydi0xNTI1LjNsLTI1OC40LTEyOS4yLTc5IDg0N3oiIGZpbGw9IiM1MTkzY2UiLz48cGF0aCBkPSJtNjM1LjIgMTc4My43LTI1OC40LTEyOS4ydi0xNTI1LjNsMjU4LjQtMTI5LjIgNzkgODQ3eiIgZmlsbD0iIzIwNWI5NyIvPjxwYXRoIGQ9Im02MzUuMiAwaDM0OC4xdjE3ODAuMWgtMzQ4LjF6IiBmaWxsPSIjMmU3M2I3Ii8+PC9zdmc+", + "camel.apache.org/provider": "Apache Software Foundation", + "camel.apache.org/kamelet.group": "AWS Redshift", + "camel.apache.org/kamelet.namespace": "AWS" + }, + "labels": { + "camel.apache.org/kamelet.type": "sink" + } + }, + "spec": { + "definition": { + "title": "AWS Redshift Sink", + "description": "Send data to an AWS Redshift Database. This Kamelet expects a JSON-formatted body. Use key:value pairs to map the JSON fields and parameters.", + "required": [ + "serverName", + "username", + "password", + "query", + "databaseName" + ], + "type": "object", + "properties": { + "serverName": { + "title": "Server Name", + "description": "The server name for the data source.", + "type": "string", + "example": "localhost" + }, + "serverPort": { + "title": "Server Port", + "description": "The server port for the AWS RedShi data source.", + "type": "string", + "default": 5439 + }, + "username": { + "title": "Username", + "description": "The username to access a secured AWS Redshift Database.", + "type": "string", + "x-descriptors": [ + "urn:camel:group:credentials" + ] + }, + "password": { + "title": "Password", + "description": "The password to access a secured AWS Redshift Database.", + "type": "string", + "format": "password", + "x-descriptors": [ + "urn:camel:group:credentials" + ] + }, + "query": { + "title": "Query", + "description": "The query to execute against the AWS Redshift Database.", + "type": "string", + "example": "INSERT INTO accounts (username,city) VALUES (:#username,:#city)" + }, + "databaseName": { + "title": "Database Name", + "description": "The name of the AWS Redshift Database.", + "type": "string" + } + } + }, + "types": { + "in": { + "mediaType": "application/json" + } + }, + "dependencies": [ + "camel:jackson", + "camel:kamelet", + "camel:sql", + "mvn:com.amazon.redshift:redshift-jdbc42:2.2.7", + "mvn:org.apache.commons:commons-dbcp2:2.14.0" + ], + "template": { + "beans": [ + { + "name": "local-sql-redshift-sink", + "type": "#class:org.apache.camel.component.sql.SqlComponent", + "properties": { + "autowiredEnabled": "false" + } + }, + { + "name": "dsBean", + "type": "#class:org.apache.commons.dbcp2.BasicDataSource", + "properties": { + "username": "{{username}}", + "password": "{{password}}", + "url": "jdbc:redshift://{{serverName}}:{{serverPort}}/{{databaseName}}", + "driverClassName": "com.amazon.redshift.jdbc.Driver" + } + } + ], + "from": { + "uri": "kamelet:source", + "steps": [ + { + "unmarshal": { + "json": { + "library": "Jackson" + } + } + }, + { + "to": { + "uri": "{{local-sql-redshift-sink}}:{{query}}", + "parameters": { + "dataSource": "#bean:{{dsBean}}" + } + } + } + ] + } + } + }, + "propertiesSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "AWS Redshift Sink", + "description": "Send data to an AWS Redshift Database. This Kamelet expects a JSON-formatted body. Use key:value pairs to map the JSON fields and parameters.", + "required": [ + "serverName", + "username", + "password", + "query", + "databaseName" + ], + "properties": { + "serverName": { + "type": "string", + "title": "Server Name", + "description": "The server name for the data source." + }, + "serverPort": { + "type": "string", + "title": "Server Port", + "description": "The server port for the AWS RedShi data source.", + "default": 5439 + }, + "username": { + "type": "string", + "title": "Username", + "description": "The username to access a secured AWS Redshift Database." + }, + "password": { + "type": "string", + "title": "Password", + "description": "The password to access a secured AWS Redshift Database.", + "format": "password" + }, + "query": { + "type": "string", + "title": "Query", + "description": "The query to execute against the AWS Redshift Database." + }, + "databaseName": { + "type": "string", + "title": "Database Name", + "description": "The name of the AWS Redshift Database." + } + } + } +} \ No newline at end of file