blob: a688b0407f8da96a1cd968e4530d1008064aca15 [file] [log] [blame]
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
= image:kamelets/value-to-key-action.svg[] Value to Key Action
*Provided by: "Apache Software Foundation"*
Replace the Kafka record key with a new key formed from a subset of fields in the body
== Configuration Options
The following table summarizes the configuration options available for the `value-to-key-action` Kamelet:
[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
|===
| Property| Name| Description| Type| Default| Example
| *fields {empty}* *| Fields| Comma separated list of fields to be used to form the new key| string| |
|===
NOTE: Fields marked with ({empty}*) are mandatory.
== Usage
This section summarizes how the `value-to-key-action` can be used in various contexts.
=== Knative Action
The `value-to-key-action` Kamelet can be used as intermediate step in a binding.
.value-to-key-action-binding.yaml
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: value-to-key-action-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: timer-source
properties:
message: "Hello"
steps:
- ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: value-to-key-action
properties:
fields: "The Fields"
sink:
ref:
kind: InMemoryChannel
apiVersion: messaging.knative.dev/v1
name: mychannel
----
Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
Save the `value-to-key-action-binding.yaml` file into your hard drive, then configure it according to your needs.
You can run the action using the following command:
[source,shell]
----
kubectl apply -f value-to-key-action-binding.yaml
----
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT