Hi Joao Borba,
Thanks for reaching out to Microsoft Q&A.
Based on the error message, it appears that the issue lies with the file operation during the blob creation step rather than the query itself. The error message suggests that the problem occurred during the file upload process to Azure Blob Storage. It suggests that the pipeline is failing when trying to create the blob file at the specified path: 'processed-data-restore/extract/auto'. The error message also mentions a BadRequestException from the Cosmos DB .NET SDK.
Some potential causes and suggested fix:
- Ensure the blob storage container and path exist and that the data factory has the necessary permissions to write to that location. Also, the network to blob should be stable.
- Check the cosmosdb query being used in the copy activity. Although the error doesn't mention the query, it's worth verifying that it's still valid and returns data as expected.
- If you recently changed the cosmosdb query, try reverting the change and see if the pipeline runs successfully again.
- Increase the number of retries and the retry interval in the copy activity settings in case the issue is temporary.
- Verify if there are any service limitations or throttling issues on the Cosmos DB or Blob Storage side
- Enable detailed logging in the copy activity to get more information about the failure.
- If the issue persists, consider splitting the copy activity into two separate activities: one to read from cosmos db and another to write to blob storage. This can help isolate the problem.
- As a last resort, try using a different method to copy the data, such as the azure cosmos db mongo api connector instead of the sql api.
Sometimes, the issue may be transient. Retrying the pipeline can help confirm if it's a temporary problem.
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.