ISM Manual
  • Overview
  • Features
  • Components
  • Directory Structure
  • Startup/Shutdown
  • ISM Admin UI
    • Dashboard
    • Flow
    • Job
      • Schedule
    • Channel
      • AMQP
      • Mqtt
      • sFTP
    • Interface
      • System
      • Data Structure
      • Field Group
      • Field
    • Web Service
    • Utility
    • Admin
    • Result
  • Tasks
    • Control Task
      • Route
      • Split/Join
      • Mapping
    • FTP
      • FTP Input
      • FTP Output
      • FTP Transfer
    • DB
      • SQL Executor
      • SQL Batch Executor
    • File
      • File Input
      • File Output
      • File Validator
      • Record Extractor
    • Excel
      • Excel Reader
      • Excel Writer
    • Flow
      • Flow Execution
      • Wait Sub
    • Web Service
      • REST Client
      • Web service Client
    • PGP
      • Encrypt
      • Decrypt
    • Cloud
      • SharePoint
      • Amazon S3
      • Google Cloud Storage
    • Others
      • Email Sender
      • LDAP Client
      • Function
      • Script
      • Java Class
  • REST Service
  • Trouble Shooting
  • Logging Configuration
  • Implementing a Task
  • Custom Class
  • Frequently Asked Questions (FAQ)
    • What is XNARUM Integration Service Mastery (ISM)?
    • What is the purpose of XNARUM?
    • Can XNARUM be customized to specific integration requirements?
    • Is XNARUM scalable?
    • Does XNARUM provide support and maintenance?
Powered by GitBook
On this page
  • Input
  • Output
  • Example
  • FTP Input
  • Validate
  • Route
  • Success
  • Fail
  • FTP Output
  1. Tasks
  2. File

File Validator

PreviousFile OutputNextRecord Extractor

Last updated 1 year ago

This component validates input data against predefined data structure.

This component validates the contents of a single file against a specified data structure. The data structure defines the expected format of the file, including the expected number of columns, their data types, delimiters, and any required or optional fields.

When the component is executed, it reads the input file and validates each row against the specified data structure. If a row does not conform to the structure, an exception can be thrown or just ignored.

This component is useful for ensuring that input files are correctly formatted and contain all the required data before further processing. It can be used in conjunction with other components, such as FileInput and FileOutput, to create a complete data processing pipeline.

Input

Attribute
Description

Data Structure Id

Data structure for the input data validation

File Name

Input file name with path

Use Carriage Return

Use carriage return(\r) and new line(\n) for windows system?

Action on Error

Action if the validation fails.

  • Throw Error

  • Response Code

If Action is Response Code, the output parameter called ValidationResult will have 9 as an error indicator. And the result of the execution of this component will be treated as success.

Validation Type?

Validate type and values?

Validate Repeat Count

Validate the repeat count?

The repeat count is mostly set in the header(master) part.

If yes, this component will validate the repeat count of the input data.

Generate Parsed Contents

Generate parsed data after validation?

Output

Attribute
Description

ValidationResult

The result of the validation

ValidationResultMessage

The result message of the validation

ParsedContents

The parsed data

Example

This example demonstrates a data integration workflow that retrieves a file from a remote sFTP server, validates its contents against a predefined data structure, generates a result file based on the validation outcome, and returns the result file to the same remote sFTP server. If the validation is successful, a success.txt file is generated, otherwise, a fail.txt file is generated.

This screenshot shows the data structure and the input file.

FTP Input

This component collects files from the remote SFTP server and saves them as local files. The target files .txt files which contain header in the name. No suffix is entered. InputFile attribute is the only filter to collect the files.

The input directory has one header-body.txt file.

Validate

The target file to be validated is the first file of the collected files at FTPInput component.

Route

If the result of the validation is success, it will proceed to Success. Otherwise, Fail component will be executed.

Success

Success component generates simple text file named success.txt - Validation succeeded.

Fail

Fail component also generates simple text file named fail.txt. And the contents are the error message from the FileValidator component.

FTP Output

The FTPOutput component transfers the generated file from either Success or Fail components to the same remote sFTP server.