-
Notifications
You must be signed in to change notification settings - Fork 10
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 different input transform types #495
Merged
saimedhi
merged 23 commits into
opensearch-project:feature/new-transform
from
ohltyler:input-types-3
Nov 26, 2024
Merged
Support different input transform types #495
saimedhi
merged 23 commits into
opensearch-project:feature/new-transform
from
ohltyler:input-types-3
Nov 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nput_map Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
ohltyler
requested review from
dbwiddis,
owaiskazi19,
joshpalis,
amitgalitz,
jackiehanyang,
minalsha and
saimedhi
as code owners
November 20, 2024 22:19
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
ohltyler
changed the title
Support different types of input / output maps
Update input map schema and reflect changes on UI
Nov 20, 2024
5 tasks
Signed-off-by: Tyler Ohlsen <[email protected]>
…type selected Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
ohltyler
changed the title
Update input map schema and reflect changes on UI
Support different input transform types
Nov 25, 2024
Tests will be updated later; this is all just going to a feature branch for faster iteration. |
@ohltyler, I am not able to play the Demo video. Could you add it again please? |
Sure, added again. Working fine from chrome for me. |
saimedhi
approved these changes
Nov 26, 2024
saimedhi
merged commit Nov 26, 2024
55521e3
into
opensearch-project:feature/new-transform
2 of 3 checks passed
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Nov 26, 2024
* Set up the config -> form -> schema -> template transformations for input_map Signed-off-by: Tyler Ohlsen <[email protected]> * Handle empty casse Signed-off-by: Tyler Ohlsen <[email protected]> * Add new input type selector Signed-off-by: Tyler Ohlsen <[email protected]> * Fix bug of model interface not autopopulating in map Signed-off-by: Tyler Ohlsen <[email protected]> * Support preset templates Signed-off-by: Tyler Ohlsen <[email protected]> * Dynamically render forms; edge case handling of empty docs Signed-off-by: Tyler Ohlsen <[email protected]> * Add bucketing logic and add to model config if applicable Signed-off-by: Tyler Ohlsen <[email protected]> * Set up new configure_template_modal; add config button when template type selected Signed-off-by: Tyler Ohlsen <[email protected]> * Add nested form state in new template modal Signed-off-by: Tyler Ohlsen <[email protected]> * Update layout Signed-off-by: Tyler Ohlsen <[email protected]> * Update template val form config to support subvars Signed-off-by: Tyler Ohlsen <[email protected]> * Add multi input var component & form integration Signed-off-by: Tyler Ohlsen <[email protected]> * Add var copying into input var list Signed-off-by: Tyler Ohlsen <[email protected]> * Update spacing Signed-off-by: Tyler Ohlsen <[email protected]> * Add fetching source data functionality Signed-off-by: Tyler Ohlsen <[email protected]> * Fix some spacing; add output jsonfield Signed-off-by: Tyler Ohlsen <[email protected]> * committing but broken Signed-off-by: Tyler Ohlsen <[email protected]> * Show transformed prompt Signed-off-by: Tyler Ohlsen <[email protected]> * add spacer Signed-off-by: Tyler Ohlsen <[email protected]> * Add nested template vars to input map Signed-off-by: Tyler Ohlsen <[email protected]> * Set up base expression modal Signed-off-by: Tyler Ohlsen <[email protected]> * Get expression modal working Signed-off-by: Tyler Ohlsen <[email protected]> * Add dynamic rendering if template or expression is populated Signed-off-by: Tyler Ohlsen <[email protected]> --------- Signed-off-by: Tyler Ohlsen <[email protected]> (cherry picked from commit 55521e3) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Continuation of #493. Opening to a feature branch so main stays stable. This PR breaks the advanced transform modals entirely.
This PR completes the new UX flows for configuring input transforms. At a high level, this adds support for:
Implementation details:
transformType
, which allows dynamic rendering of different form components based on the type selected. For example, selecting 'Field' will offer a dropdown of the available document or query fields. Selecting 'String' will show a freeform textbox.MapField
component logic inside of the newly-refactoredModelInputs
component, but entirely customized for the input map, since it requires too much custom logic to remain a generic component, and was getting overloaded with props anyways. Note: later on, we will likely clean up all of these props, as the generic form is still used for other processors, such as the text chunking processor'sfield_map
field. Also, copies over some of the logic fromMapArrayField
to dynamically render a 'Configure' button if the map is empty.ConfigureExpressionModal
to configure the JSONPath expression in a dedicated modal. Copies over some of the data fetching & transform logic from the existingInputTransformModal
, but now it is just at a per-field level.ConfigureTemplateModal
to configure a template, as well as any sub-transform variables that can be injected in the template. Copies over some of the data fetching and transform logic from theInputTransformModal
, andConfigurePromptModal
.QuickConfigureModal
to support the new config such that quick-configure values are populated in the input map appropriatelymodel_config
fields (if static), orinput_map
values (if dynamic). Takes any transforms defined under templates and adds them to the underlyinginput_map
.Testing
Demo video:
screen-capture.7.webm
screen-capture.7.webm
Issues Resolved
Makes progress on #491
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.