How to add pipelibe in structured streaming.. pls. Provide the syntax..i want to capture only the changss done on collection

How to add pipelibe to structurd straming.pls provide the syntax…i need to capture the changes on collection, adding new document and for deleting

please let me know the syntax using sparksession(instead of sparkconf)