Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

capsule result urls in api object #2905

Merged
merged 47 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e138809
capsule result urls in api object
thoniTUB Jan 30, 2023
5061e82
adds result provider to path so that an external provider would not c…
thoniTUB Jan 31, 2023
ac48e18
fix tests
thoniTUB Jan 31, 2023
185f05b
generalize result name normalization
thoniTUB Feb 1, 2023
7f6a9ba
adds NoSuchElementException->404 mapper
thoniTUB Feb 1, 2023
cbd8b21
fix ResultNameTest
thoniTUB Feb 1, 2023
01cd6cc
adapt openapi.yaml
thoniTUB Feb 1, 2023
1afd034
switch to labels, switch internal type, mock api
fabian-bizfactory Feb 8, 2023
515b94b
fix icons
fabian-bizfactory Feb 13, 2023
873404f
memorization and save selection to localstorage
fabian-bizfactory Feb 13, 2023
6a3f907
fix format
fabian-bizfactory Feb 13, 2023
ddbfbb8
fix spelling to correct capitalization
fabian-bizfactory Feb 13, 2023
e729176
requested changes
fabian-bizfactory Feb 16, 2023
c21c831
Merge branch 'develop' into feature/result-assets-frontend
fabian-bizfactory Feb 16, 2023
bc0f6ef
capsule result urls in api object
thoniTUB Jan 30, 2023
7253089
adds result provider to path so that an external provider would not c…
thoniTUB Jan 31, 2023
fe61b42
fix tests
thoniTUB Jan 31, 2023
d39f3f7
generalize result name normalization
thoniTUB Feb 1, 2023
3b3404d
adds NoSuchElementException->404 mapper
thoniTUB Feb 1, 2023
b153a71
fix ResultNameTest
thoniTUB Feb 1, 2023
23a7f8a
adapt openapi.yaml
thoniTUB Feb 1, 2023
9ae4826
capsule result urls in api object
thoniTUB Jan 30, 2023
610b421
switch to labels, switch internal type, mock api
fabian-bizfactory Feb 8, 2023
5593c3b
fix icons
fabian-bizfactory Feb 13, 2023
506c293
memorization and save selection to localstorage
fabian-bizfactory Feb 13, 2023
83a6b7b
fix format
fabian-bizfactory Feb 13, 2023
ab7515b
fix spelling to correct capitalization
fabian-bizfactory Feb 13, 2023
5707f15
requested changes
fabian-bizfactory Feb 16, 2023
9f7fba2
remove fqn from method signatures
thoniTUB Feb 20, 2023
e508d54
Suggest adding popperOptions using padding instead of skidding
Kadrian Feb 20, 2023
9edecc9
Merge pull request #2944 from ingef/feature/result-assets-frontend-al…
fabian-bizfactory Feb 20, 2023
9fb55b6
Merge branch 'feature/result-assets-frontend' of https://github.com/b…
fabian-bizfactory Feb 20, 2023
aaba31b
adressed issues
fabian-bizfactory Feb 20, 2023
190ba0e
fix format
fabian-bizfactory Feb 20, 2023
f7491c0
Merge branch 'develop' into feature/result-assets
thoniTUB Feb 27, 2023
33d6ac7
changes from merge
thoniTUB Feb 27, 2023
d2647ad
Merge branch 'feature/result-assets' into feature/result-assets-frontend
fabian-bizfactory Feb 27, 2023
a33da0a
relax token leeway test timing constrain
thoniTUB Feb 28, 2023
39c0465
add long result label to mock
thoniTUB Mar 1, 2023
320f8fb
dice if a too long result label should appear
thoniTUB Mar 1, 2023
878d34f
Merge pull request #2931 from ingef/feature/result-assets-frontend
thoniTUB Mar 1, 2023
217a8ce
Merge branch 'develop' into feature/result-assets
thoniTUB Mar 1, 2023
cf45fe9
run prettier on src/js/api/types.ts
thoniTUB Mar 1, 2023
b56ade2
fix result assets
fabian-bizfactory Mar 6, 2023
7e0836a
Use … Symbol instead of ... for truncation
fabian-bizfactory Mar 6, 2023
53918a7
Merge pull request #2966 from ingef/bug/result-assets-fix-ending
fabian-bizfactory Mar 6, 2023
8903b88
Merge branch 'develop' into feature/result-assets
thoniTUB Mar 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions autodoc/src/main/java/com/bakdata/conquery/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;

import com.bakdata.conquery.apiv1.ExecutionStatus;
import com.bakdata.conquery.apiv1.FilterTemplate;
import com.bakdata.conquery.apiv1.FullExecutionStatus;
import com.bakdata.conquery.apiv1.IdLabel;
import com.bakdata.conquery.apiv1.KeyValue;
import com.bakdata.conquery.apiv1.MetaDataPatch;
import com.bakdata.conquery.apiv1.OverviewExecutionStatus;
import com.bakdata.conquery.apiv1.execution.ExecutionStatus;
import com.bakdata.conquery.apiv1.execution.FullExecutionStatus;
import com.bakdata.conquery.apiv1.execution.OverviewExecutionStatus;
import com.bakdata.conquery.apiv1.frontend.FrontendRoot;
import com.bakdata.conquery.apiv1.frontend.FrontendValue;
import com.bakdata.conquery.apiv1.query.CQElement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.bakdata.conquery.apiv1;

import java.net.URL;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -21,6 +20,10 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;

import com.bakdata.conquery.apiv1.execution.ExecutionStatus;
import com.bakdata.conquery.apiv1.execution.FullExecutionStatus;
import com.bakdata.conquery.apiv1.execution.OverviewExecutionStatus;
import com.bakdata.conquery.apiv1.execution.ResultAsset;
import com.bakdata.conquery.apiv1.query.CQElement;
import com.bakdata.conquery.apiv1.query.ConceptQuery;
import com.bakdata.conquery.apiv1.query.ExternalUpload;
Expand Down Expand Up @@ -219,7 +222,7 @@ public Stream<ExecutionStatus> getQueriesFiltered(Dataset datasetId, UriBuilder
.map(mq -> {
OverviewExecutionStatus status = mq.buildStatusOverview(uriBuilder.clone(), subject);
if (mq.isReadyToDownload()) {
status.setResultUrls(getDownloadUrls(config.getResultProviders(), mq, uriBuilder, allProviders));
status.setResultUrls(getResultAssets(config.getResultProviders(), mq, uriBuilder, allProviders));
}
return status;
});
Expand All @@ -236,7 +239,7 @@ public Stream<ExecutionStatus> getQueriesFiltered(Dataset datasetId, UriBuilder
* @param allProviders If true, forces {@link ResultRendererProvider} to return an URL if possible.
* @return The modified status
*/
public static List<URL> getDownloadUrls(List<ResultRendererProvider> renderer, ManagedExecution exec, UriBuilder uriBuilder, boolean allProviders) {
public static List<ResultAsset> getResultAssets(List<ResultRendererProvider> renderer, ManagedExecution exec, UriBuilder uriBuilder, boolean allProviders) {

return renderer.stream()
.map(r -> r.generateResultURLs(exec, uriBuilder.clone(), allProviders))
Expand Down Expand Up @@ -349,7 +352,7 @@ public FullExecutionStatus getQueryFullStatus(ManagedExecution query, Subject su
final FullExecutionStatus status = query.buildStatusFull(subject);

if (query.isReadyToDownload() && subject.isPermitted(query.getDataset(), Ability.DOWNLOAD)) {
status.setResultUrls(getDownloadUrls(config.getResultProviders(), query, url, allProviders));
status.setResultUrls(getResultAssets(config.getResultProviders(), query, url, allProviders));
}
return status;
}
Expand Down Expand Up @@ -422,7 +425,7 @@ public FullExecutionStatus getSingleEntityExport(Subject subject, UriBuilder uri


FullExecutionStatus status = execution.buildStatusFull(subject);
status.setResultUrls(getDownloadUrls(config.getResultProviders(), execution, uriBuilder, false));
status.setResultUrls(getResultAssets(config.getResultProviders(), execution, uriBuilder, false));
return status;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
package com.bakdata.conquery.apiv1;
package com.bakdata.conquery.apiv1.execution;

import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.util.Collections;
import java.util.List;

import com.bakdata.conquery.models.execution.ExecutionState;
import com.bakdata.conquery.models.identifiable.ids.specific.ManagedExecutionId;
Expand All @@ -10,12 +15,6 @@
import lombok.ToString;
import lombok.experimental.FieldNameConstants;

import java.net.URL;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.util.Collections;
import java.util.List;

@NoArgsConstructor
@ToString
@Data
Expand Down Expand Up @@ -49,7 +48,7 @@ public abstract class ExecutionStatus {
/**
* The urls under from which the result of the execution can be downloaded as soon as it finished successfully.
*/
private List<URL> resultUrls = Collections.emptyList();
private List<ResultAsset> resultUrls = Collections.emptyList();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitte openapi spec anpassen

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ist angepasst :)



}
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
package com.bakdata.conquery.apiv1;
package com.bakdata.conquery.apiv1.execution;

import java.util.Collection;
import java.util.List;
import java.util.Set;

import javax.annotation.Nullable;

import com.bakdata.conquery.apiv1.query.QueryDescription;
import com.bakdata.conquery.io.jackson.serializer.NsIdRefCollection;
Expand All @@ -11,11 +17,6 @@
import lombok.NoArgsConstructor;
import lombok.experimental.FieldNameConstants;

import javax.annotation.Nullable;
import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
* This status holds extensive information about the query description and meta data that is computational heavy
* and can produce a larger payload to requests.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.bakdata.conquery.apiv1;
package com.bakdata.conquery.apiv1.execution;

import lombok.NoArgsConstructor;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.bakdata.conquery.apiv1.execution;

import java.net.URL;

public record ResultAsset(String label, URL url) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import javax.validation.constraints.NotNull;

import com.bakdata.conquery.ConqueryConstants;
import com.bakdata.conquery.apiv1.FullExecutionStatus;
import com.bakdata.conquery.apiv1.execution.FullExecutionStatus;
import com.bakdata.conquery.apiv1.query.concept.filter.CQTable;
import com.bakdata.conquery.apiv1.query.concept.specific.CQConcept;
import com.bakdata.conquery.io.cps.CPSType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.bakdata.conquery.io.jetty.ConqueryErrorExecptionMapper;
import com.bakdata.conquery.io.jetty.ConqueryJsonExceptionMapper;
import com.bakdata.conquery.io.jetty.JsonValidationExceptionMapper;
import com.bakdata.conquery.io.jetty.NoSuchElementExceptionMapper;
import com.bakdata.conquery.models.auth.entities.Subject;
import com.bakdata.conquery.models.auth.web.AuthenticationExceptionMapper;
import com.bakdata.conquery.models.auth.web.AuthorizationExceptionMapper;
Expand All @@ -32,6 +33,7 @@ public static void configure(ConqueryConfig config, ResourceConfig jersey) {
jersey.register(new AuthenticationExceptionMapper());
jersey.register(new AuthorizationExceptionMapper());
jersey.register(JsonValidationExceptionMapper.class);
jersey.register(NoSuchElementExceptionMapper.class);
// default Dropwizard's exception mappers
jersey.register(new ConqueryErrorExecptionMapper());
jersey.register(ConqueryJsonExceptionMapper.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.bakdata.conquery.io.jetty;

import java.util.NoSuchElementException;

import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class NoSuchElementExceptionMapper implements ExceptionMapper<NoSuchElementException> {
@Override
public Response toResponse(NoSuchElementException exception) {
log.trace("Mapping exception:", exception);
return Response.status(Response.Status.NOT_FOUND).type(MediaType.APPLICATION_JSON_TYPE).entity(exception.getMessage()).build();
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.bakdata.conquery.io.result.ResultRender;

import java.net.URL;
import java.util.Collection;

import javax.ws.rs.core.UriBuilder;

import com.bakdata.conquery.apiv1.execution.ResultAsset;
import com.bakdata.conquery.commands.ManagerNode;
import com.bakdata.conquery.io.cps.CPSBase;
import com.bakdata.conquery.models.execution.ManagedExecution;
Expand All @@ -24,7 +24,7 @@ public interface ResultRendererProvider {
* @param allProviders A flag that should override internal "hide-this-url" flags.
* @return An Optional with the url or an empty optional.
*/
Collection<URL> generateResultURLs(ManagedExecution exec, UriBuilder uriBuilder, boolean allProviders);
Collection<ResultAsset> generateResultURLs(ManagedExecution exec, UriBuilder uriBuilder, boolean allProviders);

void registerResultResource(DropwizardResourceConfig environment, ManagerNode manager);
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ String getHeaderValue() {
}


public static Response makeResponseWithFileName(Response.ResponseBuilder response, String label, String fileExtension, MediaType mediaType, ContentDispositionOption disposition) {
public static Response makeResponseWithFileName(Response.ResponseBuilder response, String filename, MediaType mediaType, ContentDispositionOption disposition) {
response.header(HttpHeaders.CONTENT_TYPE, mediaType);
if (!(Strings.isNullOrEmpty(label) || label.isBlank())) {
// Set filename from label if the label was set, otherwise the browser will name the file according to the request path
if (!(Strings.isNullOrEmpty(filename) || filename.isBlank())) {
// Set filename from filename if the filename was set, otherwise the browser will name the file according to the request path
response.header("Content-Disposition", String.format(
"%s; filename=\"%s\"", disposition.getHeaderValue(), FileUtil.makeSafeFileName(label, fileExtension)));
"%s; filename=\"%s\"", disposition.getHeaderValue(), FileUtil.makeSafeFileName(filename)));
}
return response.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static <E extends ManagedExecution & SingleTableResult> Response getArrow

final Dataset dataset = exec.getDataset();

log.info("Downloading results for {} on dataset {}", exec, dataset);
log.info("Downloading results for {}", exec.getId());

ResultUtil.authorizeExecutable(subject, exec);

Expand Down Expand Up @@ -135,7 +135,7 @@ public static <E extends ManagedExecution & SingleTableResult> Response getArrow
}
};

return makeResponseWithFileName(Response.ok(out), exec.getLabelWithoutAutoLabelSuffix(), fileExtension, mediaType, ResultUtil.ContentDispositionOption.ATTACHMENT);
return makeResponseWithFileName(Response.ok(out), String.join(".", exec.getLabelWithoutAutoLabelSuffix(), fileExtension), mediaType, ResultUtil.ContentDispositionOption.ATTACHMENT);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.bakdata.conquery.models.query.SingleTableResult;
import com.bakdata.conquery.models.worker.DatasetRegistry;
import com.bakdata.conquery.models.worker.Namespace;
import com.bakdata.conquery.resources.ResourceConstants;
import com.bakdata.conquery.util.io.ConqueryMDC;
import com.bakdata.conquery.util.io.IdColumnUtil;
import lombok.RequiredArgsConstructor;
Expand All @@ -45,7 +46,7 @@ public <E extends ManagedExecution & SingleTableResult> Response createResult(Su
final Namespace namespace = datasetRegistry.get(dataset.getId());

ConqueryMDC.setLocation(subject.getName());
log.info("Downloading results for {} on dataset {}", exec, dataset);
log.info("Downloading results for {}", exec.getId());

ResultUtil.authorizeExecutable(subject, exec);

Expand Down Expand Up @@ -74,7 +75,12 @@ public <E extends ManagedExecution & SingleTableResult> Response createResult(Su
}
};

return makeResponseWithFileName(Response.ok(out), exec.getLabelWithoutAutoLabelSuffix(), "csv", new MediaType("text", "csv", charset.toString()), ResultUtil.ContentDispositionOption.ATTACHMENT);
return makeResponseWithFileName(
Response.ok(out),
String.join(".", exec.getLabelWithoutAutoLabelSuffix(), ResourceConstants.FILE_EXTENTION_CSV),
new MediaType("text", "csv", charset.toString()),
ResultUtil.ContentDispositionOption.ATTACHMENT
);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.bakdata.conquery.models.query.SingleTableResult;
import com.bakdata.conquery.models.worker.DatasetRegistry;
import com.bakdata.conquery.models.worker.Namespace;
import com.bakdata.conquery.resources.ResourceConstants;
import com.bakdata.conquery.util.io.ConqueryMDC;
import com.bakdata.conquery.util.io.IdColumnUtil;
import lombok.RequiredArgsConstructor;
Expand All @@ -43,7 +44,7 @@ public <E extends ManagedExecution & SingleTableResult> Response createResult(Su

final Dataset dataset = exec.getDataset();

log.info("Downloading results for {} on dataset {}", exec, dataset);
log.info("Downloading results for {}", exec.getId());

ResultUtil.authorizeExecutable(subject, exec);

Expand All @@ -60,7 +61,7 @@ public <E extends ManagedExecution & SingleTableResult> Response createResult(Su
log.trace("FINISHED downloading {}", exec.getId());
};

return makeResponseWithFileName(Response.ok(out), exec.getLabelWithoutAutoLabelSuffix(), "xlsx", MEDIA_TYPE, ResultUtil.ContentDispositionOption.ATTACHMENT);
return makeResponseWithFileName(Response.ok(out), String.join(".", exec.getLabelWithoutAutoLabelSuffix(), ResourceConstants.FILE_EXTENTION_XLSX), MEDIA_TYPE, ResultUtil.ContentDispositionOption.ATTACHMENT);
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.bakdata.conquery.io.result.parquet;

import static com.bakdata.conquery.io.result.ResultUtil.makeResponseWithFileName;
import static com.bakdata.conquery.resources.ResourceConstants.FILE_EXTENTION_PARQUET;

import java.util.Locale;

Expand All @@ -21,6 +20,7 @@
import com.bakdata.conquery.models.query.SingleTableResult;
import com.bakdata.conquery.models.worker.DatasetRegistry;
import com.bakdata.conquery.models.worker.Namespace;
import com.bakdata.conquery.resources.ResourceConstants;
import com.bakdata.conquery.resources.api.ResultParquetResource;
import com.bakdata.conquery.util.io.ConqueryMDC;
import com.bakdata.conquery.util.io.IdColumnUtil;
Expand All @@ -41,7 +41,7 @@ public Response createResultFile(Subject subject, ManagedExecution exec, boolean

final Dataset dataset = exec.getDataset();

log.info("Downloading results for {} on dataset {}", exec, dataset);
log.info("Downloading results for {}", exec.getId());

ResultUtil.authorizeExecutable(subject, exec);

Expand Down Expand Up @@ -74,6 +74,6 @@ public Response createResultFile(Subject subject, ManagedExecution exec, boolean
};


return makeResponseWithFileName(Response.ok(out), exec.getLabelWithoutAutoLabelSuffix(), FILE_EXTENTION_PARQUET, PARQUET_MEDIA_TYPE, ResultUtil.ContentDispositionOption.ATTACHMENT);
return makeResponseWithFileName(Response.ok(out), String.join(".", exec.getLabelWithoutAutoLabelSuffix(), ResourceConstants.FILE_EXTENTION_PARQUET), PARQUET_MEDIA_TYPE, ResultUtil.ContentDispositionOption.ATTACHMENT);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.bakdata.conquery.models.config;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
Expand All @@ -10,6 +9,7 @@
import javax.validation.constraints.NotNull;
import javax.ws.rs.core.UriBuilder;

import com.bakdata.conquery.apiv1.execution.ResultAsset;
import com.bakdata.conquery.commands.ManagerNode;
import com.bakdata.conquery.io.cps.CPSType;
import com.bakdata.conquery.io.result.ResultRender.ResultRendererProvider;
Expand All @@ -33,7 +33,7 @@ public class ArrowResultProvider implements ResultRendererProvider {

@Override
@SneakyThrows(MalformedURLException.class)
public Collection<URL> generateResultURLs(ManagedExecution exec, UriBuilder uriBuilder, boolean allProviders) {
public Collection<ResultAsset> generateResultURLs(ManagedExecution exec, UriBuilder uriBuilder, boolean allProviders) {
if (!(exec instanceof SingleTableResult)) {
return Collections.emptyList();
}
Expand All @@ -43,8 +43,8 @@ public Collection<URL> generateResultURLs(ManagedExecution exec, UriBuilder uriB
}

return List.of(
ResultArrowResource.getFileDownloadURL(uriBuilder.clone(), (ManagedExecution & SingleTableResult) exec),
ResultArrowResource.getStreamDownloadURL(uriBuilder.clone(), (ManagedExecution & SingleTableResult) exec)
new ResultAsset("Arrow File", ResultArrowResource.getFileDownloadURL(uriBuilder.clone(), (ManagedExecution & SingleTableResult) exec)),
new ResultAsset("Arrow Stream", ResultArrowResource.getStreamDownloadURL(uriBuilder.clone(), (ManagedExecution & SingleTableResult) exec))
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.bakdata.conquery.models.config;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

import javax.ws.rs.core.UriBuilder;

import com.bakdata.conquery.apiv1.execution.ResultAsset;
import com.bakdata.conquery.commands.ManagerNode;
import com.bakdata.conquery.io.cps.CPSType;
import com.bakdata.conquery.io.result.ResultRender.ResultRendererProvider;
Expand All @@ -30,7 +30,7 @@ public class CsvResultProvider implements ResultRendererProvider {
private boolean hidden = false;

@SneakyThrows(MalformedURLException.class)
public Collection<URL> generateResultURLs(ManagedExecution exec, UriBuilder uriBuilder, boolean allProviders) {
public Collection<ResultAsset> generateResultURLs(ManagedExecution exec, UriBuilder uriBuilder, boolean allProviders) {
if (!(exec instanceof SingleTableResult)) {
return Collections.emptyList();
}
Expand All @@ -39,7 +39,7 @@ public Collection<URL> generateResultURLs(ManagedExecution exec, UriBuilder uriB
return Collections.emptyList();
}

return List.of(ResultCsvResource.getDownloadURL(uriBuilder, (ManagedExecution & SingleTableResult) exec));
return List.of(new ResultAsset("CSV", ResultCsvResource.getDownloadURL(uriBuilder, (ManagedExecution & SingleTableResult) exec)));
}

@Override
Expand Down
Loading