This is an automated email from the ASF dual-hosted git repository.

hansva 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 f50e92dc1a Update getvariable.adoc
     new 630b01d251 Merge pull request #3468 from Mattang-Dan/patch-59
f50e92dc1a is described below

commit f50e92dc1a774a383827948aa6c01cd085eddc5e
Author: Mattang-Dan <[email protected]>
AuthorDate: Wed Nov 29 11:05:47 2023 -0800

    Update getvariable.adoc
---
 .../pages/pipeline/transforms/getvariable.adoc     | 33 ++++++++++++++++++----
 1 file changed, 27 insertions(+), 6 deletions(-)

diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/getvariable.adoc 
b/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/getvariable.adoc
index 92a7172516..d062583be1 100644
--- 
a/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/getvariable.adoc
+++ 
b/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/getvariable.adoc
@@ -27,6 +27,8 @@ under the License.
 |
 == Description
 The Get Variables transform allows you to get the value of a variable and 
create field(s) from it. You only need to use this transform if you need the 
variable value in a field.
+
+TIP:  If you need to refer to a previous pipeline’s data row(s) fields, then 
use a Get rows from result transform.
 |
 == Supported Engines
 [%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
@@ -38,22 +40,41 @@ The Get Variables transform allows you to get the value of 
a variable and create
 !===
 |===
 
+== Usage
 Note that workflow/environment variables are set only once. A pipeline needs 
to start to get any new variables. A running or sequential or nested (nested 
pipelines are technically the same pipeline) pipeline can't fetch new variable 
values. A pipeline is considered started when a pipeline starts for every row 
in a pipeline executor.
 
-Refer to parameters/variables using the syntax: {openvar}myVariable{closevar}, 
for example from a previous pipeline. If you need to refer to a previous 
pipeline’s data row(s) fields, then use a Get rows transform.
+Refer to parameters/variables using the syntax: {openvar}myVariable{closevar}, 
for example from a previous pipeline.
 
-For example, you can specify: 
`{openvar}java.io.tmpdir{closevar}/hop/tempfile.txt` and it will be expanded to 
`/tmp/hop/tempfile.txt` on Unix-like systems.
+*Two ways to pass fields, parameters to variables downstream:*
 
-You must always specify the data type or you will have errors like the 
following:
+Parameters must be unique per pipeline (case is not a differentiator). The 
pipeline executor parameter value takes precedence over the pipeline’s 
properties parameter value. The sending parameter value takes precedence over 
the default value of the receiving pipeline’s properties parameter.
 
-``2023/07/21 09:30:23 - REST client.0 - ERROR: Because of an error, this 
transform can't continue: 
-  2023/07/21 09:30:23 - REST client.0 - TOKEN_URL None : Unknown type 0 
specified.
-  2023/07/21 09:30:23 - REST client.0 - ERROR: 
org.apache.hop.core.exception.HopValueException:``
+  * Use a pipeline executor transform or a Repeat action:
+    - Send: add fields on the Parameters tab (parameter name can be same as 
field name) to send.
+    - Receive: in the immediate downstream pipeline, use Get variables to set 
variables/fields from Parameters using format: ${myParam}
+  * Edit any upstream pipeline’s properties:
+    - Send: Add a parameter on the parameters tab of a pipeline’s properties 
(Edit pipeline icon), and optionally give it a default value. The parameter 
value can be set in a pipeline using various transforms.
+    - Receive: in the immediate downstream pipeline, use Get variables to set 
variables/fields from Parameters using format: ${myParam}
+
+
+*Other:*
 
 See also the Set Variables transform.
+
 To convert the Variable into a data type other than String use Select Values - 
Meta Data tab.
+
 To get system values, including command line arguments, use the Get System 
Info transform.
 
+For example, in the variable column, you can specify: 
`{openvar}java.io.tmpdir{closevar}/hop/tempfile.txt` and it will be evaluated 
as `/tmp/hop/tempfile.txt` on Unix-like systems.
+
+== Troubleshooting
+
+You must always specify the data type or you will have errors like the 
following:
+
+``2023/07/21 09:30:23 - REST client.0 - ERROR: Because of an error, this 
transform can't continue: 
+  2023/07/21 09:30:23 - REST client.0 - TOKEN_URL None : Unknown type 0 
specified.
+  2023/07/21 09:30:23 - REST client.0 - ERROR: 
org.apache.hop.core.exception.HopValueException:``
+
 == Options
 
 [options="header"]

Reply via email to