Skip to main content
hemantb0002
October 6, 2023
Question

How Import CSV file and load into CDT(without database)

  • October 6, 2023
  • 5 replies
  • 0 views

I want to parse CSV file and load into CDT without DB. Please suggest a plugin which is not deprecated.

5 replies

mikes0011
Brainy
October 6, 2023

The Excel Tools plug-in contains a function, "previewCSVForImport()", which should allow you to read CSV contents into local data and parse as you will.

hemantb0002
October 11, 2023

Thanks [mention:b45a4f6a20b14a008e4e0ec732a8bf98:e9ed411860ed4f2ba0265705b8793d05], But this has limitation to parse only 1000 rows. I want to parse around 2500 records.

mikes0011
Brainy
October 11, 2023

This sort of detail needs to be mentioned up-front then.

I want to parse around 2500 records.

The only alternative I can think to suggest is that you convert your CSV into an Excel file, and then use the "readExcelSheetPaging()" function, and read paged sets.

mathieud0001
October 11, 2023

You could try using https://community.appian.com/b/appmarket/posts/text-file-reader. Basically load the csv file, split it into an array based on carriage return.

a!localVariables(
  local!items: split(
    readtextfromfile(cons!S_CSV_DOCUMENT, true),
    char(10)
  ),
  a!forEach(
    items: local!items,
    expression: split(fv!item, ",")
  )
)

mikes0011
Brainy
October 11, 2023
Basically load the csv file, split it into an array based on carriage return.

And pray none of the data columns contain escaped commas... (though the parse CSV row function might help with this, otherwise it'll be a nightmare)