Product Features
...
Analytics
Statistical Functions

File Reading Processor

2min
the file reading processor function allows users to read content from a specified file and pass it as a string in the output payload, with customizable parameters for filename management, file size limits, and re reading intervals file reading overview reads a file and passes it as a string in the "value" field of the output payload if the file name field is empty, this processor will attempt to get filename from incoming payload field "filename" otherwise, the filename entered here field will be honored if the "generate filename from expression" option is enabled, the filename will be evaluated as expression for example, if you want to get the filename from "path" and name" properties of incoming connection "aaa", your expression could be aaa path + aaa name + " txt" please note that static text in expressions should be put into quotes time interval, in seconds, allows a file to be re read even if the file is unmodified typically, an input message triggers a file read, if the file is unmodified since the last read the specified time interval resets the “unmodified” status, so that the file can be read at the next input trigger any change of the processor’s setting also resets the "unmodified" status setting 0 means that the “unmodified” status is never reset, and the file is only read if modified "file size limit" if the file/s is bigger than the specified amount of megabytes, reading action on that file/s will be skipped caution! if this limit is set to 0 , files of all sizes will be read, but it can potentially lead to overuse of cpu, memory and storage space if "input file type" is set to value only processor will set incoming data to "value"" payload field if "input file type" is set to csv following options will affect input csv comma contains csv file delimiter (only first character will be used from string entered) csv columns mode controls how processor will determine data column names if this option is set to "indexed" mode processor will assume csv file doesn't have header and will generate payload field names as "fieldxxx" if this option is set to "from header" mode processor will get payload field names from csv file header if this option is set to "custom" mode processor will get payload field names csv custom columns string "data output mode" specifies whether data from file would be sent in one message on record by record please note a message per record data output mode is not supported for binary or json files file reading parameters parameters details file name specifies the name of the file to be read generate filename from expression enables filename evaluation as an expression when activated, allowing for dynamic filename assignment input file type determines the format of the input file, which dictates how the processor handles the content e g , json, csv, parquet file size limit in mb sets a maximum file size (in megabytes) that can be read; if a file exceeds this limit, it will not be processed time interval in seconds defines a timer interval for re evaluating the filename to check for updates on file changes data output mode specifies how the data from the file will be formatted in the output csv comma indicates whether to use commas as delimiters in csv output csv columns mode sets how columns are managed in the csv output format csv customs columns allows the definition of custom columns for csv output, providing flexibility in data structuring