This is an automated email from the ASF dual-hosted git repository.
mcasters 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 385be2a023 Update javascript.adoc
new a405bc62bc Merge pull request #3350 from Mattang-Dan/patch-35
385be2a023 is described below
commit 385be2a02386925c31f9094f45f369affa2c96c1
Author: Mattang-Dan <[email protected]>
AuthorDate: Fri Nov 3 12:12:35 2023 -0700
Update javascript.adoc
---
.../modules/ROOT/pages/pipeline/transforms/javascript.adoc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git
a/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/javascript.adoc
b/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/javascript.adoc
index 31aa0dcb4d..d99ad1870c 100644
---
a/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/javascript.adoc
+++
b/docs/hop-user-manual/modules/ROOT/pages/pipeline/transforms/javascript.adoc
@@ -28,6 +28,8 @@ under the License.
The JavaScript transform provides a user interface for building JavaScript
expressions that you can use to modify your data. The code you type in the
script area is executed once for each input row.
+TIP: The variables you set in the JavaScript transform won’t be usable or
testable until you click the “Get variables” button to convert your script
variables into fields. Ensure you select the correct Type for the outgoing
JavaScript fields.
+
|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
@@ -49,6 +51,15 @@ The Javascript transform is not an input transform and
therefore requires an inp
image:transforms/javascript-dialog.png[Javascript Transform Dialog,
width="90%"]
+== Examples
+E.g. JavasScript to create 3 new fields:
+```
+var myVar = incomingField1;
+var myTestString = "my test";
+var myDate = str2date("2020-12-31", "yyyy-MM-dd");
+```
+
+
== Javascript functions Panel
image:transforms/javascript-functions.png[Javascript Functions Panel,
width="35%"]