Martini Flat File Functions
Overview
The Flat File class in Martini provides specialized functions for parsing and extracting data from flat files. These functions are specifically designed to work with Martini services and are integral for handling Martini-specific objects.
Utilizing Flat File Functions
Accessing Functions
To access the Flat File functions, navigate to the 'Flat File' folder within the functions node in the Martini Navigator. This folder contains a range of functions dedicated to processing flat files.
Function Usage
Integrating these functions into your Martini services is straightforward. They can be incorporated either through drag-and-drop into your service editor or by using content assist. For content assist, initiate it with the full stop key and use the keyword “flat file” for searching. Ensure you select the correctly prefixed functions from the suggestions list.
General Guidelines for Service Implementation
When implementing services that utilize Flat File functions, consider the following general steps:
-
Identify the Input File: Determine the flat file (e.g., CSV, TXT) that you intend to process. This file will serve as the input for the Flat File functions.
-
Choose Appropriate Flat File Function: Based on your file format and requirements, select the appropriate Flat File function. For example, for CSV files, you might use functions like 'Get Delimited File Input Cursor' or others that align with your data processing needs.
-
Configure Function Properties: Set up the necessary properties for the chosen function. This typically includes specifying the input file stream and configuring any relevant parsing or data extraction parameters.
-
Map Data to Output Model: Post-processing, map the extracted data to your desired output format. This could be a data model, array, or any other structured data format suitable for your application.
-
Validate Output: Finally, ensure the output is as expected. This involves verifying the data integrity, structure, and any specific data transformations that were applied during the processing.