Question
Adqura
IN
Last activity: 23 Jun 2017 12:22 EDT
Is there any OOTB activity that Import a CSV into a Datatype
Hi ,
We have a requirement where we want to import a CSV file from a shared location into a Pega Datatype. The CSV files placed at shared location are Exported from a Datapatype from another Application.
We want to do this through an activity invocation by an REST service. I have tried invoking the activity @baseclass.pxUploadCSVResults but it is failing stating the Properties from Source and Destination are not matching.
The Properties available in Exported SCV are avaliable in Datatype and they are same.
We are working on Pega 7.2.1
Please help me on this.
Thanks and Regards,
Maruthi Naidu Kurupati.
***Updated by moderator: Lochan to add Categories***
-
Like (0)
Shakeer Mohammed -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Virtusa
IN
If it is through Rest Service, i don't think the input wil be excel file, it might be XML or JSON and if so, we can loop over the records in the xml/JSON and map each record to the page of required data type and save the instance
Adqura
IN
Hi Bharath,
Thank you for your response. Through REST service will be passing the file name and Datatype Class name as parameters to it, which will invoke an activity which should read the CSV file and import the file to DataType.
The Activity @baseclass.pxUploadCSVResults will take class name and Page name as parameters to import the CSV files, but some how it is not working.
Thanks and Regards,
Maruthi Naidu Kurupati.
Pegasystems Inc.
IN
Hi Maruthi,
I used the same activity @baseclass.pxUploadCSVResults to import a CSV file and passed the class name, page name and pagelist name and it worked for me. Try passing the PageListProperty parameter along with the other two. The pagelist class and the importing properties must belong to the same class. It should probably work.
Adqura
IN
Hi
Thank you for your response. Let me try it and update you.
Thanks and Regards,
Maruthi Naidu Kurupati.
NIIT Technologies Limited
AU
Please check MSOParseExcelFile activity.
Create an excel template which maps the excel column to the properties in page list. Then pass excel template and the actual excel sheet to the MSOParseExcelFile activity, it will map all excel columns to properties.
Instellars Global Consulting
IN
I have a requirement where I need to read data from a CSV file with two columns which is placed in the server (C://xxx) and then save the data of one of the column from the CSV to a DB table. I have tried using MSOParseExcelFile, it gives error saying the " the template and file doesn't match". pxUploadCSVResult doesn't have parameter to pass the location. Can anybody suggest any approach to achieve this requirement.
JPMorgan Chase & Company
IN
This can be achieved through MSOParseExcelFile. This is demonstrated in Pega Designer Studio from Pega landing Pages -> Application -> Profile -> Requirements. In the Actions drop down, Import from Excel. If you explore design, it may help you to achieve it through MSOParseExcelFile
Instellars Global Consulting
IN
Thanks for the reply.
I tried before using MSOParseExcelFIle, it was giving format mismatch error. I need to parse CSV file but the code of MSOParseExcelFIle says that it checks the format of file as"xlsx". I will try again, please let me know if you can make out anything which I am missing.
-
Nikita Kabirov