Hi,
We´d like to export an existing collection data (most probably after a simple filter query) to csv and upload the file to an AWS S3 bucket, every night.It is around 40000 documents(ending in ~=15KB csv file) but should scale well as the data is expected grow.
From initial investigation I see we can do this by MongoDB Stitch ; configuring a scheduled trigger connected to function doing the export. But I don´t see any examples/discussions about “export” specifically.
Is this good idea?
Upload the CSV to the relevant S3 bucket (using the AWS Service or by importing the AWS SDK)
One caveat is that Stitch currently will only pull up to 50k documents in a single MongoDB request. So, as your data grows you may need to make multiple requests to construct your CSV.