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

Support default route option for Events that match no other route #4615

Closed
graytaylor0 opened this issue Jun 10, 2024 · 1 comment · Fixed by #4662
Closed

Support default route option for Events that match no other route #4615

graytaylor0 opened this issue Jun 10, 2024 · 1 comment · Fixed by #4662
Labels
enhancement New feature or request
Milestone

Comments

@graytaylor0
Copy link
Member

Is your feature request related to a problem? Please describe.
As a user of data prepper, I would like to be able to configure a default route for when my Events do not match any of my other routes. Currently, I would have to add an expression manually to handle this case.

Describe the solution you'd like
An option to use a custom route value to use as the default. Routes with a value of default or DEFAULT will be this default route

routes:
  - ROUTE_ONE: '/my_key == null`
  - DEFAULT_ROUTE: default
sink:
 - opensearch:
      routes:
         - ROUTE_ONE
  - opensearch:
       routes:
          - DEFAULT_ROUTE

Describe alternatives you've considered (Optional)
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@dlvenable
Copy link
Member

Could this make sense? Have a special pre-defined route named _default or just default

routes:
  - ROUTE_ONE: '/my_key == null`
sink:
 - opensearch:
      routes:
         - ROUTE_ONE
  - opensearch:
       routes:
          - _default

The routes list is a list of expressions. But, default isn't an expression, so it would not fit with the current definition of what these are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

2 participants