Working with CSV data in Automation Framework
Working with CSV Data
If you are working with BI Automation Framework which is delivered as part of BI 4.2 SP05, you will notice that many standard task templates support input parameter values in CSV format. This blog post highlights the points how to work with CSV data in Automation framework
You should always provide header followed by values in comma separated format. For example, Document Refresh Task Template accepts ID/CUIDs in CSV format for the input field “Document”.
Here you can
– Type in CSV values in the UI and press enter. Example id,name;5067,Sales;5012,Marketing;
– Read a CSV file(from CMS repository) through Read Worklist Task Template and use it in Document Refresh task
Note :If the task input field accepts “id” and you input a CSV data that contains data columns other than “id”, then the input field consumes only the “id” values from the CSV data. For example, refer to the below figure:
Fig 1:
In this example, the “Document” input field consumes “id” column values 6029 and 6031 and ignores the other values.
Column and Row Delimiter
The supported column delimiter is “,” and the row delimiter is “;”. A column and a row delimiter in an input field separates the data in column and row format. For example,you can refer to the CSV data in the Fig 1. Here, the comma signifies that name, cuid, status, and id are columns and semi-colon signifies the end of the row.
Note : If you provide CSV file as an input for Read Worklist task template, then the column delimiter is “,” and the row delimiter is “;” or a new line like in fig 2.
Fig 2:
Caution : A value in the CSV data should not contain a comma or a semi-colon.
Hello,
Thank you for this post.
Could you please give me details about "Documents Worklist" and "UniverseMapping Worklist" parameters for change source workflow (i have BO 4.2 SP9)
Thank you very much.
Best regards
Riadh
Document Worklist with CUID:
cuid,docName
AfmHTlzDxpxFotH7ACRNKIY,eFashion-Missing_2DPs
AVu.HEzGVQ1HjUtPPuM647w,eFashion-Splitted_2DPs
AVowiNA1shhEocfzPWEshp8,eFashion-Missing_3DPs_Prompt
You can also just use id instead of cuid.
Here an example for a universe list, contains id and cuid (but only id or only cuid would be sufficient, if cuid is specified, id will be ignored):
unv_id,unx_id,unv_cuid,unx_cuid,unv_name,unx_name
11,11,Aaq5pQtuIlBGkxswUM1qF7k,AZ749Fddrg5AokmCXdD34No,eFashionContext,eFashionContext.unx
11,11,AdPSbb6LbfJInk3Rmr20buU,ARpVLbvasQ9Cmn7Asn6IZ10,Island Resorts Marketing,Island Resorts Marketing.unx
11,11,AZtmGeZqCllIugfputlCuho,AVy_0kTnql9IpZ167YoP5SA,eFashion,eFashion.unx