Skip to content

issue #2683 : Naming Scheme metadata - #7735

Merged
mattcasters merged 6 commits into
apache:mainfrom
mattcasters:issue-2683
Sep 5, 2026
Merged

issue #2683 : Naming Scheme metadata#7735
mattcasters merged 6 commits into
apache:mainfrom
mattcasters:issue-2683

Conversation

@mattcasters

@mattcasters mattcasters commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

First version of Naming Scheme metadata for issue #2683: reusable rules to normalize identifiers (Hop fields, transform/action/pipeline/workflow/metadata names, variables, database tables/columns, files, and folders).

Apply from the GUI without adding buttons to every dialog:

  • N indicator on name widgets — click to open the matching scheme in a dialog (creates one of the widget type if none exists)
  • CTRL-SHIFT-N (and CTRL-SPACE on fields that do not accept variables) rewrites the current identifier
  • TableView toolbar — apply a scheme to a whole column (with undo)
  • Get Fields on CSV/Text File Input (and other annotated name columns) can auto-apply

A General scheme is offered on every name field that does not have a type-specific scheme. File schemes rewrite only the last path segment and keep the parent and extension (/data/Order ID.csv/data/order_id.csv). Folder schemes rewrite the last segment. Transform/action schemes can use a space separator and capitalize the first word (Check db connections).

Plugin kinds (hop-field, hop-transform, file, …) can be extended by other plugins (for example hop-data-vault) without changing Hop.

CI: hop naming-check and pipeline/workflow Verify report names that would change when the matching scheme is applied.

How to try

  1. Create a Naming Scheme in the Metadata perspective (or click N on any name field — if none exist, Hop creates one of that type).
  2. Default options give e.g. Order IDorder_id. For action/transform names, try lower case + space + capitalize first word.
  3. Focus a name field and press CTRL-SHIFT-N, or click N to review the scheme.
  4. Open CSV File Input fields and use Apply a Naming Scheme to a column on the TableView toolbar; Undo reverts.

Test plan

  • NamingEngineTest (path/extension, space separator, capitalize first word)
  • NamingSchemeShortcutTest, NamingSchemeSelectorTest, NamingSchemeValidatorTest
  • GuiElementsNamingSchemeTypeTest (FILENAME/FOLDER inference)
  • Module + core/ui build; isolated-display UI tests; Spotless clean
  • Manual: create scheme from N on an action name; apply CTRL-SHIFT-N; Save As filename; metadata editor N opens a dialog not a tab

Fixes #2683

Add a Naming Scheme metadata type with a pure naming engine and a
TableView toolbar action to normalize Hop field names (spaces to
underscores/dashes, camelCase, PascalCase, etc.). Types for database
tables/columns and files/folders are reserved for follow-up surfaces.
…ds, and hop naming-check

Add CTRL-SHIFT-N and an N indicator on name widgets (binary-compatible Text siblings),
a General scheme fallback, and Get Fields auto-apply.

Promote naming-scheme kinds to a plugin type so plugins such as hop-data-vault can
register dv-hub / dv-satellite / dm-dimension without changing Hop's enum. Annotate
transform, action, pipeline, workflow, and stock metadata names. Validate by applying
the matching scheme; fail when the string would change.

hop naming-check is the CI surface (text/json, --require-scheme). Pipeline and
workflow Verify report the same errors.
@github-actions github-actions Bot added the Neo4j label Aug 17, 2026
# Conflicts:
#	plugins/actions/waitforsql/src/main/java/org/apache/hop/workflow/actions/waitforsql/ActionWaitForSqlDialog.java
#	plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/csvinput/CsvInputMeta.java
#	plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/fileinput/text/TextFileInputMeta.java
…, and variables

Bring the first version of Naming Schemes to a usable completeness pass:
path-aware file/folder apply, annotated FILENAME/FOLDER widgets, space
separator and capitalize-first-word, N-indicator dialog (create a scheme
when none exists), and Save As / popular file and variable surfaces.
@mattcasters
mattcasters marked this pull request as ready for review September 5, 2026 12:09
@mattcasters mattcasters changed the title issue #2683 : Naming Scheme metadata and TableView apply toolbar issue #2683 : Naming Scheme metadata (first version) Sep 5, 2026
@mattcasters mattcasters changed the title issue #2683 : Naming Scheme metadata (first version) issue #2683 : Naming Scheme metadata Sep 5, 2026
@mattcasters
mattcasters merged commit cffafa7 into apache:main Sep 5, 2026
4 checks passed
@github-actions github-actions Bot removed this from the 2.20 milestone Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Button for replacing spaces in fieldnames with underscores

1 participant