merge several documents into one single document

If we have a table has many records which will treated as documents, how to merge those documents to be just one document (one record/cell) and then treat it?

I try to read those record via a text file and then load into strings to document node but I get an error.

ERROR Strings To Document 2:125 Execute failed: Cell at index 0 is null!

Assuming that you really want to combine multiple rows in one document, then use the GroupBy operator to collect your rows. Use the aggregation operator “List” to collect the sentences from each row.
Then follow up with a Java Snippet (Simple) to convert the list to a single string:
return String.join(" ", $List(Description)$);

That should do the trick.

3 Likes

could you please provide a workflow about that?

what do you mean by aggregation operator “List” and return String.join(" ", $List(Description)$) ?

I think you should be able to figure this out on your own.
Use the two Nodes “GroupBy” and “Java Snippet (Simple)”. Check out their parameters / tabs.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.