Example 5 – Limit Lines Option

Setup

  • There are no errors up to line 11.

  • From line 11 and further, there are validation errors.

  • The schema sets the limitLines option to 10.

  • Due to the previous point, the result will be valid because errors above line 10 will not be recognized.

Dataset

sku,label,price 1,BMW,10.35 2,AUDI,20 3,Skoda,10.45 4,Opel,99421 5,Opel,15 6,Seat,100000 7,Seat,10 8,Peugeot,20 9,Peugeot,20 10,Peugeot,20 11,Peugeot,20+++ twelve,,+++

Schema

{ "title": "Pricefx data schema for set 1 - cars", "name": "My Pricefx Schema 1", "description": "Lorem ipsum", "options": { "limitLines": 10 }, "fields": [ { "name": "sku", "title": "Stock-keeping unit", "description": "A stock-keeping unit (SKU) is a scannable bar code, most often seen printed on product labels in a retail store. The label allows vendors to automatically track the movement of inventory. The SKU is composed of an alphanumeric combination of eight-or-so characters.", "constraints": { "required": true, "type": "POSITIVE_INTEGER", "minLength": 1, "minimum": 1, "maximum": 100 } }, { "name": "label", "title": "Car label", "description": "Label of the car. Could be anything.", "constraints": { "required": false, "type": "STRING", "maxLength": 255 } }, { "name": "price", "title": "Price of the car", "description": "The price is important.", "constraints": { "required": true, "type": "DOUBLE", "maximum": 100000 } } ] }

Result

result.rows == 12 result.valid

 

IntegrationManager version 5.8.0