Get CSV as Collection

AshishKarande

New Member
How Can I get a CSV file as collection?
I have importes Utilitu-Strings VBO and selected "Get CSV As Collection action.
Not sure what should be written in Schema. Where as in collection, I have specified All the fields as there are in CSV file.
Except "Column 0" (This field isn't there in CSV but for some reason BP is showing an error saying this field does not exist when I execute the code without it)
 

Attachments

  • Action.PNG
    63.2 KB · Views: 244
  • Collection.PNG
    59.4 KB · Views: 217

sivagelli

Well-Known Member
You have to use, 'Get CSV Text as Collection' from File Management VBO to get data from CSV file. 'Get CSV as collection' is not the right action to get data from CSV file.

The action 'Get CSV as collection' from String VBO does not accept File path as input. Input has to be a data item of text type.
For Flag type, you cannot pass binary values 1 or 0. It has to be either True or False.
'Schema' is an optional input argument. You can leave it blank while using the 'Get CSV as Collection' action. If left blank, BP will create a collection taking the first row in CSV as field names if you pass 'First Row is Header' as True. otherwise, fields names in the output collection could be Column 0, Column 1,...

Hope this helps!
 
Top