This component is mostly stable but breaking changes could still be made outside of major version releases if a fundamental problem with the component is found.
Downloads objects within a Google Cloud Storage bucket, optionally filtered by a prefix.
Introduced in version 3.43.0.
# Common config fields, showing default values
# All config fields, showing default values
Downloading Large Files
When downloading large files it's often necessary to process it in streamed parts in order to avoid loading the entire file in memory at a given time. In order to do this a
codec can be specified that determines how to break the input into smaller individual messages.
This input adds the following metadata fields to each message:
- All user defined metadata
You can access these metadata fields using function interpolation.
By default Benthos will use a shared credentials file when connecting to GCP services. You can find out more in this document.
The name of the bucket from which to download objects.
An optional path prefix, if set only objects with the prefix are consumed.
The way in which the bytes of a data source should be converted into discrete messages, codecs are useful for specifying how large files or continuous streams of data might be processed in small chunks rather than loading it all in memory. It's possible to consume lines using a custom delimiter with the
delim:x codec, where x is the character sequence custom delimiter. Codecs can be chained with
/, for example a gzip compressed CSV file can be consumed with the codec
|EXPERIMENTAL: Attempts to derive a codec for each file based on information such as the extension. For example, a .tar.gz file would be consumed with the |
|Consume the entire file as a single binary message.|
|EXPERIMENTAL: Consume a stream of Avro OCF datum. The |
|Consume the file in chunks of a given number of bytes.|
|Consume structured rows as comma separated values, the first row must be a header row.|
|Consume structured rows as values separated by a custom delimiter, the first row must be a header row. The custom delimiter must be a single character, e.g. the codec |
|Consume structured rows like |
|Consume the file in segments divided by a custom delimiter.|
|Decompress a gzip file, this codec should precede another codec, e.g. |
|Consume the file in segments divided by linebreaks.|
|Consumes the output of another codec and batches messages together. A batch ends when an empty message is consumed. For example, the codec |
|Consume the file in segments divided by regular expression.|
|Skip one or more byte order marks for each opened reader, this codec should precede another codec, e.g. |
|Parse the file as a tar archive, and consume each file of the archive as a message.|
Whether to delete downloaded objects from the bucket once they are processed.