////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /pipeline/transforms/
:language: en_US
:description: The Add Fields Changing Sequence transform simply adds a sequence value which resets each time a value changes in the list of specified fields.

= image:transforms/icons/fieldschangesequence.svg[Add value fields changing sequence Icon, role="image-doc-icon"] Add value fields changing sequence

[%noheader,cols="3a,1a", role="table-no-borders" ]
|===
|
== Description

The Add Fields Changing Sequence transform simply adds a sequence value which resets each time a value changes in the list of specified fields.
|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
!===
!Hop Engine! image:check_mark.svg[Supported, 24]
!Spark! image:cross.svg[Not Supported, 24]
!Flink! image:cross.svg[Not Supported, 24]
!Dataflow! image:cross.svg[Not Supported, 24]
!===
|===


== Options

Here are the options for the transform:

* transform name : the name of the transform, needs to be unique in a pipeline
* Result field: the name of the output field, the sequence
* Start at value: the number to start at each time
* Increment by: the value to increase at each row in the same group
* Init sequence if value of following fields change: you can specify a list of fields here.
If a value in one or more of these fields changes compared to the previous rows, the sequence will be reset to the start value.
