kamelets.sqlserver-sink.kamelet.yaml Maven / Gradle / Ivy
The newest version!
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1
kind: Kamelet
metadata:
name: sqlserver-sink
annotations:
camel.apache.org/kamelet.support.level: "Stable"
camel.apache.org/catalog.version: "4.8.0"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gU3ZnIFZlY3RvciBJY29ucyA6IGh0dHA6Ly93d3cub25saW5ld2ViZm9udHMuY29tL2ljb24gLS0+DQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPG1ldGFkYXRhPiBTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3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0xMzEuNUM1NDQuNyw3NjAuMiwzNjYuMyw4MzIuMiwzNjYuMyw4MzIuMkwzNjYuMyw4MzIuMnoiLz48L2c+DQo8L3N2Zz4="
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: "Microsoft SQL Server Sink"
description: |-
Send data to a Microsoft SQL Server Database.
In your Pipe file, you must explicitly declare the SQL Server driver dependency in spec->integration->dependencies
- "mvn:com.microsoft.sqlserver:mssql-jdbc:"
This Kamelet expects a JSON-formatted body. Use key:value pairs to map the JSON fields and parameters. For example, here is a query:
'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'
Here is example input for the example query:
'{ "username":"oscerd", "city":"Rome"}'
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 data source.
type: string
default: 1433
username:
title: Username
description: The username to access a secured SQL Server Database.
type: string
x-descriptors:
- urn:camel:group:credentials
password:
title: Password
description: The password to access a secured SQL Server Database.
type: string
format: password
x-descriptors:
- urn:camel:group:credentials
query:
title: Query
description: The query to execute against the SQL Server Database.
type: string
example: 'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'
databaseName:
title: Database Name
description: The name of the SQL Server Database.
type: string
encrypt:
title: Encrypt Connection
description: Encrypt the connection to SQL Server.
type: boolean
default: false
trustServerCertificate:
title: Trust Server Certificate
description: Trust Server Certificate
type: boolean
default: true
types:
in:
mediaType: application/json
dependencies:
- "camel:jackson"
- "camel:kamelet"
- "camel:sql"
- "mvn:org.apache.commons:commons-dbcp2:2.12.0"
template:
beans:
- name: dsBean
type: "#class:org.apache.commons.dbcp2.BasicDataSource"
properties:
username: '{{username}}'
password: '{{password}}'
url: 'jdbc:sqlserver://{{serverName}}:{{serverPort}};databaseName={{databaseName}};encrypt={{encrypt}};trustServerCertificate={{trustServerCertificate}};'
driverClassName: 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
from:
uri: "kamelet:source"
steps:
- unmarshal:
json:
library: Jackson
- to:
uri: "sql:{{query}}"
parameters:
dataSource: "#bean:{{dsBean}}"