You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by mc...@apache.org on 2022/01/12 08:20:37 UTC
[hop] branch master updated: HOP-3584 Table Input: unable to use variable for connection field. HOP-3674 Insert/Update: unable to use a variable as connection name
This is an automated email from the ASF dual-hosted git repository.
mcasters pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 423ba3d HOP-3584 Table Input: unable to use variable for connection field. HOP-3674 Insert/Update: unable to use a variable as connection name
new 8425279 Merge pull request #1269 from sramazzina/HOP-3584
423ba3d is described below
commit 423ba3dda7107a076094a67c26dac67dd333a9fa
Author: Sergio Ramazzina <se...@serasoft.it>
AuthorDate: Mon Jan 10 22:40:03 2022 +0100
HOP-3584 Table Input: unable to use variable for connection field.
HOP-3674 Insert/Update: unable to use a variable as connection name
---
.../hop/pipeline/transforms/insertupdate/InsertUpdateDialog.java | 3 ++-
.../apache/hop/pipeline/transforms/tableinput/TableInputDialog.java | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/transforms/insertupdate/src/main/java/org/apache/hop/pipeline/transforms/insertupdate/InsertUpdateDialog.java b/plugins/transforms/insertupdate/src/main/java/org/apache/hop/pipeline/transforms/insertupdate/InsertUpdateDialog.java
index 1f059ae..f03317e 100644
--- a/plugins/transforms/insertupdate/src/main/java/org/apache/hop/pipeline/transforms/insertupdate/InsertUpdateDialog.java
+++ b/plugins/transforms/insertupdate/src/main/java/org/apache/hop/pipeline/transforms/insertupdate/InsertUpdateDialog.java
@@ -808,7 +808,8 @@ public class InsertUpdateDialog extends BaseTransformDialog implements ITransfor
// Get the information for the dialog into the input structure.
getInfo(input);
- if (input.getConnection() == null) {
+ DatabaseMeta databaseMeta = pipelineMeta.findDatabase(input.getConnection(), variables);
+ if (databaseMeta == null) {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(
BaseMessages.getString(PKG, "InsertUpdateDialog.InvalidConnection.DialogMessage"));
diff --git a/plugins/transforms/tableinput/src/main/java/org/apache/hop/pipeline/transforms/tableinput/TableInputDialog.java b/plugins/transforms/tableinput/src/main/java/org/apache/hop/pipeline/transforms/tableinput/TableInputDialog.java
index 9cca04e..cf9f6da 100644
--- a/plugins/transforms/tableinput/src/main/java/org/apache/hop/pipeline/transforms/tableinput/TableInputDialog.java
+++ b/plugins/transforms/tableinput/src/main/java/org/apache/hop/pipeline/transforms/tableinput/TableInputDialog.java
@@ -401,7 +401,8 @@ public class TableInputDialog extends BaseTransformDialog implements ITransformD
getInfo(input, false);
- if (input.getConnection() == null) {
+ DatabaseMeta databaseMeta = pipelineMeta.findDatabase(input.getConnection(), variables);
+ if (databaseMeta == null) {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "TableInputDialog.SelectValidConnection"));
mb.setText(BaseMessages.getString(PKG, "TableInputDialog.DialogCaptionError"));