You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
export_workspace not possible when running UDP with datacube_from_process #844
I'm trying to run a UDP from a namespace, using datacube_from_process. I'd like to save my results to a workspace using export_workspace. My UDP already contains one or more save_result nodes, so I don't need/want to add it manually anymore.
Problem
datacube_from_process returns a DataCube object. However, export_workspace only works on a SaveResult object. The following code snippet can be used to replicate the error:
AttributeError: 'DataCube' object has no attribute 'export_workspace'
Discussion
Would it be possible to allow to call export_workspace directly on a DataCube object? Or, if there's a good reason not to: how can we allow to easily add an export_workspace node to a UDP?
Workaround
For now, I can continue, by adding the following line of code between datacube_from_process and export_workspace:
Would it be possible to allow to call export_workspace directly on a DataCube object?
No, that's intentionally a design that we want to avoid: the openEO process export_workspace works with a STAC resource, so it should not be a method on a DataCube object.
Or, if there's a good reason not to: how can we allow to easily add an export_workspace node to a UDP?
What you want, I think, (and that's what #845 is about), is a helper that is smart enough to give you a SaveResult (e.g. by inspecting the UDP return type), e.g.
save_result=connection.process(process_id='worldcereal_crop_type', ...)
# save_result is automatically a SaveResult object herecube.export_workspace(...
Activity
soxofaan commentedon Jan 7, 2026
indeed, I noticed we encounter this problem more and more, so I started this more general ticket:
Connection.process()? #845No, that's intentionally a design that we want to avoid: the openEO process
export_workspaceworks with a STAC resource, so it should not be a method on aDataCubeobject.What you want, I think, (and that's what #845 is about), is a helper that is smart enough to give you a SaveResult (e.g. by inspecting the UDP return type), e.g.