Skip to content

Issue #2955 : Warn when a referenced database connection does not exist - #8245

Merged
hansva merged 1 commit into
apache:mainfrom
mattcasters:issue-2955
Sep 3, 2026
Merged

Issue #2955 : Warn when a referenced database connection does not exist#8245
hansva merged 1 commit into
apache:mainfrom
mattcasters:issue-2955

Conversation

@mattcasters

Copy link
Copy Markdown
Contributor

Fixes #2955

Sergio originally asked for a warning when a transform is assigned a database connection that is not in the project metadata, while still being able to save. This implements that, and extends it so the same check covers actions as well as transforms, without patching every plugin's check() method.

What the user sees

When Validate database connections when saving is on (the default), saving a pipeline or workflow that references a missing RDBMS connection shows a warning:

  • Yes saves anyway
  • No cancels the save
  • Don't run this check when saving turns the option off (same setting as Configuration → Plugins → File validation)

Verify (F7) reports the same findings. Saving is never blocked. Hop does not open a JDBC connection for this check.

Connection names that still contain a variable after the current environment is applied ('${CONNECTION}', 'db_${ENV}', …) are skipped, because the name cannot be decided at design time.

How it works

  • HopMetadataPropertyWalker collects every @HopMetadataProperty(hopMetadataPropertyType = RDBMS_CONNECTION) string, including nested lists (Check DB connections, Table Compare).
  • ReferencedDatabaseConnectionChecker resolves the name, skips unresolved variable tokens, and looks it up in metadata (serializer.exists).
  • Pipeline and workflow Verify call that checker.
  • Save/Save As go through ReferencedConnectionSaveValidator and MessageDialogWithToggle.

A few plugins stored a connection string without RDBMS_CONNECTION and would have been invisible to the walker. Those annotations are added on Wait for SQL, MySQL/MSSQL bulk load, SQL File Output, and Snowflake Warehouse Manager.

Tests

  • StringUtil.containsVariableToken
  • HopMetadataPropertyWalkerTest (nested lists, two connection fields, unannotated fields ignored)
  • ReferencedDatabaseConnectionCheckerTest (missing/present names, unresolved and resolved variables, empty connection, nested lists, pipeline transform, workflow action)

UI compiled with an isolated display. Full mvn clean install apache-rat:check was not run locally.

Docs

Configuration perspective, create pipeline, create workflow, and RDBMS connection pages, with screenshots of the option and the save warning.


…ot exist

Warn on save and Verify when a transform or action names a relational
database connection that is not in project metadata. Saving is never
blocked. Names that still contain a variable after resolving the current
environment are skipped, and the check does not open a JDBC connection.
@hansva
hansva merged commit 4c83679 into apache:main Sep 3, 2026
4 checks passed
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]: Add a warning in case an assigned DB connection does not exists

2 participants