Skip to content

Use terra::wrapCache() as alternative strategy for storing data #170

@Aariq

Description

@Aariq

The unfortunate thing about this being supported by wrap() and unwrap() but not by writeRaster() and the aux.json file is that there may be inconsistent behavior depending on whether an upstream target is skipped or run, whether memory = "transient" or memory = "persistent" and whether a crew controller is used or not. It would still be best to not use longnames and varnames in a targets pipeline.

This, I think, is an argument for using something like terra::wrapCache() like #106. Alternately, perhaps we could issue messages that at least indicate these specific elements will not be preserved and automatically null them out when running a target

Originally posted by @brownag in #141

I know I pushed back against the idea of storing data in a separate cache and just storing metadata (as PackedSpatRasters and the like) in the _targets store, but I do think it would be a good optional strategy, especially if maintaining metadata is important for a workflow.

I'm not sure if this would be a different choice for preserve_metadata or a separate option. I just wanted to open this issue to make sure it stays on our radar.

Related to #106

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions