All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kamelets.snowflake-source.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: snowflake-source
  annotations:
    camel.apache.org/kamelet.support.level: "Preview"
    camel.apache.org/catalog.version: "4.8.0"
    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIGJhc2VQcm9maWxlPSJ0aW55LXBzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNTY1IDE1NTkiIHdpZHRoPSIxNTY1IiBoZWlnaHQ9IjE1NTkiPgoJPHRpdGxlPmxvZ28tYmx1ZS1zdmcgY29weS1zdmc8L3RpdGxlPgoJPGRlZnM+CgkJPGNsaXBQYXRoIGNsaXBQYXRoVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBpZD0iY3AxIj4KCQkJPHBhdGggZD0iTTAuMjQgMEw2ODkzLjI2IDBMNjg5My4yNiAxNTU4LjIyTDAuMjQgMTU1OC4yMkwwLjI0IDBaIiAvPgoJCTwvY2xpcFBhdGg+Cgk8L2RlZnM+Cgk8c3R5bGU+CgkJdHNwYW4geyB3aGl0ZS1zcGFjZTpwcmUgfQoJCS5zaHAwIHsgZmlsbDogIzI5YjVlOCB9IAoJPC9zdHlsZT4KCTxnIG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MDcuNTdDMTAzOC44NiA3OTcuMjYgMTAzNy4zMyA3ODYuNiAxMDM3LjcyIDc3Ni4wOEMxMDM3Ljg5IDc2OC40NCAxMDM5LjAzIDc2MC44NCAxMDQxLjE1IDc1My4yNEMxMDQ3Ljc3IDcyOS42IDEwNjMuMzUgNzA4LjQ2IDEwODYuMzkgNjk1LjEzTDE0MTggNTA1LjRDMTQ2NC41OSA0NzguNyAxNTI0LjI5IDQ5NC41OCAxNTUxLjI4IDU0MC44OEMxNTc4LjMxIDU4Ny4xNSAxNTYyLjMxIDY0Ni4yNCAxNTE1LjU1IDY3Mi45OEwxMzMwLjM3IDc3OS4xN1oiIC8+CgkJCQkJCQk8L2c+CgkJCQkJCTwvZz4KCQkJCQk8L2c+CgkJCQk8L2c+CgkJCTwvZz4KCQk8L2c+Cgk8L2c+Cjwvc3ZnPg=="
    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: "Snowflake Source"
    description: |-
      Query data from a Snowflake Database.
    required:
      - instanceUrl
      - username
      - password
      - query
    type: object
    properties:
      instanceUrl:
        title: Instance URL
        description: The Instance url
        type: string
        example: instance.snowflakecomputing.com
      username:
        title: Username
        description: The username to access a secured Snowflake Database.
        type: string
        x-descriptors:
        - urn:camel:group:credentials
      password:
        title: Password
        description: The password to access a secured Snowflake Database.
        type: string
        format: password
        x-descriptors:
        - urn:camel:group:credentials
      query:
        title: Query
        description: The query to execute against the Snowflake Database.
        type: string
        example: 'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'
      databaseName:
        title: Database Name
        description: The name of the Snowflake 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'
      delay:
        title: Delay
        description: The number of milliseconds before the next poll
        type: integer
        default: 500
  types:
    out:
      mediaType: application/json
  dependencies:
  - "camel:jackson"
  - "camel:kamelet"
  - "camel:sql"
  - "mvn:net.snowflake:snowflake-jdbc:3.19.0"
  - "mvn:org.apache.commons:commons-dbcp2:2.12.0"
  template:
    beans:
      - name: dsBean
        type: "#class:net.snowflake.client.jdbc.SnowflakeBasicDataSource"
        properties:
          user: '{{username}}'
          password: '{{password}}'
          url: 'jdbc:snowflake://{{instanceUrl}}'
          databaseName: '{{?databaseName}}'
    from:
      uri: "sql:{{query}}"
      parameters:
        dataSource: "#bean:{{dsBean}}"
        onConsume: "{{?consumedQuery}}"
        delay: "{{delay}}"
      steps:
      - marshal:
          json: 
            library: Jackson
      - to: "kamelet:sink"




© 2015 - 2024 Weber Informatics LLC | Privacy Policy