I'm getting this error
pickle.PicklingError: Pickling client objects is explicitly not supported. Clients have non-trivial state that is local and unpickleable.
When trying to use beam.ParDo to call a function that looks like this
class ExtractBlobs(beam.DoFn):
def start_bundle(self):
self.storageClient = storage.Client()
def process(self, element):
client = self.storageClient
bucket = client.get_bucket(element)
blobs = list(bucket.list_blobs(max_results=100))
return blobs
I thought the whole point of the start_bundle was to initialize self.someProperty and then use that self.someProperty in the 'process' method to get rid of the pickling problem (from sources below) Could anyone point me into the right direction of how to solve this?
[+] What I've read:
https://github.com/GoogleCloudPlatform/google-cloud-python/issues/3191