Skip to content

Commit

Permalink
Merge pull request #3081 from bamaer/3080
Browse files Browse the repository at this point in the history
document available variables in CTRL-Space popup. fixes #3080
  • Loading branch information
hansva committed Jul 14, 2023
2 parents a2e60de + 1a9ee43 commit 0037204
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Most of the times you can replace ctrl with cmd.
|Ctr + n |Create a new work item
|Ctrl + o |Open a work item
|Ctr + s |Save a work item
|Ctrl + Shift + F5|Open the Metadata Exlporer Menu
|Ctrl + Shift + F5|Open the Metadata Explorer Menu
|Ctrl + Space|Opens the variables popup (**NOTE**: only environment variables and variables with the JVM scope are shown here. Variables that are created in pipeline or workflow with a parent, grant parent or root workflow job need to be entered manually))
|Ctrl + w |Close a work item
|Ctrl + q |Quit Hop
|Ctrl + z |Undo last change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ under the License.
:documentationPath: /pipeline/transforms/
:language: en_US
:description: The Get Variables transform allows you to get the value of a variable and returns rows or adds values to existing input rows.
:openvar: ${
:closevar: }

= image:transforms/icons/getvariable.svg[Get variables transform Icon, role="image-doc-icon"] Get variables

Expand All @@ -27,7 +29,7 @@ under the License.

The Get Variables transform allows you to get the value of a variable and returns rows or adds values to existing input rows.

For example, you can specify: ${java.io.tmpdir}/hop/tempfile.txt and it will be expanded to /tmp/hop/tempfile.txt on Unix-like systems.
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.

See also the Set Variables transform.
To convert the Variable into a data type other than String use Select Values - Meta Data tab.
Expand All @@ -51,8 +53,12 @@ To get system values, including command line arguments, use the Get System Info
|Option|Description
|transform Name|The name of this transform as it appears in the pipeline workspace.
|Name|Name of the field.
|Variable|Allows you to enter variables as complete strings to return rows or add values to input rows.
For example, you can specify: ${java.io.tmpdir}/hop/tempfile.txt and it will be expanded to /tmp/hop/tempfile.txt on Unix-like systems.
|Variable a|Allows you to enter variables as complete strings to return rows or add values to input rows.
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.

// CTRL-space snippet
include::../../snippets/variables/control-space.adoc[]

|Type|Specifies the field type: String, Date, Number, Boolean, Integer, BigNumber, Serializable, or Binary.
|Format|Allows you to specify the format of the field after the type has been determined.
|Length|For Number: Total number of significant figures in a number; For String: total length of string; For Date: length of printed output of the string (for example, entering 4 would only return the year).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////



TIP: You can see a list of defined variables by using CTRL-SPACE (CMD-SPACE on OSX) in the input field.
This helper will insert a selected variable into the input field. Only environment variables and variables with the JVM scope are shown here. Variables that are created in pipeline or workflow with a parent, grant parent or root workflow job need to be entered manually
4 changes: 2 additions & 2 deletions docs/hop-user-manual/modules/ROOT/pages/variables.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ You can specify a variable by referencing it like this:
[source]
${VARIABLE_NAME}

*TIP* _You can see a list of defined variables by using CTRL-SPACE (CMD-SPACE on OSX) in the input field.
This helper will insert a selected variable into the input field._
// CTRL-space snippet
include::snippets/variables/control-space.adoc[]

Please note that you don't *have* to specify a variable in these places and that you can combine the variable with other information like:

Expand Down

0 comments on commit 0037204

Please sign in to comment.