GetSequenceFromLocalFile - 6.3

Talend Data Mapper User Guide

EnrichVersion
6.3
EnrichProdName
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend Studio

Name

GetSequenceFromLocalFile

Purpose

Gets and updates sequence number stored in a local file.

Description

This function is used to provide a monotonically increasing sequence number which can be used as a control number, for example in EDI. It does this by using a local file to store the current value of the sequence number. This file can be shared by any number of concurrent maps as it is protected using appropriate locking.

If the file is not present, it is automatically created and the sequence number starts with 1. The contents of the file is simply a ASCII encoded string with a numeric value, so it can be edited to use any desired sequence number.

Return Type

Long

Property

FilePath

The path name of the local file. You may use ${propName} to substitute the value of a Java system property. For example, ${user.home}/control.txt uses the user.home (home directory) Java system property.