Package com.microsoft.azure.kusto.data
Interface StreamingClient
-
- All Known Implementing Classes:
ClientImpl
public interface StreamingClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KustoOperationResultexecute(String command)Execute the provided command against the default database.KustoOperationResultexecuteStreamingIngest(String database, String table, InputStream stream, ClientRequestProperties properties, String streamFormat, String mappingName, boolean leaveOpen)Ingest data from a given stream directly into Kusto database.InputStreamexecuteStreamingQuery(String command)InputStreamexecuteStreamingQuery(String database, String command)InputStreamexecuteStreamingQuery(String database, String command, ClientRequestProperties properties)Query directly from Kusto database using streaming output.
-
-
-
Method Detail
-
executeStreamingIngest
KustoOperationResult executeStreamingIngest(String database, String table, InputStream stream, ClientRequestProperties properties, String streamFormat, String mappingName, boolean leaveOpen) throws DataServiceException, DataClientException
Ingest data from a given stream directly into Kusto database.
This method ingests the data from a given stream directly into Kusto database, using streaming ingestion endpoint, with additional properties mentioned iningestionPropertiesIt is not recommended to use this method directly, but the StreamingIngestClient from the Ingest package.- Parameters:
database- The target database to ingest totable- The target table to ingest tostream- An InputStream which holds the dataproperties- Additional request headers of the ingestion requeststreamFormat- The format of the data in the provided streammappingName- Pre-defined mapping reference. Required for Json and Avro formatsleaveOpen- Specifies if the given stream should be closed after reading or be left open- Returns:
KustoOperationResultobject including the ingestion result- Throws:
DataClientException- An exception originating from a client activityDataServiceException- An exception returned from the service
-
executeStreamingQuery
InputStream executeStreamingQuery(String database, String command, ClientRequestProperties properties) throws DataServiceException, DataClientException
Query directly from Kusto database using streaming output.
This method queries the Kusto database into a stream, using streaming query endpoint, with additional properties mentioned iningestionProperties- Parameters:
database- The target database to querycommand- The command (query or admin command) to executeproperties- Additional request headers of the ingestion request- Returns:
- InputStream Streaming json result, which must be closed by the caller
- Throws:
DataClientException- An exception originating from a client activityDataServiceException- An exception returned from the service
-
executeStreamingQuery
InputStream executeStreamingQuery(String database, String command) throws DataServiceException, DataClientException
-
executeStreamingQuery
InputStream executeStreamingQuery(String command) throws DataServiceException, DataClientException
-
execute
KustoOperationResult execute(String command) throws DataServiceException, DataClientException
Execute the provided command against the default database.
- Parameters:
command- The command to execute- Returns:
KustoOperationResultobject including the ingestion result- Throws:
DataClientException- An exception originating from a client activityDataServiceException- An exception returned from the service
-
-