Auto Increment Sequences
autoIncrement.sequence generates a sequential value for each accepted row.
Unlike a plain counter that advances on every attempt, this sequence only advances when the row is kept. If a row is rejected by schema constraints and retried, the skipped attempt does not consume the next number.
Basic Usage
Id
autoIncrement.sequence()
Example output:
1
2
3
Start and Step
Build
autoIncrement.sequence(start=10, step=5)
Example output:
10
15
20
Prefix, Suffix, and Zero Padding
Filename
autoIncrement.sequence(start=1, step=5, prefix="filename", suffix=".txt", zeropadding=3)
Example output:
filename001.txt
filename006.txt
filename011.txt
zeropadding=3 means the numeric portion is padded to a total width of three digits, so 1 becomes 001, 100 stays 100, and 1000 stays 1000.
Constraint-Aware Sequences
This command is especially useful when you generate rows under constraints.
Ticket
autoIncrement.sequence(prefix="T-", zeropadding=4)
Priority
High,Low
Status
Open,Closed
IF [Priority] = "High" THEN [Status] = "Open";
If a generated row fails the constraint and is retried, the ticket sequence does not skip a value.
Parameters
startStarting integer. Defaults to1.stepNon-zero increment between accepted rows. Defaults to1.prefixOptional text before the number.suffixOptional text after the number.zeropaddingOptional integer padding amount. Defaults to0.