From 1836d6079192803dcf0ffd9f9539b0383c86f9d6 Mon Sep 17 00:00:00 2001 From: Jakub Walczak Date: Fri, 19 Jan 2024 10:24:30 +0100 Subject: [PATCH] Call compute for each kube if necessery --- drivers/intake_geokube/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/intake_geokube/base.py b/drivers/intake_geokube/base.py index e070427..eb7df18 100644 --- a/drivers/intake_geokube/base.py +++ b/drivers/intake_geokube/base.py @@ -98,7 +98,11 @@ def _process_geokube_dataset( ) if not query: self.log.info("query is empty!") - return dataset.compute() if compute else dataset + if compute: + return dataset.apply( + lambda dc: dc.compute() if isinstance(dc, Delayed) else dc + ) + return dataset if isinstance(dataset, Dataset): self.log.info("filtering with: %s", query.filters) dataset = dataset.filter(**query.filters)