Hello All,
We are having a requirement to split the document uploaded by the user into smaller documents if the size of the document uploaded by the user is more than 5MB.
The file type can be any like Excel, txt, pdf etc. We need to create a solution that will pick the file and divide that in small size files and save in Appian document folder.
Thanks in advance for your response.
Regards
Discussion posts and replies are publicly visible
I don't think there is any OOTB feature or plugin available for this purpose. You need to integrate with a third party utility tool for this.
This comes with a lot of challenges. How would you take care of the order and on what basis would you split the excel file? What if the file has only one sheet with a lot of data? What if the rows are fewer but the columns are more?
Determine the type of the file using Appian's file functions. Depending on the file type, different splitting methods may be required. For example, for a PDF file, you can use a PDF library to split the file into smaller PDFs. Use the appropriate splitting method to divide the file into smaller files. Each smaller file should be less than or equal to 5MB in size. You can use Appian's file functions to create new files and write the split data to them. This is just an idea. You can try and run this.
Hi, Here you need to have create utility to perform these above activity, for PDF documents you can use PDF Tools Here.
For dividing the txt file please extract the complete data using the below function (Plugin) and then write the small amount data.
and Same for Excel.
Note: There is no direct way to implement it.
What is the purpose of this. Why do these file be stored in pieces?
Hi Stefan & All,
I too have a case where a text file of above 50 mb size need to be spitted to smaller size files so that the readtextfromfile can be used to read and parse the raw file and load to db tables .
right now the readtextfromfile is failing on larger size files .
Thanks in advance , appreciate the response.
Raj
IMHO this is just something Appian is not made for.
What format is your file and what does "parse" mean? Why not just dump the whole file into a single field table and process it from there?
Thanks stefan for the response, the file holds dynamic columns and data separated using pipe or unique characters , i meant parsing is extraction of only the interested data for the database tables.
Would the idea work to dump the each whole line into a single database field and then run a stored procedure to process the data?
there are 250K plus lines, along with it we have dynamic columns as well. even to read the file to dump the data , the functions available are not working .