Output Processors
7 min
the analytics module uses built in output processors to write the results of statistical functions and kpis to a topic or database note to add one of these processors to a flow, see add processors and processor connections docid\ v37iaolfgyw 7glazjt1n database output publishes all inputs to a specified database metric configure the following parameters to control where results are published in the database parameters details database if left empty, the processor uses the default database measurement name of the measurement to publish typed publish typed name note the measurement parameter is a required field datahub publish publishes events from input to a specified datahub topic the processor supports event wire types you can use static topic publishing, where all input publishes to one topic that you define with dynamic topic publishing, the processor evaluates topic as an expression and builds a topic for each message from values in that message configure the following parameters to control which datahub topic results are published to parameters details topic the datahub topic to publish to, or the expression that builds the topic when dynamic topic is selected single topic publishes every input to the static topic value defined in here clear this option to append the source instance id of each incoming message to topic , which produces \<topic> \<instance id> single topic is enabled by default dynamic topic considers the topic value as an expression and evaluates it before each publish, so the topic can be built from the incoming payload clear this option to use topic as a literal string filewriter converts input data to a specified format and writes it to a file the processor can append to the end of the file, replace the existing content, or delete the file if you enable the generate filename from expression option, the processor evaluates the filename as an expression for example, to get the filename from the path and name properties of incoming connection aaa , your expression could be aaa path + aaa name + " txt" static text in expressions must be in quotes the timer interval in seconds parameter acts as a "re write file on timer" option this is useful if you want to keep generating new file names after every few intervals if output file type is set to value only , the processor saves incoming data from the value payload field as is if output file type is set to csv , the following options affect the output csv comma is the csv file delimiter (only the first character entered is used) csv header controls whether column names are included csv columns from payload controls whether column names are generated from the payload csv custom columns is a comma separated list of column names (overrides csv columns from payload ) if output file type is set to parquet , the processor rewrites the output file on each incoming payload if write file method is set to append, the processor writes the last parquet buffer capacity records to the file configure the following parameters to control how output is written to a file parameters details file name specifies the name of the file to which data will be written file write method determines how the data will be written to the file append, overwrite, or delete output file type defines the format of the output file, such as json, csv, or parquet add new line indicates whether to append a new line after each entry in the output file create directories automatically creates any required directories that do not exist generate filename from expression enables dynamic filename generation based on specified expressions time interval in seconds sets a timer for rewriting the file at specified intervals csv comma specifies the delimiter to be used in csv files; only the first character will be applied csv header controls the inclusion or exclusion of column names in the output csv file csv columns from payload determines if column names should be generated based on the incoming payload csv custom columns allows the specification of custom column names, overriding those from the payload parquet capacity defines the buffer size for records in parquet files, influencing how data is written imagepreview displays an image from the message payload as a preview in the flow the processor reads image data from a payload field, renders it at a set width, and produces no output configure the following parameters to control which image is shown and how parameters details image name the label shown with the image image property name the payload field that holds the image data default is value required image width name the display width of the image in pixels the height scales automatically to keep the aspect ratio default is 500 stdout prints incoming data to the console note the output is meant for support logs, not for display on the ui