File tree 1 file changed +18
-0
lines changed
RubyScript/src/org/knime/ext/jruby
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,21 @@ class RubyScriptNodeModel (
108
108
# puts FlowVariableList['knime.workspace'] # reading
109
109
# FlowVariableList['filename'] = '1.txt' # writing
110
110
#
111
+ """
112
+
113
+ protected val templateCellAccess =
114
+ """ #
115
+ # For access to a cell of rows use symbolyzed names of columns.
116
+ # All non letter/number symbols of a input column name are changed to underline symbol.
117
+ # Names are converted in downcase. For input 0 only use direct short names. For more
118
+ # then one input use a following format: i#{input_num}_translated_column_name
119
+ # Example:
120
+ # iter = FlowVariableList['currentIteration'] # read loop iterator value
121
+ # $in_data_0.each do |row| # for all data of input 0
122
+ # $out_data_0 << (row << # add existing row with all columns
123
+ # (Cells.new.int(row.data1.to_i + iter))) # add new col. from 'data1' col. plus iter
124
+ # end
125
+ #
111
126
"""
112
127
113
128
protected val templateSnippet =
185
200
186
201
buffer ++= templateFlowVar
187
202
203
+ if (numInputs > 0 )
204
+ buffer ++= templateCellAccess
205
+
188
206
buffer ++= (snippetMode match {
189
207
case true => templateSnippet
190
208
case _ if (numInputs > 0 ) => templateScriptMultiInput
You can’t perform that action at this time.
0 commit comments