Read
Read hooks allow you to read the contents of files from any file-based storage connection. This is particularly useful for reading configuration files, processing text content, or incorporating file data into your workflow.
Configuration
Properties
from
Yes
into
No
Variable name to store the file content. If not specified, content is included in hook output.
on_failure
No
What to do if the read fails (abort/warn/quiet/skip)
Output
When the read hook executes successfully, it returns the following output that can be accessed in subsequent hooks:
You can access these values in subsequent hooks using the following syntax (jmespath
):
{state.hook_id.status}
- Status of the hook execution{state.hook_id.source_url}
- The normalized URI of the source file{state.hook_id.bytes_read}
- Number of bytes read{state.hook_id.content}
- File content (only if 'into' is not specified){store.variable_name}
- Stored content when using 'into' parameter
Examples
Read Configuration File
Read a configuration file and use its content in subsequent hooks:
Read Query Template
Read a SQL query template from a file and use it in a query hook:
Process Text File Content
Read a text file and process its content:
Last updated