Skip to content
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

Dissect: * and & reference modifier, breaking change for 7.0 #8054

Closed
ph opened this issue Aug 22, 2018 · 4 comments
Closed

Dissect: * and & reference modifier, breaking change for 7.0 #8054

ph opened this issue Aug 22, 2018 · 4 comments

Comments

@ph
Copy link
Contributor

ph commented Aug 22, 2018

In the current dissect implementation you can use a named skip field as a reference key, we want to change the behavior to use the * instead of using a named skip field this will make it more obvious and will be closer to pointers and reference in programming language. You will still be able to have a named skip field but the value will not be accessible.

Extract from the specification

? - Named skip key instructs the parser to not include this result in the final result set. Behaves identical to an empty skip key %{} but may be used to help with human readability. The ? modifier must be placed to the left of the key name. see example below

* and & reference modifiers. This modifier requires two keys with the same name present in the dissect pattern. One key with the * and another with the &. This instructs the parser that the value discovered by the * is to be used as the key name for the value discovered by the corresponding & key. These modifiers must be placed on the left of the key name. see example below

@ph ph self-assigned this Aug 22, 2018
@ph ph changed the title * and & reference modifier, breaking change for7.0 * and & reference modifier, breaking change for 7.0 Aug 22, 2018
@ruflin
Copy link
Contributor

ruflin commented Aug 23, 2018

Will there be a migration path? Assuming we use it in some of our modules, how could we make sure that Beats 7 still works with ES 6?

@ph
Copy link
Contributor Author

ph commented Aug 23, 2018

@ruflin I don't think there will be issues with beats7 and ES6, are you talking about possible issues with the ingest node the dissect processor in ES6? FYI ES6.5 will already use the new syntax.

For a migration path, this is another thing, I could make both syntax works in 6.5 and remove it in 7.0. I need to evaluate the complexity of it.

But note the change should be minimal, %{?mykey} to %{*mykey}

Also we don't use that specific syntax in our modules, its a niche use case :)

@ruflin
Copy link
Contributor

ruflin commented Aug 24, 2018

Thanks for the details. As we don't use the feature yet, it should not be an issue. Assuming we start using it in one of the 6.x modules it would mean we have to about the dissect processor for 7.0. As we do the processing on our end, it would not have any effect if the users uses ES 6.x or 7.x.

@ph ph changed the title * and & reference modifier, breaking change for 7.0 Dissect: * and & reference modifier, breaking change for 7.0 Aug 28, 2018
@ph
Copy link
Contributor Author

ph commented Aug 28, 2018

It would nice to do the following at the same time: #8123

ph added a commit to ph/beats that referenced this issue Oct 31, 2018
This commit adds support for * instead of using a named skip field
(?field) this make it compatible with ingest pipeline syntax in 6.5.

We are also adding validation enforcing that each indirect field must use an existing
and valid reference.

Fix: elastic#8054
@ph ph closed this as completed in #8750 Oct 31, 2018
ph added a commit that referenced this issue Oct 31, 2018
…8750)

This commit adds support for * instead of using a named skip field
(?field) this make it compatible with ingest pipeline syntax in 6.5.

We are also adding validation enforcing that each indirect field must use an existing
and valid reference.

Fix: #8054
ph added a commit to ph/beats that referenced this issue Nov 9, 2018
…lastic#8750)

This commit adds support for * instead of using a named skip field
(?field) this make it compatible with ingest pipeline syntax in 6.5.

We are also adding validation enforcing that each indirect field must use an existing
and valid reference.

Fix: elastic#8054
(cherry picked from commit bb93d05)
ph added a commit that referenced this issue Nov 13, 2018
…t a value that can be referenced and add external test suite for dissect (#8861)

* Extract the Dissect test suite into an external file (#7768)

We currently have three implementations of dissect (LS, Ingest
and beats), moving the common test case to an external file is the first
step to be able to converge to a common specification.

cc @guyboertje @jakelandis

(cherry picked from commit 3e85c9a)

* Allow to use a star (*) to extract a value that can be referenced. (#8750)

This commit adds support for * instead of using a named skip field
(?field) this make it compatible with ingest pipeline syntax in 6.5.

We are also adding validation enforcing that each indirect field must use an existing
and valid reference.

Fix: #8054
(cherry picked from commit bb93d05)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants