File Formats

FileMasker can mask CSV/text-delimited files and files containing JSON records.

CSV / Text-Delimited Files
  

In the context of FileMasker, "CSV" is synonymous with text-delimited files. Strictly speaking, a CSV (Comma Separated Values) file is just one variant of text-delimited files that use commas as a separator. Nevertheless, the term "CSV" is commonly used to refer to text-delimited files in general.

These options, shown below, can be set under the main window's Execution tab in the Input section.
 


 

First row is header

FileMasker shall accept CSV files that contain a heading row, or no heading row. If the heading row is present then it must be the first row in the file.

Separator

The separator character between fields. The TAB character can be specified as \t.

Quote char

The quote character that shall be used if required as specified by the Write quotes combo box.

 

JSON Files
 

FileMasker can process files containing a logically unlimited number of JSON records.

The file must contain only JSON records.

A JSON record begins with a '{' character and ends with a '}' character.

A file can contain multiple format JSON records. FileMasker shall attempt to locate and mask only those fields defined in the masking project. If a field cannot be found in a particular record then the action taken depends on the Missing Field setting.

File layout

Normal

The file begins with a '[' character followed by zero, one or more JSON records separated by commas and a ']' character as the last character in the file.

No Root Array

The file contains only JSON records. There are no comma separators between JSON records. The first character in the file is the '{' of the first JSON record and the last character in the file is the '}' of the last JSON record. Thus the file does not start with '[' or end with ']' as in a normal JSON file.

 

Compression
 

FileMasker can read and write compressed and uncompressed files. Currently the only compression scheme supported is gzip.

Note that the input file compression can be different to the output file compression. E.g. An input file could be uncompressed and FileMasker could produce a compressed masked output file.
 

Input Compression

The input file compression setting can be found under the Execution main tab in the Input file section.


 

The valid options are:

NONE The input file is expected to be uncompressed.

By File Extension The input file name's extension shall determine the compression. Currently this means that if the file name extension is ".gz" then GZIP shall be assumed, otherwise uncompressed shall be assumed.

GZIP The input file is expected to be gzip compressed.

 

Output Compression

The output file compression setting can be found under the Execution main tab in the Output file section.


 

The valid options are:

NONE The output file shall be written uncompressed.

Same as Input The output file shall be written using the same compression scheme that was determined for the input file.

GZIP The output file shall be written using gzip compression.