OGC Api Feature Get Item Action
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Returns the items of the collection provided of an OGC API Features server. The collection must be a valid collection name on the server.
Query can be defined in the body too.
Configuration Options
The following table summarizes the configuration options available for the ogcapi-features-action
Kamelet:
Property | Name | Description | Type | Default | Example |
---|---|---|---|---|---|
Collection | Required Name of the collection we want to extract items from. | string | |||
URL | Required The URL to fetch for data. | string | https://emotional.byteroad.net | ||
Bounding Box | Bounding Box of the items we want to retrieve. | string | -180,-90,180,90 | 160.6,-55.95,-170,-25.89 | |
Limit | Maximum number of items to retrieve. Must be a number between 1 and 10 000. | integer | 10 | ||
Query | Separated list by | string | property1=1&property2=dos | ||
Split by Feature | When true, instead of returning the full geojson, split the message into each feature. | boolean | false |
Dependencies
At runtime, the ogcapi-features-action
Kamelet relies upon the presence of the following dependencies:
-
camel:core
-
camel:http
-
camel:kamelet
-
camel:jsonpath
-
camel:jackson
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel
Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:timer-source"
parameters:
period: 10000
message: 'test'
steps:
- to:
uri: "kamelet:log-sink"
You can now run it directly through the following command
camel run route.yaml
Camel K Environment Usage
This section describes how you can use the ogcapi-features-action
.
Knative action
You can use the ogcapi-features-action
Kamelet as an intermediate step in a Knative binding.
apiVersion: camel.apache.org/v1
kind: KameletBinding
metadata:
name: ogcapi-features-action-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: kafka-source
properties:
bootstrapServers: localhost:9092
topic: mytopic
user: kafka
password: kafka123!
steps:
- ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: ogcapi-features-action
properties:
collection: The Collection
url: https://emotional.byteroad.net
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
-
Save the
ogcapi-features-action-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the action by using the following command:
kubectl apply -f ogcapi-features-action-binding.yaml
Procedure for using the Kamel CLI
Configure and run the action by using the following command:
kamel bind channel:mychannel -p "step-0.collection=The Collection" -p "step-0.url=\https://emotional.byteroad.net" ogcapi-features-action
This command creates the KameletBinding in the current namespace on the cluster.
Kafka action
You can use the ogcapi-features-action
Kamelet as an intermediate step in a Kafka binding.
apiVersion: camel.apache.org/v1
kind: KameletBinding
metadata:
name: ogcapi-features-action-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: kafka-source
properties:
bootstrapServers: localhost:9092
topic: mytopic
user: kafka
password: kafka123!
steps:
- ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: ogcapi-features-action
properties:
collection: The Collection
url: https://emotional.byteroad.net
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
-
Save the
ogcapi-features-action-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the action by using the following command:
kubectl apply -f ogcapi-features-action-binding.yaml
Procedure for using the Kamel CLI
Configure and run the action by using the following command:
kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic -p "step-0.collection=The Collection" -p "step-0.url=\https://emotional.byteroad.net" ogcapi-features-action
This command creates the KameletBinding in the current namespace on the cluster.