It appears to me that you are rushing things a bit. I see that you copy pasted the solution from @bruno29a in another area of your workflow where it is working properly already.
KNIME is pretty clear in this case as to why it’s not working for the second data flow.
For the Column Appender: Table 1 is shorter than the longest table. Corresponding columns were filled using missing values. This is because you took out the Transpose node before.
You are now dealing with multiple columns rather than just one as in the other case. Switch the String Manipulation node with the String Manipulation (Multiple Column) node and use join($$CURRENTCOLUMN$$, padLeft("", $spaces$, " ")) with enforced exclusion of the spaces column.
I have used the column expression node and used Join function with the spaces as below.
join(column(“split_0”)," “,column(“PO Number”),” “,column(“combined column”),” "
,column(“split_5”)," “,
column(“new column”),” “,
column(“new column1”),” “,
column(“new column2”),” “,
column(“new column3”),” ",
column(“Shipment code”))
Now I need to write the output table details to Text file. for that I used CSV Writer File node but the output is not writing as expected into text file as below. pod.txt (722 Bytes)
That looks like the output that I would have expected to see from your join formula. (All columns are joined into a single text column with a space in between them) What is your output goal?
how the output of the column filter the same should come in the Text file while using the CSV writer node. But it the spaces are not as expected in the output. Please find the attached output file. pod.txt (722 Bytes)
Please suggest me if any other nodes are there to create the text file.
I can’t really see the difference on my cell… Perhaps it is just a character code difference that shows a larger space? This is an option in the CSV writer.
Encoding
File Encoding
To write a CSV file with a different encoding, you can select a character set in this tab (UTF-8, UTF-16, etc.), or specify any other encoding supported by your Java VM. The default value uses the default encoding of the Java VM, which may depend on the locale or the Java property “file.encoding”
You can also try skipping the join function in your column expression node and using this to insert a space between columns.
Replace column separator with
Specify a replacement for the value used as a column separator. Used only if the never option is selected for Quote values.
Why are you jumping from one solution to another? You have one that didn’t work, then I and @iCFO gave you some pointers to get to work and now you’re jumping to a completely different one. Which is obviously flawed as well because you hardcode the space in the join()
In this (and also the other) topic I have a feeling you are not actually reading what people mention to you. Why would I invest my time again into helping you when it just falls on deaf man ears?
Yep. This was very confusing. I think that he was trying to insert a certain count of spaces between each column that he had described in the top table, but then just wrote a join formula with a single space between each column.
If you want to go that route, then just put the right number of spaces into your join function?
Really hard to tell what you are trying to do and why you are going about it differently than the suggestions.
I have tried both your suggestions mentioned above and the suggestion provided by ICFO for missing value node is successful.
and I have tried the string manipulation (multiple column) node but I am not getting the expected result.
Hence I moved to join() hard coded and it is successful but while writing as text file as output to my local using CSV writer node the result is not as expected the spaces which I have given are completely changing.
My sincere apologies if I missed something from your suggestions.
When I pasted it is like how I expected but when I submitted it changed to one space between the columns. Please kindly review the attached final output file final utput.txt (2.1 KB)
FYI - The CSV output node required an empty quote character, then under Advanced Settings / Quote Values I changed it to “If Needed”. This maintained the additional spaces in your string in the txt output file.
Edit - I noticed that there was a “space” in the quote character instead of a blank. It is fixed below. Automation-IDOC–Singapore.knwf (377.1 KB)