Skip to content

Commit

Permalink
Merge pull request #4098 from bamaer/4097
Browse files Browse the repository at this point in the history
various minor doc updates. fixes #4097
  • Loading branch information
hansva authored Jul 1, 2024
2 parents 069d34c + a119b36 commit 7b6c579
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/hop-dev-manual/modules/ROOT/pages/hopweb/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ The `CLASSPATH` lines in the various scripts should look similar to the one belo

Once the classpaths have been updated, make sure to make the scripts executable:

`chmod +x ${CATALINA_HOME}/webapps/ROOT/*.sh`
`chmod +x {openvar}CATALINA_HOME{closevar}/webapps/ROOT/*.sh`


=== Start Tomcat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ At the moment, Hop only supports the `Basic` and `Bearer` authentication methods
|Option|Description
|HTTP Login|Insert the username for the HTTP authentication
|HTTP password|Insert the password for the HTTP authentication
|===

== Fields

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ under the License.
:language: en_US
:description: The Filter Rows transform allows you to filter rows based on conditions and comparisons.

:openvar: {
:openvar: ${
:closevar: }

= image:transforms/icons/filterrows.svg[Filter Rows transform Icon, role="image-doc-icon"] Filter Rows
Expand Down Expand Up @@ -52,7 +52,7 @@ TIP: Lists also works on numeric values like integers. In this case, the list of

Remember that all transforms are executed in parallel, so both true and false paths will run in some cases.

The filter rows transform detects only fields in the input stream. If you want to filter rows based on a variable value, you can modify the previous transform. For example, a table input transform can include the variable in the SQL as another field such as “select field1, field2, ${myvar} as field3 from table1”, then in the filter row condition you can say field1 = field3. Alternatively, you can use a ‘Get Variables’ transform to set parameters in fields. There are various SQL query statements that will always return results using IF EXISTS or IS NULL for example if you always require field(s) and results to be returned.
The filter rows transform detects only fields in the input stream. If you want to filter rows based on a variable value, you can modify the previous transform. For example, a table input transform can include the variable in the SQL as another field such as “select field1, field2, {openvar}myvar{closevar} as field3 from table1”, then in the filter row condition you can say field1 = field3. Alternatively, you can use a ‘Get Variables’ transform to set parameters in fields. There are various SQL query statements that will always return results using IF EXISTS or IS NULL for example if you always require field(s) and results to be returned.

An example is found in the samples project called “filter-rows-basic.hpl”.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ TIP: The formula will not evaluate a field unless the field pre-exists. Either s
|Option|Description
|transform name|Change the name of this transform to explain the purpose of the formula fields you're adding.
|New Field|the name of the new field that will be created from the formula. The Formula transform requires a data row to create a new field (if using a transform that queries for rows, you will have to preview it first to generate a row). You can add a row generator with a single row as the first transform in your pipeline.
|Formula|To use a value from a data row field, use square brackets like [field1]. To use a parameter or variable, use the normal syntax ${param1}. If you use a parameter in place of text like with CONCATENATE (see samples) you must put double quotes around it. Example: CONCATENATE([field1], “${Param1}”).
|Formula|To use a value from a data row field, use square brackets like [field1]. To use a parameter or variable, use the normal syntax {openvar}param1{closevar}. If you use a parameter in place of text like with CONCATENATE (see samples) you must put double quotes around it. Example: `CONCATENATE([field1], “{openvar}Param1{closevar}”)`.

* Note: You may have to add quotes around variables in formulas as variables have no type.
|Value type|the data type for the new formula field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ Parameters must be unique per pipeline (case is not a differentiator). The pipel

* Use a pipeline executor transform or a Repeat action:
- Send: add fields on the Parameters tab (parameter name can be same as field name) to send.
- Receive: in the immediate downstream pipeline, use Get variables to set variables/fields from Parameters using format: ${myParam}
- Receive: in the immediate downstream pipeline, use Get variables to set variables/fields from Parameters using format: {openvar}myParam{closevar}
* Edit any upstream pipeline’s properties:
- Send: Add a parameter on the parameters tab of a pipeline’s properties (Edit pipeline icon), and optionally give it a default value. The parameter value can be set in a pipeline using various transforms.
- Receive: in the immediate downstream pipeline, use Get variables to set variables/fields from Parameters using format: ${myParam}
- Receive: in the immediate downstream pipeline, use Get variables to set variables/fields from Parameters using format: {openvar}myParam{closevar}


*Other:*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ If no fields are added in the Write to log Fields list, it will write out all fi

A Logging level must be set. Set the Log detail level to Basic if you want variables to be printed out.

Example to print a parameter or variable in the Log Message section: ``COUNTER: ${myCounter}``
Example to print a parameter or variable in the Log Message section: ``COUNTER: {openvar}myCounter{closevar}``

If a data row does not exist containing fields, logging fields, parameters, or variables will not work. You may use a "Generate rows" transform to create a dummy row in order to print variables or parameters.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ under the License.
:documentationPath: /workflow/actions/
:language: en_US
:description: The Set Variables action sets variables at various scopes.
:openvar: ${
:closevar: }

= Set Variables

Expand All @@ -36,7 +38,7 @@ The Set Variables action sets variables at various scopes.
* Valid in the current workflow
* Valid in the parent workflow
* Valid in the root workflow
|Variable substitution|Whether or not to substitute variables. Leave unchecked only if you actually want to set a literal value like "${MyVariable}" in the Value column.
|Variable substitution|Whether or not to substitute variables. Leave unchecked only if you actually want to set a literal value like `{openvar}MyVariable{closevar}` in the Value column.
|Variables|A list of variables to set to a certain value at a certain scope.
|===

Expand All @@ -48,4 +50,4 @@ A properties file is a text file with the `.properties` extension. Each line in

== Variable substitution

The "Variable substitution" option allows you to dynamically create and set variables based on existing variable values. When enabled, any variable references in the variable name or value fields will be resolved before the variables are set. This enables the creation of new variables whose names and values depend on other variable contents, providing a flexible and dynamic approach to variable management within workflows. The syntax `${MyVariable}` is used to retrieve variable values.
The "Variable substitution" option allows you to dynamically create and set variables based on existing variable values. When enabled, any variable references in the variable name or value fields will be resolved before the variables are set. This enables the creation of new variables whose names and values depend on other variable contents, providing a flexible and dynamic approach to variable management within workflows. The syntax `{openvar}MyVariable{closevar}` is used to retrieve variable values.

0 comments on commit 7b6c579

Please sign in to comment.