Skip to content

Conversation

@ReubenFrankel
Copy link

@ReubenFrankel ReubenFrankel commented Sep 13, 2024

Previously, if you didn't specify prefix config you would end up with a file path containing None

2024-09-13 12:19:31,494 | INFO     | target-s3            | key: my-bucket/None/my-stream/.jsonl.gz

or duplicate forward slashes if set to an empty string

2024-09-13 12:19:31,494 | INFO     | target-s3            | key: my-bucket//my-stream/.jsonl.gz

both of which result in an undesirable structure in S3:

image

This change handles prefix optionally for the key, using pathlib to normalise the path.

2024-09-13 12:42:10,206 | INFO     | target-s3            | key: my-bucket/my-stream.jsonl.gz

A similar issue was resolved where the file name stem in the generated key path ended with a slash (as above) when disabling some of the append_ settings:

image


Fixes #19

@ReubenFrankel
Copy link
Author

Related to #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty file name when append_date_to_filename=False

1 participant