blob: 5ed260ccba8829eec25ef1eb1d71633f5e5bb454 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>ValidateCsv</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">ValidateCsv</h1><h2>Description: </h2><p>Validates the contents of FlowFiles against a user-specified CSV schema. Take a look at the additional documentation of this processor for some schema examples.</p><p><a href="additionalDetails.html">Additional Details...</a></p><h3>Tags: </h3><p>csv, schema, validation</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>Schema</strong></td><td>validate-csv-schema</td><td></td><td id="allowable-values"></td><td id="description">The schema to be used for validation. Is expected a comma-delimited string representing the cell processors to apply. The following cell processors are allowed in the schema definition: [ParseBigDecimal, ParseBool, ParseChar, ParseDate, ParseDouble, ParseInt, ParseLong, Optional, DMinMax, Equals, ForbidSubStr, LMinMax, NotNull, Null, RequireHashCode, RequireSubStr, Strlen, StrMinMax, StrNotNullOrEmpty, StrRegEx, Unique, UniqueHashCode, IsIncludedIn]. Note: cell processors cannot be nested except with Optional.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Header</strong></td><td>validate-csv-header</td><td id="default-value">true</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">True if the incoming flow file contains a header to ignore, false otherwise.</td></tr><tr><td id="name"><strong>Delimiter character</strong></td><td>validate-csv-delimiter</td><td id="default-value">,</td><td id="allowable-values"></td><td id="description">Character used as 'delimiter' in the incoming data. Example: ,<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Quote character</strong></td><td>validate-csv-quote</td><td id="default-value">"</td><td id="allowable-values"></td><td id="description">Character used as 'quote' in the incoming data. Example: "<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>End of line symbols</strong></td><td>validate-csv-eol</td><td id="default-value">\n</td><td id="allowable-values"></td><td id="description">Symbols used as 'end of line' in the incoming data. Example: \n<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Validation strategy</strong></td><td>validate-csv-strategy</td><td id="default-value">FlowFile validation</td><td id="allowable-values"><ul><li>Line by line validation <img src="../../../../../html/images/iconInfo.png" alt="In case an error is found, the input CSV file will be split into two FlowFiles: one routed to the 'valid' relationship containing all the correct lines and one routed to the 'invalid' relationship containing all the incorrect lines. Take care if choosing this option while using Unique cell processors in schema definition:the first occurrence will be considered valid and the next ones as invalid." title="In case an error is found, the input CSV file will be split into two FlowFiles: one routed to the 'valid' relationship containing all the correct lines and one routed to the 'invalid' relationship containing all the incorrect lines. Take care if choosing this option while using Unique cell processors in schema definition:the first occurrence will be considered valid and the next ones as invalid."></img></li><li>FlowFile validation <img src="../../../../../html/images/iconInfo.png" alt="As soon as an error is found in the CSV file, the validation will stop and the whole flow file will be routed to the 'invalid' relationship. This option offers best performances." title="As soon as an error is found in the CSV file, the validation will stop and the whole flow file will be routed to the 'invalid' relationship. This option offers best performances."></img></li></ul></td><td id="description">Strategy to apply when routing input files to output relationships.</td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>valid</td><td>FlowFiles that are successfully validated against the schema are routed to this relationship</td></tr><tr><td>invalid</td><td>FlowFiles that are not valid according to the specified schema are routed to this relationship</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>count.valid.lines</td><td>If line by line validation, number of valid lines extracted from the source data</td></tr><tr><td>count.invalid.lines</td><td>If line by line validation, number of invalid lines extracted from the source data</td></tr><tr><td>count.total.lines</td><td>If line by line validation, total number of lines in the source data</td></tr><tr><td>validation.error.message</td><td>For flow files routed to invalid, message of the first validation error</td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component requires an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>