This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch sheets
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 4ba67d0145414ee00151c4299386b518abaca099
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Thu Mar 11 16:22:51 2021 +0100

    Added Google Sheets Stream Source Kamelet
---
 google-sheets-source.kamelet.yaml | 94 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/google-sheets-source.kamelet.yaml 
b/google-sheets-source.kamelet.yaml
new file mode 100644
index 0000000..a324c1b
--- /dev/null
+++ b/google-sheets-source.kamelet.yaml
@@ -0,0 +1,94 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: google-sheets-stream-source
+  annotations:
+    camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjE4NiAzOCA3NiA3NiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTI0NCA1NmgtNDB2NDBoNDBWNTZ6Ii8+PHBhdGggZmlsbD0iI0VBNDMzNSIgZD0iTTI0NCAxMTRsMTgtMThoLTE4djE4eiIvPjxwYXRoIGZpbGw9IiNGQkJDMDQiIGQ9Ik0yNjIgNTZoLTE4djQwaDE4VjU2eiIvPjxwYXRoIGZpbGw9IiMzNEE4NTMiIGQ9Ik0yNDQgOTZoLTQwdjE4aDQwVjk2eiIvPjxwYXRoIGZpbGw9IiMxODgwMzgiIGQ9Ik0xODYgOTZ2MTJjMCAzLjMxNSAyLjY4NSA2IDYgNmgxMlY5NmgtMTh6Ii8+PH
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Google Sheets Stream Source"
+    description: |-
+      Receive data from Google Sheets.
+    required:
+      - index
+      - spreadsheetId
+      - clientId
+      - accessToken
+      - refreshToken
+      - clientSecret
+      - applicationName
+    properties:
+      index:
+        title: Index
+        description: An index for the google sheets endpoint
+        type: string
+      spreadsheetId:
+        title: Spreadsheet ID
+        description: The Spreadsheet ID to be used as events source
+        type: string
+      clientId:
+        title: Client Id
+        description: Client ID of the sheets application
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      clientSecret:
+        title: Client Secret
+        description: Client Secret of the sheets application
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      accessToken:
+        title: Access Token
+        description: OAuth 2 access token for google sheets application. This 
typically expires after an hour so refreshToken is recommended for long term 
usage.
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      refreshToken:
+        title: Refresh Token
+        description: OAuth 2 refresh token for google sheets application. 
Using this, the Google Calendar component can obtain a new accessToken whenever 
the current one expires - a necessity if the application is long-lived.
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      applicationName:
+        title: Application name
+        description: Google Sheets application name
+        type: string
+      splitResults:
+        title: Split Results
+        description: True if value range result should be split into rows or 
columns to process each of them individually. 
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: true
+      range:
+        title: Consume from now
+        description: the range of rows and columns in a sheet to get data from.
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        example: "A1:B3"
+  types:
+    out:
+      mediaType: application/json
+  dependencies:
+  - "camel:jackson"
+  flow:
+    from:
+      uri: "google-sheets-stream://{{index}}"
+      parameters:
+        clientId: "{{clientId}}"
+        spreadsheetId: "{{spreadsheetId}}"
+        accessToken: "{{accessToken}}"
+        refreshToken: "{{refreshToken}}"
+        clientSecret: "{{clientSecret}}"
+        applicationName: "{{applicationName}}"
+        splitResults: "{{splitResults}}"
+        range: "{{range}}"
+      steps:
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"

Reply via email to