Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I have a table in hive and I want through java to make a for statement with table's length. How can I do that?
Thanks a lot.
for (int j = 0; j <names.length; j++) {
ls_table = names[j][0];
if ((input_row.Equipment_Id != null) && (ls_table != null) && (input_row.Equipment_Id_.startsWith(ls_table))) {
ls_info = "the name is " + names[j][1];
}
I have the file with this names table, but I dont know: 1) How to upload it into talend.
2) How to loop with the table's name.
for (int j = 0; j <names.length; j++) {
ls_table = names[j][0];
if ((input_row.Equipment_Id != null) && (ls_table != null) && (input_row.Equipment_Id_.startsWith(ls_table))) {
ls_info = "the name is " + names[j][1];
}
As you can see in the above code, there is a loop which loops until names.length ( names is the table). Then ls_table has the value of the names[j][0]. My question is how I insert this table into talend and then how can I loop with this table's length like the code above. I know about tfileinputdelimited and tflowiterate but I want to write it in java.