You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
This creates a component which in tmctl describe shows eventType as $region-$category which is actually cool because I know this is going to be a dynamic event type:
using the actual source metadata attribute could help (again coming back to my metadata issue 😅 )
the tmctl create command could fail if it sees you're using --source with a component that has variables in its output event type, and could recommend explicitly creating a Trigger instead
jmcx
changed the title
Transformed CE type can lead to broken trigger filters
Transformed CE type can lead to unexpected trigger filters
Jan 12, 2023
jmcx
changed the title
Transformed CE type can lead to unexpected trigger filters
Transformed CE type can lead to unexpected trigger filters when using --sourceJan 12, 2023
Resulting event type (after transformation) will be $region-$category which plays well with the generated trigger filter.
If incoming event payload would look like this:
{"region":"eu"}
The output event type will be eu-$category which, although does not "fit" the trigger filter expectation, also does not make it "not valid".
So there are two components that make this issue solution impossible:
Event types (or any attributes) defined in the transformation with the variables depend on the incoming events data, hence they are entirely unpredictable,
There is no way to figure out if the event type exported by the transformation ($region-$category) consists of variables or if it is just a plain type string (even having $ is not a requirement for the variable).
So, we cannot just disable the filter generation for transformations because we don't have the ability to define if the type is dynamic or not, and we cannot put the expected filter string because the result type depends on the incoming data.
The describe output with the dynamic transformation type ($region-$category) should be taken as a insight of what can be produced by the component, not the eventual result.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If I use a JSON transformation to customise the value of the CE type using stored variables, as such:
And create this component, where
orders-source
is a kafka source (not relevant):tmctl create transformation --name transform-extract-region-category -f orders-add-region-category.yaml --source orders-source
This creates a component which in
tmctl describe
showseventType
as$region-$category
which is actually cool because I know this is going to be a dynamic event type:transform-extract-region-category $region-$category online(http://localhost:56877)
BUT if I then use this transformation as a source, e.g. in a new transformation:
tmctl create transformation -f orders-eu-formatting.yaml --source transform-extract-region-category
Then this uses the variable expression as part of the filter in the Trigger, e.g. as shown here in the
tmctl describe
output and in the Trigger CRD:order-router-trigger-e8079841 order-router-transformation type is $region-$category
This filter does not do what I'm expecting it to
The text was updated successfully, but these errors were encountered: