Pass two data sources to MailMerge.excute method

I have two data sources from two different tables and i want to pass for templates
How i achieve this .

Pls find program for reference. I am getting documnets and dataSource from Database .
I want to pass to excute method so that while generation of template. it will get injected

ApiResponse<Template> response = new ApiResponse<>();
Template template = dao.getLatestTemplate(templateID);
Document doc = new Document(new ByteArrayInputStream(template.getTemplateData()));
doc.getMailMerge().setUseNonMergeFields(true);

List<Document> documents = new ArrayList<Document>();
documnets = dao.getDocuments();

DataSource dataSource = dao.getTemplateData();

doc.getMailMerge().execute(dataSource);


PdfSaveOptions pso = new PdfSaveOptions();
pso.setCompliance(PdfCompliance.PDF_17);
Document doc2 = new Document(new ByteArrayInputStream(template.getTemplateData()));
doc.appendDocument(doc2, ImportFormatMode.KEEP_SOURCE_FORMATTING);
doc.save("I:/ASPOSE-TEMPLATES/Doc/ASPOSE-Docx-To-PDF.pdf", pso);
response.setMessage("PDF Generated Successfully ");

return response;

@Smital279 You can implement your custom IMailMergeDataSource and combine your data sources according your requirements in your implementation.

Can you please provide me some sample for Custom ImailMergeDatSource with two data sources .

I tried but could not figure it out . Your help is much needed

@Smital279 I have provide a simple code example in another your thread.