dropbox source Dropbox Source

Provided by: "Apache Software Foundation"

Support Level for this Kamelet is: "Preview"

Consume Files from Dropbox.

Configuration Options

The following table summarizes the configuration options available for the dropbox-source Kamelet:

Property Name Description Type Default Example

accessToken *

Dropbox Access Token

The access Token to use to access Dropbox

string

clientIdentifier *

Client Identifier

Dropbox App client Identifier

string

period *

Period between Polls

The interval between fetches to the Dropbox remote path in milliseconds

integer

10000

query *

Queries

A space-separated list of sub-strings to search for. A file matches only if it contains all the sub-strings. If this option is not set, all files will be matched.

string

remotePath *

Remote Path

Original file or folder to work with

string

Fields marked with an asterisk (*) are mandatory.

Dependencies

At runtime, the `dropbox-source Kamelet relies upon the presence of the following dependencies:

  • camel:dropbox

  • camel:kamelet

  • camel:core

  • camel:jsonpath

  • camel:timer

Usage

This section describes how you can use the dropbox-source.

Knative Source

You can use the dropbox-source Kamelet as a Knative source by binding it to a Knative object.

dropbox-source-binding.yaml
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: dropbox-source-binding
spec:
  source:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1alpha1
      name: dropbox-source
    properties:
      accessToken: "The Dropbox Access Token"
      clientIdentifier: "The Client Identifier"
      query: "The Queries"
      remotePath: "The Remote Path"
  sink:
    ref:
      kind: Channel
      apiVersion: messaging.knative.dev/v1
      name: mychannel

Prerequisite

You have Camel K installed on the cluster.

Procedure for using the cluster CLI

  1. Save the dropbox-source-binding.yaml file to your local drive, and then edit it as needed for your configuration.

  2. Run the source by using the following command:

    kubectl apply -f dropbox-source-binding.yaml

Procedure for using the Kamel CLI

Configure and run the source by using the following command:

kamel bind dropbox-source -p "source.accessToken=The Dropbox Access Token" -p "source.clientIdentifier=The Client Identifier" -p "source.query=The Queries" -p "source.remotePath=The Remote Path" channel:mychannel

This command creates the KameletBinding in the current namespace on the cluster.

Kafka Source

You can use the dropbox-source Kamelet as a Kafka source by binding it to a Kafka topic.

dropbox-source-binding.yaml
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: dropbox-source-binding
spec:
  source:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1alpha1
      name: dropbox-source
    properties:
      accessToken: "The Dropbox Access Token"
      clientIdentifier: "The Client Identifier"
      query: "The Queries"
      remotePath: "The Remote Path"
  sink:
    ref:
      kind: KafkaTopic
      apiVersion: kafka.strimzi.io/v1beta1
      name: my-topic

Prerequisites

  • You’ve installed Strimzi.

  • You’ve created a topic named my-topic in the current namespace.

  • You have Camel K installed on the cluster.

Procedure for using the cluster CLI

  1. Save the dropbox-source-binding.yaml file to your local drive, and then edit it as needed for your configuration.

  2. Run the source by using the following command:

    kubectl apply -f dropbox-source-binding.yaml

Procedure for using the Kamel CLI

Configure and run the source by using the following command:

kamel bind dropbox-source -p "source.accessToken=The Dropbox Access Token" -p "source.clientIdentifier=The Client Identifier" -p "source.query=The Queries" -p "source.remotePath=The Remote Path" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic

This command creates the KameletBinding in the current namespace on the cluster.