Input Processors
7 min
the analytics module makes use of built in input processors to retrieve data from a topic, database, or generator the following describes the input processors that are currently available note to add one of these processors to a flow, see add processors and processor connections docid\ v37iaolfgyw 7glazjt1n database batch input generates events by periodically polling specified database measurements you can filter queries; available fields depend on the database and measurement, and for device data, standard filters are datatype , device id , is device status , register id , success , tag , topic , and value for example, filter by tag with "tag" = 'tag1' , or by tag and success with "tag" = 'tag1' and "success" = 1 configure the following parameters to control how data is polled from the database parameters details database select the name of the database from which data will be retrieved filter specify the sql filter for the where part of the query to filter the data from the database metric name name of the metric for timeseriesdb polling period secs set the polling interval in seconds for retrieving data from the database typed define the data typed policy for processing the retrieved data datahub subscribe generates events from a specified datahub topic and attaches them to output note when using the datahub subscribe processor, number values in your json payload are parsed as float datatypes if you're working with processors like switch docid\ m f3yq3k6zdqyhnobyxrr , change docid\ nt4vhgy5 j2retb qmxq , javascript processor docid\ hjithmx5eyvkc04kn6gm6 , or tengo script docid\ scqmhggjpmszenhxn2z4z , ensure your input value and data type configurations are correct configure the following parameters to control which datahub topic the processor subscribes to parameters details format choose the format of the data, with possible values of json or fb (flat buffer) topic select the specific device and tag from which data will be collected ignore failed data (litmus edge version 3 11 0 and later) select to ignore data with the output `success=false` ignore null value (litmus edge version 3 11 0 and later) select to ignore data with the output `value=null` generator a simple generator for testing use t as the variable configure the following parameters to control the generated test signal parameters details amplitude multiplier specify the amplitude multiplier for the generated signal formula choose the supported math functions for generating the signal, such as sin, cos, tan, power, sqrt, log, exp, or abs generator type user defined signal generation or pre defined generation periodicity define the periodicity of the signal in seconds strength specify the strength of the simulated wave approximation, with the maximum value being 10 timer interval set the timer in milliseconds if no event occurs, this timer is used to keep displaying the output continually enter zero to disable the timer inject generates a new message event based on the provided inputs you can manually trigger the inject processor using the invoke button configure the following parameters to control what gets injected and when parameters details inject field this parameter specifies the name of the field in the message where the data will be injected inject value type this defines the type of value being injected options include string, integer, boolean, etc injected value this is the actual value that will be injected into the specified field timing mode this parameter controls when the message injection occurs options include once and interval timer interval type if you're using a timed injection, this parameter defines the type of interval (e g , seconds, minutes, or hours) timer interval value this specifies the duration for the timer interval