Skip to content

Commit

Permalink
Merge pull request apache#3374 from Mattang-Dan/patch-39
Browse files Browse the repository at this point in the history
Update getvariable.adoc
  • Loading branch information
hansva authored Nov 14, 2023
2 parents 9778175 + 3c27d57 commit a944cb5
Showing 1 changed file with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,24 @@ under the License.
|===
|
== Description

The Get Variables transform allows you to get the value of a variable and create field(s) from it or allows you to add values to existing input rows. You could consider it to be a "Set fields” transform. It can retrieve the value of a previous variable and/or retrieves previous rows or you can set static values to a variable or input rows. You only need to use this transform if you need the variable value in a field.

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.
|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
!===
!Hop Engine! image:check_mark.svg[Supported, 24]
!Spark! image:question_mark.svg[Maybe Supported, 24]
!Flink! image:question_mark.svg[Maybe Supported, 24]
!Dataflow! image:question_mark.svg[Maybe Supported, 24]
!===
|===

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 parameter/svariables using the syntax: ${myVariable}, 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.


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.


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:
Expand All @@ -49,17 +54,6 @@ 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.

|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
!===
!Hop Engine! image:check_mark.svg[Supported, 24]
!Spark! image:question_mark.svg[Maybe Supported, 24]
!Flink! image:question_mark.svg[Maybe Supported, 24]
!Dataflow! image:question_mark.svg[Maybe Supported, 24]
!===
|===

== Options

[options="header"]
Expand Down

0 comments on commit a944cb5

Please sign in to comment.