To connect MongoDB to a data pipeline, you would typically use an API to extract data from MongoDB and then load the data into your desired data pipeline. The API would allow you to fetch the data in a structured format, such as JSON, that can be easily processed by your data pipeline. For a more automated and flexible solution, you can use a third-party tool, such the ELT platform Zuar Runner, to connect to the API.