We found an issue in QA; I need to add the first row (Row #1) of a CSV file to an already existing CSV file.
The first row looks something like this:
05, ,2021-01-25, ,BMECOL, ,750
How can I insert this as the first row to my already existing CSV file? It must be on the first row. I have googled until my fingers hurt :-). This is urgent to us. Thanks as always!
Mike Kiser
BTW Your Blogs are very interesting!.....
Thanks so much @DamoBird365 ! Now I understand completely; I did locate yesterday that I have so many fields I am bringing back from the DB that it is causing it to do a line break. So I am going to see from the Users if there are any fields I can drop. Your solution on the returns should help me out immensely also. Again, I really appreciate your time and also again, I love this Community! It is better than any Azure Data Factory or any other Community that I am a member of! Mike
Hi @Anonymous
Did you sort it? I am not sure why you would be getting return lines but you could experiment with the following:
Damien
Thanks again...I am trying to understand what you are suggesting....can you please explain a little further (I am an Azure Data Factory guy and have not done much Logic App, but the ADF can not do this type of thing that Logic Apps can do)...thanks so much! We are almost there...Mike
You can do that with a replace expression but ideally you want to find out why/where in the history.
If you create a compose and hit return, you can then use the replace on the string where the string to replace is the compose (i.e. the return line - by hitting return). No need to encode/decode /r/n.
Damien
Hi @DamoBird365 , very sorry for the confusion...that one didn't work...I love the versioning on Logic Apps (ADF doesn't have it and I wish they did) this is the one that is correct but giving an extra /r/n between lines....any suggestions? If I could just remove one of the /r or /n, it might be correct..
Thanks again! MIke
Hi @Anonymous
Your last solution looks a bit odd. It's OK to get both blobs in parallel but then the update should be after both of these actions. You had previously posted this order.
Damien
Hi @Anonymous
You need to look back at the history. Is this already present in the original file(s) or are you seeing this only as a result of the merge?
Damien
Good morning @DamoBird365 , it is looking close now, but for some reason it is putting a /r/n (an extra blank line) in between the items. Do you know how I can get those out? It is what is causing the space between the lines which our QA won't accept. Do you know of a quick way to remove the line space between the lines? And then I might be done :-).
Thank you for your continued help! I'm almost there!
Mike
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional