From 8a5caa486f4e4d36eb051871f003454b167766b5 Mon Sep 17 00:00:00 2001 From: Jakub Walczak Date: Fri, 19 Jan 2024 10:16:51 +0100 Subject: [PATCH] Fix computing dataset --- 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)