blob: 4ca176388fc0b540c50597666f909176bfb5c3ec [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/javascript/src/main/doc/javascript.adoc
= JavaScript
== Description
The JavaScript transform allows you to create JavaScript scripts for each transform.
== Options
[width="90%", options="header"]
|===
|Option|Description
|Transform name|Name of the transform this name has to be unique in a single pipeline.
|Scripts|Displays a list of scripts you have created in this transform.
|Constants|A list of pre-defined, static constants.
|Functions|Contains a variety of String, Numeric, Date, Logic and specialized functions you can use to create your script. To add a function to your script, simply double-click on the function or drag it to the location in your script that you wish to insert it.
|Input Fields|A list of inputs coming into the transform. Double-click or use drag and drop to insert the field into your script.
|Output Fields|A list of outputs for the transform.
|Java Script|This section is where you edit the script for this transform. You can insert functions, constants, input fields, etc. from the tree control on the left by double-clicking on the node you wish to insert or by dragging the object onto the Java Script panel.
|Fields|The Fields table contains a list of variables from your script including the ability to add metadata like a descriptive name.
|Get Variables|Retrieves a list of variables from your script.
|Test script|Use this button to test the syntax of your script.
|===