You work as a Batch Processing Developer for MDFT Pro, a well-known training agency that provides certification courses to students globally. Mark, the Data Processing Manager, has assigned you to develop an Azure Batch solution that processes and converts student assignment files stored in Azure Storage.
The system needs to batch convert video presentations, PDF documents, and code projects submitted by students into standardized formats for grading and archival. You’ve created a function called StartTasks that accepts three parameters:
| Parameter name | Description |
|---|---|
| fileTasks | a list of tasks to be run |
| jobId | the identifier that must be assigned to the job |
| outputContainerSasUrl | a storage SAS URL to store successful converted files |
The function must create a new batch job, configure it with the provided jobId, commit the job to Azure Batch, and then add individual file conversion tasks to the job.
How should you complete the code segment to prepare the batch job?
public List<CloudTasks> StartTasks(List<FileTask> fileTasks, string jobId, string outputContainerSasUrl)
{
var creds = new BatchSharedKeyCredentials(ACCOUNT_URL, ACCOUNT_NAME, ACCOUNT_KEY);
using (BatchClient client = BatchClient.Open(creds))
{
var job = client.JobOperations.____________;
job.Id = jobId;
job.Commit();
// file processing goes here
// ...
}
}
Choose the correct answer from the options below.
Explanations for each answer: