You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/03/25 13:25:36 UTC
[camel-kamelets] branch main updated: Add Google Big Query Sink Kamelet
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new 9d6b0d1 Add Google Big Query Sink Kamelet
9d6b0d1 is described below
commit 9d6b0d11d68de16a1912fadaa1ebbadea1f8bd79
Author: Claudio Miranda <cl...@claudius.com.br>
AuthorDate: Tue Mar 22 20:05:44 2022 -0300
Add Google Big Query Sink Kamelet
---
docs/modules/ROOT/nav.adoc | 1 +
kamelets/google-bigquery-sink.kamelet.yaml | 87 ++++++++++++++++++++++
.../kamelets/google-bigquery-sink.kamelet.yaml | 87 ++++++++++++++++++++++
3 files changed, 175 insertions(+)
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 9c89830..c4bfbea 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -66,6 +66,7 @@
* xref:github-pullrequest-comment-source.adoc[]
* xref:github-pullrequest-source.adoc[]
* xref:github-tag-source.adoc[]
+* xref:google-bigquery-sink.adoc[]
* xref:google-calendar-source.adoc[]
* xref:google-functions-sink.adoc[]
* xref:google-mail-source.adoc[]
diff --git a/kamelets/google-bigquery-sink.kamelet.yaml b/kamelets/google-bigquery-sink.kamelet.yaml
new file mode 100644
index 0000000..e57a39e
--- /dev/null
+++ b/kamelets/google-bigquery-sink.kamelet.yaml
@@ -0,0 +1,87 @@
+# ---------------------------------------------------------------------------
+# 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/v1alpha1
+kind: Kamelet
+metadata:
+ name: google-bigquery-sink
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI1MDAiIHdpZHRoPSIyNTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xLjYzMzIzNTQzMzMyODI1NiA3LjAzMjYwOTMzMDMxNTY1NjUgMTMxLjI2NTc0NjgyNDE2ODc2IDExNC42MzQzOTA2Njk2ODQzNSI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjY0IiB4Mj0iNjQiIHkxPSI3LjAzNCIgeTI9IjEyMC43ODkiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzQzODdmZCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzQ2ODNlYS [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Google Big Query"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "Google Big Query Sink"
+ description: |-
+ Send data to a Google Big Query table.
+
+ It is expected the body is in Json format representing an object or an array of objects.
+
+ The credentialsFileLocation property needs to be a path to a service account key file.
+ required:
+ - projectId
+ - dataset
+ - table
+ - credentialsFileLocation
+ type: object
+ properties:
+ projectId:
+ title: Google Cloud Project Id
+ description: Google Cloud Project id
+ type: string
+ dataset:
+ title: Big Query Dataset Id
+ description: The Big Query Dataset Id
+ type: string
+ table:
+ title: Big Query Table Id
+ description: The Big Query Table Id
+ type: string
+ credentialsFileLocation:
+ title: Google Cloud Platform Credential File
+ description: The credential to access Google Cloud Platform api services
+ type: string
+ x-descriptors:
+ - urn:camel:group:credentials
+ types:
+ in:
+ mediaType: application/json
+ dependencies:
+ - "camel:core"
+ - "camel:kamelet"
+ - "camel:google-bigquery"
+ - "camel:jackson"
+ template:
+ beans:
+ - name: connectionFactoryBean
+ type: "#class:org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory"
+ property:
+ - key: credentialsFileLocation
+ value: '{{credentialsFileLocation}}'
+ from:
+ uri: "kamelet:source"
+ steps:
+ - unmarshal:
+ json:
+ library: Jackson
+ - to:
+ uri: "google-bigquery:{{projectId}}:{{dataset}}:{{table}}"
+ parameters:
+ connectionFactory: "#bean:{{connectionFactoryBean}}"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/google-bigquery-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/google-bigquery-sink.kamelet.yaml
new file mode 100644
index 0000000..e57a39e
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/google-bigquery-sink.kamelet.yaml
@@ -0,0 +1,87 @@
+# ---------------------------------------------------------------------------
+# 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/v1alpha1
+kind: Kamelet
+metadata:
+ name: google-bigquery-sink
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI1MDAiIHdpZHRoPSIyNTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xLjYzMzIzNTQzMzMyODI1NiA3LjAzMjYwOTMzMDMxNTY1NjUgMTMxLjI2NTc0NjgyNDE2ODc2IDExNC42MzQzOTA2Njk2ODQzNSI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjY0IiB4Mj0iNjQiIHkxPSI3LjAzNCIgeTI9IjEyMC43ODkiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzQzODdmZCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzQ2ODNlYS [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Google Big Query"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "Google Big Query Sink"
+ description: |-
+ Send data to a Google Big Query table.
+
+ It is expected the body is in Json format representing an object or an array of objects.
+
+ The credentialsFileLocation property needs to be a path to a service account key file.
+ required:
+ - projectId
+ - dataset
+ - table
+ - credentialsFileLocation
+ type: object
+ properties:
+ projectId:
+ title: Google Cloud Project Id
+ description: Google Cloud Project id
+ type: string
+ dataset:
+ title: Big Query Dataset Id
+ description: The Big Query Dataset Id
+ type: string
+ table:
+ title: Big Query Table Id
+ description: The Big Query Table Id
+ type: string
+ credentialsFileLocation:
+ title: Google Cloud Platform Credential File
+ description: The credential to access Google Cloud Platform api services
+ type: string
+ x-descriptors:
+ - urn:camel:group:credentials
+ types:
+ in:
+ mediaType: application/json
+ dependencies:
+ - "camel:core"
+ - "camel:kamelet"
+ - "camel:google-bigquery"
+ - "camel:jackson"
+ template:
+ beans:
+ - name: connectionFactoryBean
+ type: "#class:org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory"
+ property:
+ - key: credentialsFileLocation
+ value: '{{credentialsFileLocation}}'
+ from:
+ uri: "kamelet:source"
+ steps:
+ - unmarshal:
+ json:
+ library: Jackson
+ - to:
+ uri: "google-bigquery:{{projectId}}:{{dataset}}:{{table}}"
+ parameters:
+ connectionFactory: "#bean:{{connectionFactoryBean}}"