From 6443b4a671098b497ff253dc21ec565d2759510b Mon Sep 17 00:00:00 2001 From: Ken Payne Date: Wed, 28 Jun 2023 15:34:18 +0100 Subject: [PATCH] create batch dir if missing --- singer_sdk/batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singer_sdk/batch.py b/singer_sdk/batch.py index c321ebdd1..f6bc966ab 100644 --- a/singer_sdk/batch.py +++ b/singer_sdk/batch.py @@ -97,7 +97,7 @@ def get_batches( start=1, ): filename = f"{prefix}{sync_id}-{i}.json.gz" - with self.batch_config.storage.fs() as fs: + with self.batch_config.storage.fs(create=True) as fs: # TODO: Determine compression from config. with fs.open(filename, "wb") as f, gzip.GzipFile( fileobj=f,