use of software.amazon.awssdk.services.s3.model.CompressionType in project aws-sdk-java-v2 by aws.
the class SelectObjectContentTest method runSimpleQuery.
private static CompletableFuture<Void> runSimpleQuery(S3AsyncClient s3, SelectObjectContentResponseHandler handler) {
InputSerialization inputSerialization = InputSerialization.builder().csv(CSVInput.builder().build()).compressionType(CompressionType.NONE).build();
OutputSerialization outputSerialization = OutputSerialization.builder().csv(CSVOutput.builder().build()).build();
SelectObjectContentRequest select = SelectObjectContentRequest.builder().bucket("test-bucket").key("test-key").expression("test-query").expressionType(ExpressionType.SQL).inputSerialization(inputSerialization).outputSerialization(outputSerialization).build();
return s3.selectObjectContent(select, handler);
}
use of software.amazon.awssdk.services.s3.model.CompressionType in project aws-sdk-java-v2 by aws.
the class SelectObjectContentIntegrationTest method executeSqlQueryWithHandler.
private static CompletableFuture<Void> executeSqlQueryWithHandler(String query, SelectObjectContentResponseHandler handler) {
InputSerialization inputSerialization = InputSerialization.builder().csv(CSVInput.builder().build()).compressionType(CompressionType.NONE).build();
OutputSerialization outputSerialization = OutputSerialization.builder().csv(CSVOutput.builder().build()).build();
SelectObjectContentRequest select = SelectObjectContentRequest.builder().bucket(BUCKET_NAME).key(KEY).expression(query).expressionType(ExpressionType.SQL).inputSerialization(inputSerialization).outputSerialization(outputSerialization).build();
return s3Async.selectObjectContent(select, handler);
}
Aggregations