blob: 207b3306fc3cddfcf7d6686d33458fa69d271bf8 [file] [log] [blame]
////
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.
////
:documentationPath: /plugins/transforms/
:language: en_US
:page-alternativeEditUrl: https://github.com/apache/incubator-hop/edit/master/plugins/transforms/getvariable/src/main/doc/getvariable.adoc
= Get variables
== Description
This transform allows you to get the value of a variable. This transform can 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.
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.
== Options
[width="90%", options="header"]
|===
|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.
|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).
|Precision|For Number: Number of floating point digits. Not used for String, Date, or Boolean.
|Currency|Used to interpret numbers with currency symbols. For example, $10,000.00 or E5.000,00.
|Decimal|Used to indicate whether to use a period (".") or comma (",") for number values.
|Group|Used to indicate whether to use a period (".") or comma (",") for number values.
|TrimType|Type trim this field before processing: select either none, left, right, or both (left and right).
|===
== Metadata Injection Support
All fields of this transform support metadata injection. You can use this transform with ETL Metadata Injection to pass metadata to your pipeline at runtime.