in ingest/src/main/java/com/microsoft/azure/kusto/ingest/StreamingIngestClient.java [246:279]
private IngestionResult ingestFromBlobImpl(BlobSourceInfo blobSourceInfo, IngestionProperties ingestionProperties,
@Nullable String clientRequestId)
throws IngestionClientException, IngestionServiceException {
String blobPath = blobSourceInfo.getBlobPath();
ClientRequestProperties clientRequestProperties = null;
if (StringUtils.isNotBlank(clientRequestId)) {
clientRequestProperties = new ClientRequestProperties();
clientRequestProperties.setClientRequestId(clientRequestId);
}
IngestionProperties.DataFormat dataFormat = ingestionProperties.getDataFormat();
try {
this.streamingClient.executeStreamingIngestFromBlob(ingestionProperties.getDatabaseName(),
ingestionProperties.getTableName(),
blobPath,
clientRequestProperties,
dataFormat.getKustoValue(),
ingestionProperties.getIngestionMapping().getIngestionMappingReference());
} catch (DataClientException e) {
log.error(e.getMessage(), e);
throw new IngestionClientException(e.getMessage(), e);
} catch (DataServiceException e) {
log.error(e.getMessage(), e);
throw new IngestionServiceException(e.getMessage(), e);
}
log.debug("Blob was ingested successfully.");
IngestionStatus ingestionStatus = new IngestionStatus();
ingestionStatus.status = OperationStatus.Succeeded;
ingestionStatus.table = ingestionProperties.getTableName();
ingestionStatus.database = ingestionProperties.getDatabaseName();
return new IngestionStatusResult(ingestionStatus);
}