Thanks for reaching out to Microsoft Q&A.
Batching Data Loads:
- Use batch windows to process the Change Feed data, instead of streaming it in real-time, to minimize the number of ADF activities and optimize cost.
Optimizing Transformation Logic:
- Avoid overusing complex transformations in ADF data flows, as these can increase cost significantly. For heavy transformations, consider offloading them to Azure Databricks or handling them inside Snowflake after the data load.
Monitoring and Autoscaling:
- Use ADF’s monitoring and autoscaling features to dynamically adjust pipeline runs, reducing costs during off-peak times.
- Leverage Synapse Analytics for improved cost and performance management if the data volumes are substantial.
Handling Deletes:
- Since Cosmos db's change feed doesnt track deletes natively a custom mechanism ("soft delete" flag or a background cleanup process) will need to be implemented. Periodically cleanup the records that are marked for deletion.
hth!
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.