I have received a blob containing a CSV file. Is there a way to skip the last row since they do not require parsing?
Asked
Active
Viewed 580 times
0
-
Please provide enough code so others can better understand or reproduce the problem. – Community Nov 13 '21 at 14:53
1 Answers
0
For this you can use compose connector with substring() expression. Here is an example
After receiving the csv file try to read the last index of '\n' and then use substring. Expression of lastIndexOf() in
compose2
Connector:lastIndexOf(body('Get_blob_content_(V2)'),'\n')
Since you are adding '\n' in
lastIndexOf
the logic app takes it as '\n'. Hence you need to go to your code view and change it to '\n' resulting:lastIndexOf(body('Get_blob_content_(V2)'),' ')
Expression of substring() in
compose
Connectorsubstring(body('Get_blob_content_(V2)'),0,outputs('Compose_2'))
you can even write it together as
substring(body('Get_blob_content_(V2)'),0,lastIndexOf(body('Get_blob_content_(V2)'),' '))

SwethaKandikonda
- 7,513
- 2
- 4
- 18