Hi community,
I'm trying to create an output that I need to put my stream of data but I need to include 2 rows in blank before the header. I saw many workflow samples but I couldn't get to the desired results. Below is what I need as final result. The input data will be the header + rows/details.
Also important to say that I will have to apply datetime in the output which I already did and the format of output needs to be CSV. I'm saying that because I saw workflows using table tool but when adding datetime in the output name I didn't succeed also.
RowNumber | Transact. Date | Debit Account | Credit Account | Trans. Amount | Trans. Currency | Details | LCY Amount | Debit Type account | Credit type account | CUSTOMER TYPE | SERVICES | SERVICE CATEGORY | SOURCE | CUSTOMER TYPE | SERVICES | SERVICE CATEGORY | SOURCE |
1 | 31/12/2022 | 1111 | 222 | 555 | Pay Acc | G | G | 7 | 11 | 1 | 9 |
Solved! Go to Solution.
@binuacs - that creates commas in between the nulls for the header rows - correct?
Off the top of my head - the most straight forward way I can think of doing this is assembling your data section into one column via record id/transpose/summarize (group by/concatenate (quotes and your delimiter or just your delimiter))
this will create a 1 field and then you will then append the two row/one column nulls over the data field. - then you can output to .csv...
basically @brunosa your request is for two different delimiters (blank lines and commas) so it's a bit more complicated than it sounds.
@binuacs It did the work however in the output I still get the first line with data because of the "Fields" value inserted by Alteryx. My wish is to have total 2 blank lines then my header and the input data.
@apathetichell do you have a workflow sample?
Thanks @binuacs and @apathetichell . In the end I had to do a few additional steps to get what I want.
I had to take my data then include another input that will show same headers as I have in the incoming data to union by position, after that I had to use the field tool to show the headers by row then apply record ID and finally cross tab. With that I could create a general header fields and my actual headers in the body of the data.
After it had to union again by position, skip 1st row. Then @binuacs your tips for output name field and also valuable to say to unmark in the output field "First Row Contains Field Names".
Maybe not the best solution but worked just fine.
@apathetichell Yep. This is a good one indeed. Will also keep for use. Thanks a lot!