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

AddField #160

Open
Joseph2424 opened this issue Jul 3, 2018 · 4 comments
Open

AddField #160

Joseph2424 opened this issue Jul 3, 2018 · 4 comments

Comments

@Joseph2424
Copy link

Is it possible to inject a unique identifier (UUID) using the AddField processor?

@oririechman
Copy link

oririechman commented Jul 18, 2018

Hey @Joseph2424
Currently we are not supporting this feature.
I think the best way is to add it to the templating service like we did with date time.
@asafm What do you think?

@asafm
Copy link
Contributor

asafm commented Jul 22, 2018

@oririechman - can you be more specific - I forgot what we did with date time?

@oririechman
Copy link

We added to the MustacheTemplate another scope called DateTemplateHandler in order to support injection of datetime strings
for example:

{
  addField: {
    config: {
      path: "timestamp"
      value: "{{date}} {{time}} {{#dateTemplate}}yyyy{{/dateTemplate}}"
    }
  }
}

So we can add UUID the same way

@asafm
Copy link
Contributor

asafm commented Sep 7, 2018

@oririechman - I tried reading the our Wiki page on Templates and still didn't figure out how does this work. Where do we specifically say "#dateTemplate" should be run by dateTemplateHandler, in our code?

I also don't understand what's the syntax of "#..." stands for

Our wiki page of Templates definitely to explain this better.

Once I understand this we can discuss UUID

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

3 participants