anchor.diff:                      if request.ForceCreate then queueService.AddDocumentQueue(document)
                       else queueService.AddOrUpdateDocumentQueue(document)
                       rows <- rows + 1
  -                    if jobId |> isNotBlank && rows % 5000 = 0 then 
  +                    if jobId
  +                       |> isNotBlank
  +                       && rows % 5000 = 0 then 
                           let job = 
                               new Job(JobId = jobId, Status = JobStatus.InProgress, Message = "", ProcessedItems = rows)
                           jobService.UpdateJob(job) |> ignore
  -
                   if jobId |> isNotBlank then 
                       let job = 
                           new Job(JobId = jobId, Status = JobStatus.Completed, Message = "Completed", 
  
positive.code:         use textReader = File.OpenText(path)
          let parser = new CsvParser(textReader, configuration)
          let reader = new CsvReader(parser)
          let headers = 
              if body.HasHeaderRecord then
                  if reader.Read()  then
                      reader.FieldHeaders    
                  else defArray
              else
                  body.Headers
  
          match headers with
          | [||] -> fail <| Error.HeaderRowIsEmpty
          | _ ->
              let rec generateDoc (cr : CsvReader) =
                  match cr.Read() with
                  | false -> ok()
                  | true -> 
  
negative.code:                         | Choice2Of2(error) -> 
                              job.FailedItems <- job.FailedItems + 1
                              jobService.UpdateJob(job) |> ignore
                      if isFolder then Directory.EnumerateFiles(path) |> Seq.iter execFileJob
                      else execFileJob path
                      // Mark the Job as Completed with/without errors
                      if job.FailedItems > 0 then job.Status <- JobStatus.CompletedWithErrors
                      else job.Status <- JobStatus.Completed
                      jobService.UpdateJob(job) |> ignore
                      return! loop()
                  }
              loop())
      
      let processRequest index (body : CsvIndexingRequest) = 
          let pathValidation() = 
              if Directory.Exists(body.Path) then ok (body.Path, true)
              else if File.Exists(body.Path) then ok (body.Path, false)
              else fail <| Error.PathDoesNotExist body.Path
          
          let postBulkRequestMessage (path, isDirectory) = 
              let jobId = Guid.NewGuid()
              let job = new Job(JobId = jobId.ToString("N"))
              jobService.UpdateJob(job) |> ignore
              bulkRequestProcessor.Post(body, path, jobId, isDirectory)
              ok <| jobId.ToString("N")
          
          body.IndexName <- index
          body.Validate() >>= pathValidation >>= postBulkRequestMessage
      
      override __.Process(request, body) = SomeResponse(processRequest request.ResName body.Value, Ok, BadRequest)
  
  /// Represents a request which can be sent to Sql connector to index SQL data
  [<Sealed>]
  type SqlIndexingRequest() = 
      inherit DtoBase()
      
      /// Name of the index
      member val IndexName = defString with get, set
      
      /// The query to be used to fetch data from Sql server
      member val Query = defString with get, set
      
      /// Connection string used to connect to the server
      member val ConnectionString = defString with get, set
      
      /// Signifies if all updates to the index are create
      member val ForceCreate = true with get, set
      
      /// Signifies if the connector should create a job for the task and return a jobId which can be used
      /// to check the status of the job.
      member val CreateJob = false with get, set
      
      override __.Validate() = ok()
  
  [<Sealed>]
  [<Name("POST-/indices/:id/sql")>]
  