Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server Sink description and type #367

Merged
merged 6 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 12 additions & 7 deletions docs/modules/ROOT/pages/sqlserver-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@

Send data to a Microsoft SQL Server Database.

In you KameletBinding file you'll need to explicitly declare the SQL Server driver dependency, like in the following YAML snippet
In you KameletBinding file you'll need to explicitly declare the SQL Server driver dependency in spec->integration->dependencies

spec:
integration:
dependencies:
- "mvn:com.microsoft.sqlserver:mssql-jdbc:<version>"
- "mvn:com.microsoft.sqlserver:mssql-jdbc:<version>"

This Kamelet expects a JSON as body. The mapping between the JSON fields and parameters is done by key, so if you have the following query:

'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'

The Kamelet needs to receive as input something like:

'{ "username":"oscerd", "city":"Rome"}'

== Configuration Options

Expand All @@ -22,7 +27,7 @@ The following table summarizes the configuration options available for the `sqls
| Property| Name| Description| Type| Default| Example
| *databaseName {empty}* *| Database Name| The Database Name we are pointing| string| |
| *password {empty}* *| Password| The password to use for accessing a secured SQL Server Database| string| |
| *query {empty}* *| Query| The Query to execute against the SQL Server Database| string| |
| *query {empty}* *| Query| The Query to execute against the SQL Server Database| string| | `"INSERT INTO accounts (username,city) VALUES (:#username,:#city)"`
| *serverName {empty}* *| Server Name| Server Name for the data source| string| | `"localhost"`
| *username {empty}* *| Username| The username to use for accessing a secured SQL Server Database| string| |
| port| Port| Server Port for the data source| string| `1433`|
Expand Down Expand Up @@ -59,7 +64,7 @@ spec:
properties:
databaseName: "The Database Name"
password: "The Password"
query: "The Query"
query: "INSERT INTO accounts (username,city) VALUES (:#username,:#city)"
serverName: "localhost"
username: "The Username"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ spec:
description: |-
Send data to a Microsoft SQL Server Database.

In you KameletBinding file you'll need to explicitly declare the SQL Server driver dependency, like in the following YAML snippet

spec:
integration:
dependencies:
- "mvn:com.microsoft.sqlserver:mssql-jdbc:<version>"
In you KameletBinding file you'll need to explicitly declare the SQL Server driver dependency in spec->integration->dependencies

- "mvn:com.microsoft.sqlserver:mssql-jdbc:<version>"

This Kamelet expects a JSON as body. The mapping between the JSON fields and parameters is done by key, so if you have the following query:

'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'

The Kamelet needs to receive as input something like:

'{ "username":"oscerd", "city":"Rome"}'
required:
- serverName
- username
Expand Down Expand Up @@ -55,10 +60,14 @@ spec:
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 Database Name we are pointing
type: string
types:
out:
mediaType: application/json
dependencies:
- "camel:jackson"
- "camel:kamelet"
Expand Down
21 changes: 15 additions & 6 deletions sqlserver-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ spec:
description: |-
Send data to a Microsoft SQL Server Database.

In you KameletBinding file you'll need to explicitly declare the SQL Server driver dependency, like in the following YAML snippet

spec:
integration:
dependencies:
- "mvn:com.microsoft.sqlserver:mssql-jdbc:<version>"
In you KameletBinding file you'll need to explicitly declare the SQL Server driver dependency in spec->integration->dependencies

- "mvn:com.microsoft.sqlserver:mssql-jdbc:<version>"

This Kamelet expects a JSON as body. The mapping between the JSON fields and parameters is done by key, so if you have the following query:

'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'

The Kamelet needs to receive as input something like:

'{ "username":"oscerd", "city":"Rome"}'
required:
- serverName
- username
Expand Down Expand Up @@ -55,10 +60,14 @@ spec:
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 Database Name we are pointing
type: string
types:
out:
mediaType: application/json
dependencies:
- "camel:jackson"
- "camel:kamelet"
Expand Down