-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs for built-in processors #30
Conversation
Deploying with Cloudflare Pages
|
docs/processors/builtin.mdx
Outdated
- If the key is raw and has a schema attached, extracts the field and uses it to replace the entire key. | ||
- If the key is raw and has no schema, returns an error (not supported). | ||
- If the key is structured, extracts the field and uses it to replace the entire key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this from the docs in Conduit, but it doesn't appear it's true: https://github.com/ConduitIO/conduit/blob/71c6737846700e24a0cdb04c4fe1a890794b9276/pkg/processor/procbuiltin/extractfield.go#L72-L76.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a great start, in the future it would be great to also have examples for each processor. I think that is a bigger piece of work though and should be done separately.
Yup, examples came to my mind as well, but having some good examples would take some time. |
docs/processors/builtin.mdx
Outdated
|
||
### parsejsonkey | ||
|
||
Transforms the record's key into structured data, i.e. a JSON object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this processor and parsejsonpayload
need more details, maybe something like:
Transforms the record's key into structured data, i.e. a JSON object. | |
Transforms the record's raw data key (has to be JSON formatted) into structured data, i.e. a JSON object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hariso looks like you didn't notice the comment, we need to update the payload processor too 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry about that! I'll get your changes in a separate branch. Thanks for calling this out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maha-hajja Thinking again about this... IIUC, the parsejson
pair of processors will parse the JSON even when the data is structured, which means that we don't need to say "transform the record's raw data key/payload.after...". Is my understanding correct? I agree that the note about that it has to be JSON formatted should be there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hariso if the data is already structured then it's just returned as is
Co-authored-by: Maha Hajja <[email protected]>
Co-authored-by: Lovro Mažgon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏅
|
||
### parsejsonpayload | ||
|
||
Transforms the record's `Payload.After` into structured data, i.e. a JSON object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to update payload processor:
Transforms the record's `Payload.After` into structured data, i.e. a JSON object. | |
Transforms the record's raw data `Payload.After` (has to be JSON formatted) into structured data, i.e. a JSON object. |
docs/processors/builtin.mdx
Outdated
|
||
### parsejsonkey | ||
|
||
Transforms the record's key into structured data, i.e. a JSON object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hariso looks like you didn't notice the comment, we need to update the payload processor too 👀
Fixes ConduitIO/conduit#966.
I've used the comments in the
procbuiltin
a great deal. The docs in Conduit mention raw keys/payloads with schema. While a concept of schema exists in Conduit, it's nowhere used. Because of that, I've removed the mention of "schema" here.