generated from camel.apache.org/kamelet
Add kamelet definition: oracle-database-source
This commit is contained in:
parent
add684a508
commit
19a1660c38
98
kamelet.yaml
Normal file
98
kamelet.yaml
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
apiVersion: camel.apache.org/v1
|
||||||
|
kind: Kamelet
|
||||||
|
metadata:
|
||||||
|
name: oracle-database-source
|
||||||
|
annotations:
|
||||||
|
camel.apache.org/kamelet.support.level: "Stable"
|
||||||
|
camel.apache.org/catalog.version: "4.10.2"
|
||||||
|
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTI1NiwzMUMxMzEuNywzMSwzMSw2Mi41LDMxLDEwMS4zdjU2LjJjMCwzOC44LDEwMC43LDcwLjMsMjI1LDcwLjNzMjI1LTMxLjUsMjI1LTcwLjN2LTU2LjJDNDgxLDYyLjUsMzgwLjMsMzEsMjU2LDMxeiIvPgoJPHBhdGggZD0iTTI1NiwyNzAuMWMtMTI0LjMsMC0yMjUtMzEuNS0yMjUtNzAuM3Y4NC40YzAsMzguOCwxMDAuNyw3MC4zLDIyNSw3MC4zczIyNS0zMS41LDIyNS03MC4zdi04NC40CgkJQzQ4MSwyMzguNiwzODAuMywyNzAuMSwyNTYsMjcwLjF6Ii8+Cgk8cGF0aCBkPSJNMjU2LDM5Ni42Yy0xMjQuMywwLTIyNS0zMS41LTIyNS03MC4zdjg0LjRjMCwzOC44LDEwMC43LDcwLjMsMjI1LDcwLjNzMjI1LTMxLjUsMjI1LTcwLjN2LTg0LjQKCQlDNDgxLDM2NS4yLDM4MC4zLDM5Ni42LDI1NiwzOTYuNnoiLz4KPC9nPgo8L3N2Zz4K"
|
||||||
|
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: "source"
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
title: "Oracle Database Source"
|
||||||
|
description: |-
|
||||||
|
Query data from an Oracle Database.
|
||||||
|
|
||||||
|
In your Pipe file, you must explicitly declare the Oracle Database driver dependency in spec->integration->dependencies.
|
||||||
|
|
||||||
|
- "mvn:com.oracle.database.jdbc:ojdbc11:<version>"
|
||||||
|
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: 1521
|
||||||
|
username:
|
||||||
|
title: Username
|
||||||
|
description: The username to access a secured Oracle Database.
|
||||||
|
type: string
|
||||||
|
x-descriptors:
|
||||||
|
- urn:camel:group:credentials
|
||||||
|
password:
|
||||||
|
title: Password
|
||||||
|
description: The password to access a secured Oracle Database.
|
||||||
|
type: string
|
||||||
|
format: password
|
||||||
|
x-descriptors:
|
||||||
|
- urn:camel:group:credentials
|
||||||
|
query:
|
||||||
|
title: Query
|
||||||
|
description: The query to execute against the Oracle Database.
|
||||||
|
type: string
|
||||||
|
example: 'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'
|
||||||
|
databaseName:
|
||||||
|
title: Database Name
|
||||||
|
description: The name of the Oracle Database.
|
||||||
|
type: string
|
||||||
|
consumedQuery:
|
||||||
|
title: Consumed Query
|
||||||
|
description: A query to run on a tuple consumed.
|
||||||
|
type: string
|
||||||
|
example: 'DELETE FROM accounts where user_id = :#user_id'
|
||||||
|
types:
|
||||||
|
out:
|
||||||
|
mediaType: application/json
|
||||||
|
dependencies:
|
||||||
|
- "camel:jackson"
|
||||||
|
- "camel:kamelet"
|
||||||
|
- "camel:sql"
|
||||||
|
- "mvn:org.apache.commons:commons-dbcp2:2.13.0"
|
||||||
|
template:
|
||||||
|
beans:
|
||||||
|
- name: local-sql-oracle-source
|
||||||
|
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:oracle:thin:@{{serverName}}:{{serverPort}}/{{databaseName}}'
|
||||||
|
driverClassName: 'oracle.jdbc.driver.OracleDriver'
|
||||||
|
from:
|
||||||
|
uri: "{{local-sql-oracle-source}}:{{query}}"
|
||||||
|
parameters:
|
||||||
|
dataSource: "#bean:{{dsBean}}"
|
||||||
|
onConsume: "{{?consumedQuery}}"
|
||||||
|
steps:
|
||||||
|
- marshal:
|
||||||
|
json:
|
||||||
|
library: Jackson
|
||||||
|
- to: "kamelet:sink"
|
||||||
Loading…
Reference in New Issue
Block a user