Skip to content

Commit

Permalink
Add Google Big Query Sink Kamelet
Browse files Browse the repository at this point in the history
  • Loading branch information
claudio4j committed Mar 22, 2022
1 parent 7ef5a89 commit f3ae4ae
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
78 changes: 78 additions & 0 deletions kamelets/google-bigquery-sink.kamelet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# ---------------------------------------------------------------------------
# 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,PHN2ZyBoZWlnaHQ9IjI1MDAiIHdpZHRoPSIyNTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xLjYzMzIzNTQzMzMyODI1NiA3LjAzMjYwOTMzMDMxNTY1NjUgMTMxLjI2NTc0NjgyNDE2ODc2IDEx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wIDQwLjc5NWMtOS43MiAwLTE3LjYtNy44OC0xNy42LTE3LjZTNTQuMjggNDYuNCA2NCA0Ni40IDgxLjYgNTQuMjggODEuNiA2NCA3My43MiA4MS42IDY0IDgxLjYiLz48cGF0aCBkPSJNNTIuOTkgNjMuMTA0djcuMjFhMTIuNzk0IDEyLjc5NCAwIDAgMCA0LjM4IDQuNDc1VjYzLjEwNHpNNjEuNjc1IDU3LjAyNnYxOS40MTFjLjc0NS4xMzcgMS41MDcuMjIgMi4yOS4yMi43MTQgMCAxLjQxLS4wNzUgMi4wOTMtLjE4OVY1Ny4wMjZ6TTcwLjc2NiA2Ni4xdjguNTYyYTEyLjc4NiAxMi43ODYgMCAwIDAgNC4zODItNC43di0zLjg2MXpNODAuNjkxIDc4LjI4N2wtMi40MDMgMi40MDVhMS4wODggMS4wODggMCAwIDAgMCAxLjUzN2w5LjExNSA5LjExMmExLjA4OCAxLjA4OCAwIDAgMCAxLjUzNyAwbDIuNDAzLTIuNDAyYTEuMDkyIDEuMDkyIDAgMCAwIDAtMS41MzZsLTkuMTE2LTkuMTE2YTEuMDkgMS4wOSAwIDAgMC0xLjUzNiAwIi8+PC9nPjwvc3ZnPg=="
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 Google Big Query tables.
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
dependencies:
- "camel:core"
- "camel:kamelet"
- "camel:google-bigquery"
template:
beans:
- name: connectionFactoryBean
type: "#class:org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory"
property:
- key: credentialsFileLocation
value: '{{credentialsFileLocation}}'
from:
uri: "kamelet:source"
steps:
- to:
uri: "google-bigquery:{{projectId}}:{{dataset}}:{{table}}"
parameters:
connectionFactory: "#bean:{{connectionFactoryBean}}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# ---------------------------------------------------------------------------
# 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+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjY0IiB4Mj0iNjQiIHkxPSI3LjAzNCIgeTI9IjEyMC43ODkiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzQzODdmZCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvc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MTFjLjc0NS4xMzcgMS41MDcuMjIgMi4yOS4yMi43MTQgMCAxLjQxLS4wNzUgMi4wOTMtLjE4OVY1Ny4wMjZ6TTcwLjc2NiA2Ni4xdjguNTYyYTEyLjc4NiAxMi43ODYgMCAwIDAgNC4zODItNC43di0zLjg2MXpNODAuNjkxIDc4LjI4N2wtMi40MDMgMi40MDVhMS4wODggMS4wODggMCAwIDAgMCAxLjUzN2w5LjExNSA5LjExMmExLjA4OCAxLjA4OCAwIDAgMCAxLjUzNyAwbDIuNDAzLTIuNDAyYTEuMDkyIDEuMDkyIDAgMCAwIDAtMS41MzZsLTkuMTE2LTkuMTE2YTEuMDkgMS4wOSAwIDAgMC0xLjUzNiAwIi8+PC9nPjwvc3ZnPg=="
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 Google Big Query tables.
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
dependencies:
- "camel:core"
- "camel:kamelet"
- "camel:google-bigquery"
template:
beans:
- name: connectionFactoryBean
type: "#class:org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory"
property:
- key: credentialsFileLocation
value: '{{credentialsFileLocation}}'
from:
uri: "kamelet:source"
steps:
- to:
uri: "google-bigquery:{{projectId}}:{{dataset}}:{{table}}"
parameters:
connectionFactory: "#bean:{{connectionFactoryBean}}"

0 comments on commit f3ae4ae

Please sign in to comment.