{ "apiVersion": "camel.apache.org/v1", "kind": "Kamelet", "metadata": { "name": "databricks-sink", "annotations": { "camel.apache.org/kamelet.support.level": "Preview", "camel.apache.org/catalog.version": "4.22.1", "camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MCA0MCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIj4KICA8cGF0aCBmaWxsPSIjRkYzNjIxIiBkPSJNMjAgMEw0MCA4LjI3VjEzLjFMMjAgMjAuNUwwIDEzLjFWOC4yN0wyMCAwWiIvPgogIDxwYXRoIGZpbGw9IiNGRjM2MjEiIGQ9Ik0wIDEzLjFMMjAgMjAuNVYyNi45TDAgMTkuNVYxMy4xWiIvPgogIDxwYXRoIGZpbGw9IiNGRjM2MjEiIGQ9Ik00MCAxMy4xTDIwIDIwLjVWMjYuOUw0MCAxOS41VjEzLjFaIi8+CiAgPHBhdGggZmlsbD0iI0ZGMzYyMSIgZD0iTTAgMTkuNUwyMCAyNi45VjMzLjNMMCAyNS45VjE5LjVaIi8+CiAgPHBhdGggZmlsbD0iI0ZGMzYyMSIgZD0iTTQwIDE5LjVMMjAgMjYuOVYzMy4zTDQwIDI1LjlWMTkuNVoiLz4KICA8cGF0aCBmaWxsPSIjRkYzNjIxIiBkPSJNMCAyNS45TDIwIDMzLjNWNDBMMCAzMi42VjI1LjlaIi8+CiAgPHBhdGggZmlsbD0iI0ZGMzYyMSIgZD0iTTQwIDI1LjlMMjAgMzMuM1Y0MEw0MCAzMi42VjI1LjlaIi8+Cjwvc3ZnPgo=", "camel.apache.org/provider": "Apache Software Foundation", "camel.apache.org/kamelet.group": "SQL", "camel.apache.org/kamelet.namespace": "Database" }, "labels": { "camel.apache.org/kamelet.type": "sink" } }, "spec": { "definition": { "title": "Databricks Sink", "description": "Send data to a Databricks Database. This Kamelet expects a JSON-formatted body. Use key:value pairs to map the JSON fields and parameters. For Unity Catalog workspaces, specify catalog and schema parameters.", "required": [ "serverHostname", "httpPath", "accessToken", "query" ], "type": "object", "properties": { "serverHostname": { "title": "Server Hostname", "description": "The Databricks server hostname.", "type": "string", "example": "adb-1234567890123456.7.azuredatabricks.net" }, "serverPort": { "title": "Server Port", "description": "The server port for the Databricks data source.", "type": "string", "default": 443 }, "httpPath": { "title": "HTTP Path", "description": "The HTTP path to the Databricks SQL Warehouse or cluster.", "type": "string", "example": "/sql/1.0/warehouses/abc123def456" }, "accessToken": { "title": "Access Token", "description": "The personal access token to access Databricks.", "type": "string", "format": "password", "x-descriptors": [ "urn:camel:group:credentials" ] }, "query": { "title": "Query", "description": "The query to execute against the Databricks Database.", "type": "string", "example": "INSERT INTO accounts (username,city) VALUES (:#username,:#city)" }, "extraOptions": { "title": "Extra Options", "description": "Additional JDBC connection options (e.g., ConnCatalog=main;ConnSchema=default).", "type": "string", "default": "" } } }, "types": { "in": { "mediaType": "application/json" } }, "dependencies": [ "camel:jackson", "camel:kamelet", "camel:sql", "mvn:com.databricks:databricks-jdbc:3.4.2", "mvn:org.apache.commons:commons-dbcp2:2.14.0" ], "template": { "beans": [ { "name": "local-sql-databricks-sink", "type": "#class:org.apache.camel.component.sql.SqlComponent", "properties": { "autowiredEnabled": "false" } }, { "name": "dsBean", "type": "#class:org.apache.commons.dbcp2.BasicDataSource", "properties": { "password": "{{accessToken}}", "url": "jdbc:databricks://{{serverHostname}}:{{serverPort}};httpPath={{httpPath}};AuthMech=3;transportMode=http;ssl=1;UID=token;PWD={{accessToken}}{{extraOptions}}", "driverClassName": "com.databricks.client.jdbc.Driver" } } ], "from": { "uri": "kamelet:source", "steps": [ { "unmarshal": { "json": { "library": "Jackson" } } }, { "to": { "uri": "{{local-sql-databricks-sink}}:{{query}}", "parameters": { "dataSource": "#bean:{{dsBean}}" } } } ] } } }, "propertiesSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "Databricks Sink", "description": "Send data to a Databricks Database. This Kamelet expects a JSON-formatted body. Use key:value pairs to map the JSON fields and parameters. For Unity Catalog workspaces, specify catalog and schema parameters.", "required": [ "serverHostname", "httpPath", "accessToken", "query" ], "properties": { "serverHostname": { "type": "string", "title": "Server Hostname", "description": "The Databricks server hostname." }, "serverPort": { "type": "string", "title": "Server Port", "description": "The server port for the Databricks data source.", "default": 443 }, "httpPath": { "type": "string", "title": "HTTP Path", "description": "The HTTP path to the Databricks SQL Warehouse or cluster." }, "accessToken": { "type": "string", "title": "Access Token", "description": "The personal access token to access Databricks.", "format": "password" }, "query": { "type": "string", "title": "Query", "description": "The query to execute against the Databricks Database." }, "extraOptions": { "type": "string", "title": "Extra Options", "description": "Additional JDBC connection options (e.g., ConnCatalog=main;ConnSchema=default).", "default": "" } } } }