Below is my modified javascript for a basic pentaho transformation job. From a 2 row ( excluding header row) csv file input an xml output file is being generated. If I remove the 1st and last line of code, it works without error though it process all row.
Question 1: How can I correctly skip the 2nd row from csv file.
Question 2: What is the correct way to get input field datatype like number/string etc. ? getValueMeta function is giving many additional things which I don't need.
My csv file is as below:
My transformation is as below:

//Script here
trans_Status = CONTINUE_TRANSFORMATION;
var column_name = "SSTI_pre-trade";
var column_index = getInputRowMeta().indexOfValue(column_name);
var column_value = row[column_index];
var column_type=getInputRowMeta().getValueMeta(column_index)
writeToLog("b", column_type);
var converted_number=getInputRowMeta().getNumber(row,column_index);
var skip_number=getInputRowMeta().getNumber(row,6);
writeToLog("b", skip_number);
var msg = 'Hello, ' + num2str(converted_number) + "!";
if (skip_number = 2) {trans_Status = SKIP_TRANSFORMATION;}
Below is log when skip transformation not working but it shows that skip_number variable value is correct.
2022/03/16 18:46:22 - HelloWorld - Dispatching started for transformation [HelloWorld]
2022/03/16 18:46:22 - XML output.0 - Opening output stream in encoding: UTF-8
2022/03/16 18:46:22 - CSV file input.0 - Header row skipped in file 'file:///D:/Pentaho_projects/Hello_world/sample2.csv'
2022/03/16 18:46:22 - CSV file input.0 - Finished processing (I=3, O=0, R=0, W=2, U=0, E=0)
2022/03/16 18:46:22 - Modified JavaScript value.0 - Optimization level set to 9.
2022/03/16 18:46:22 - Modified JavaScript value.0 - SSTI_pre-trade Integer(15)<binary-string>
2022/03/16 18:46:22 - Modified JavaScript value.0 - 1.0
2022/03/16 18:46:22 - Modified JavaScript value.0 - SSTI_pre-trade Integer(15)<binary-string>
2022/03/16 18:46:22 - Modified JavaScript value.0 - 2.0
2022/03/16 18:46:22 - Modified JavaScript value.0 - Finished processing (I=0, O=0, R=2, W=0, U=0, E=0)
2022/03/16 18:46:22 - Spoon - The transformation has finished!!
I don't know about your second question, but for the first question, if you have a fixed condition of the rows to skip from the csv, i.e., as you have stated, you want to skip the second row, the easiest way would be to read the csv and add a column when you are configuring the step with the rownumber, and afterwards add a filter rows step with the condition rownumber <> 2:
