BAI File Parser

In this article

Overview

Flattening the text data in a file.

  1. Reads the file(.bai extensions) from the binary input view

  2. Groups the records basing on the file header(01), group header(02) , account identifier(03)

  3. Writes as csv data format in to the output view.

  4. The count of lines for each group will be equal to the number of transaction lines apart from the lines contains only comments(The lines which does not contain type type codes).

  5. Merged Lines: Some of the Account(03) and/or Transaction(16) lines may be merged in the input. These lines will be divided and processed accordingly.

 

Detailed description:

  1. Reads the file from the binary input view.

  2. Removes slash ( '/') at end of each line from the input line before processing.

  3. Groups the transaction records(16 or 88) basing on the file header(01), group header(02) , account identifier(03) 

  4. If the type code not present in the transaction records(16 or 88), then considering the values in this record as comment fields.

  5. If the type code not present in the transaction record -88, and previous transaction record code is 16, then considering the values in this record as comment fields for the previous transaction record as 88 is the continuation record.

  6. Converts date fields into yyyy-mm-dd and time fields into HH:MM.

Date Fields: fileHeader_FileCreationDate, groupHeader_AsofDate,value_date

Time fields: fileHeader_FileCreationTime, groupHeader_AsofTime,value_time

Note:

  1. Ignoring the Record Codes in each line while writing to the output view. 

  2. As a file contains only one file header, the 01-File Header values appended for each line in the output data. 

  3. The count of lines for each group will be equal to the number of transaction lines apart from lines containing comments.

  4. Each line should contain details of Record Codes 01,02,03 and a transaction detail line. Where the values for record code will be unique for each file, the values for group header(02) and account identifier(03) may change.

Snap Type

BAI File Parser is a custom parser snap to parse the incoming data from .bai files to csv data format.

Prerequisites

  • None.

Limitations and Known Issues

None.

Snap Views

Input

This Snap has at exactly one document input view. Each document contains data in the form of text. The file extension is .bai .

Output

This Snap has exactly one document output view. Each document contains corresponding response in the form of csv data.

Error

This Snap has at most one document error view and produces zero or more documents in the view. Each document contains the corresponding error record if snap is not able to process data.

Snap Settings

Label

required

The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Snap Execution

optional

Specifies the execution type:

  • Validate & Execute: Performs limited execution of the Snap (up to 2000 records based on Preview doc count, default is  50 records) during Pipeline validation; performs full execution of the Snap (unlimited records) during Pipeline execution.

  • Execute only: Performs full execution of the Snap during Pipeline execution; does not execute the Snap during Pipeline validation.

  • Disabled: Disables the Snap and, by extension, its downstream Snaps.

Default value: Execute only

 

Snap Pack History

Â