I’m trying to create a task to downsampling a bucket but I am not sure how to set the “option” tag inside of the code.
Error
invalid options: no task options defined
Code
client.getTasksApi().createTask(new TaskCreateRequest()
.description("Downsampling statistics to daily statistics.")
.status(TaskStatusType.ACTIVE)
.orgID(provider.getOrganizationId())
.flux(Flux.from("statistics_daily")
//Since a day.
.range(-1L, ChronoUnit.DAYS)
//Aggregate window.
.aggregateWindow().withEvery("1d").withAggregateFunction("sum")
//Write to infinite bucket.
.to("statistics", provider.getOrganizationId(), "(r) => ({sum: r._value})")
.toString()));