Hi folks, we used the GCSResultHandler back in 0.7...
# prefect-community
j
Hi folks, we used the GCSResultHandler back in 0.7.3. We see it writing files into GCS, but how best to decode them for debugging? I tried base64 decode, but that doesn't seem to work right.
c
Hi @jars - the easiest way would be to use the
read
method of the handler itself which has the following logic: https://github.com/PrefectHQ/prefect/blob/0.7.3/src/prefect/engine/result_handlers/gcs_result_handler.py#L103 In short, you
base64
decode + load via
cloudpickle
to get the python object. If you instead want to store the data in GCS using some other format (e.g., JSON, etc.) I highly recommend upgrading to 0.12.1 and using the
GCSResult
class which lets you specify both the location in GCS along with how the data is serialized (the default is still to use
cloudpickle
)
j
Very nice. I will try this.
Great, and timely support as usual, thank you.
c
👍 👍 anytime
j
it worked perfectly prefectly
marvin 2
c
haha amazing 😄