Graph Snapshots and Operator States

You can configure Generation 2 (Gen2) graphs to take snapshots of their state at regular time intervals so that the operators of the graph send small pieces of data (status) to a central data store.

If the graph fails or pauses, SAP Data Intelligence Modeler uses the last status data to reinitialize to the last state before the failure or pause happened.

If you also enable the snapshot feature, recovery of stateful graphs is more efficient than running with recovery only. Enable snapshots only when the Gen2 graph is conceptually stateful. If a graph doesn't have any state to save, it's more efficient to not capture snapshots.

Keeping State Size Small

To keep the status data per operator small, design a computation method that incrementally maintains a small state size. Ensure that you design a computation method when you design the operator and before you implement the operator.

Operators That Support Snapshots

Not every Gen2 operator supports the snapshot feature. When you configure and run a Gen2 graph, but some of the operators in the graph don't support the snapshot feature, the graph can't reinitialize to the state before a failure or a pause, and it can lose data. Therefore, ensure that a graph that you run with the Capture Snapshots option enabled contains only operators that support snapshots.

The following table lists all Gen2 operators, whether they support snapshots, and any conditions that apply.

Category

Operator

Operator ID

Supports Snapshots

Conditions and Remarks

ABAP

Read Data From SAP System

com.sap.abap.reader

Yes

Stores state: list of package IDs in process.

Connectivity

Kafka Consumer

com.sap.kafka.consumer2.v2

With conditions

For details about conditions, see the section Snapshot Support in Kafka Consumer V2.

Connectivity

Kafka Producer

com.sap.kafka.producer.v2

With conditions

For details about conditions, see the section Snapshot Support in Kafka Producer V2.

Connectivity

REST API Client

com.sap.restapi.client

Yes

For details about conditions, see the section Snapshot Support in Rest API Client.

Connectivity (via Flowagent)

Flowagent SQL Executor

com.sap.dh.ds.sql.executor.v2

No

None

Data Quality

Validation Rule

com.sap.dh.dq.validationrule.v2

No

None

Files

Binary File Consumer

com.sap.file.read.v2

With conditions

Stores state: index of the part file last read.

For details about conditions, see the section Snapshot Support in Binary File Consumer.

Files

Binary File Producer

com.sap.file.write.v2

With conditions

Stores state: See the section State Management Support in Binary File Producer.

Files

List Files

com.sap.file.list.v2

With conditions

Stores state: index of file in the files list.

For details about conditions, see the section Snapshot Support in List Files V2.

Processing

Python3 Operator

com.sap.system.python3Operator.v2

Yes

Stores state: depends on user script.

Remote Dataflow

Data Services Transform

com.sap.dataservices.transform.v2

No

None

SAP HANA

Initialize HANA Table

com.sap.hana.initTable.v2

Yes

None

SAP HANA

Read HANA Table

com.sap.hana.readTable.v2

With conditions

Stores state: row index.

For details about conditions, see the section State Management Support in Read HANA Table V2.

SAP HANA

Run HANA SQL

com.sap.hana.runSQL.v2

With conditions

Stores state: last statement executed and the batch index.

For details about conditions, see the section State Management Support in Run HANA SQL V2.

SAP HANA

Write HANA Table

com.sap.hana.writeTable.v2

Yes

None

Structured Data Operators

SAP Application Consumer

com.sap.application.consumer.v3

No

None

Structured Data Operators

SAP Application Producer

com.sap.application.producer.v2

With conditions

Operator supports running with snapshots only when you use it with Structured Data Consumer operators with source partitions. However, the operator doesn't support snapshots when you use it with other consumer operators, like ABAP Readers.

Structured Data Operators

SQL Consumer

com.sap.database.sql.consumer.v3

With conditions

Stores state: partition of input data.

Operator supports running with snapshots only when it reads data using partitions, and when you use it with Structured Data Producer operators.

Structured Data Operators

Table Consumer

com.sap.database.table.consumer.v3

With conditions

Stores state: partition of database table.

Operator supports running with snapshots only when it reads data using partitions, and when you use it with Structured Data Producer operators.

Structured Data Operators

Table Producer

com.sap.database.table.producer.v4

With conditions

Operator supports running with snapshots only when you use it with Structured Data Consumer operators with source partitions. However, the operator doesn't support snapshots when you use it with other consumer operators, like ABAP Readers.

Structured Data Operators

Data Transform

com.sap.datatransform.v2

No

None

Structured Data Operators

Structured File Consumer

com.sap.storage.consumer.v3

With conditions

Stores state: partition of file groupings.

Operator supports running with snapshots only when it reads data using partitions, and when you use it with Structured Data Producer operators.

Structured Data Operators

Structured File Producer

com.sap.storage.producer.v3

With conditions

Operator supports running with snapshots only when you use it with Structured Data Consumer operators with source partitions. However, the operator doesn't support snapshots when you use it with other consumer operators, like ABAP Readers.

Utilities

Binary to Table

com.sap.table.decode.v2

Yes

None

Utilities

Table to Binary

comsaap.table.encode

Yes

None

Utilities

Graph Terminator

com.sap.util.graphTerminator.v2

Yes

None

Utilities

Terminal

com.sap.util.terminal.v2

With conditions

Data that entered the terminal can be lost when it wasn't processed downstream before a pause or restart.

Utilities

Wiretap

com.sap.util.wiretap.v2

Yes

None

Limitations

SAP Data Intelligence doesn't support the following scenarios with the snapshot feature:
  • Circular pipelines: You can't have a pipeline that has a circular connection, which is when the last operator outputs data to the first operator.

  • Debug mode: You can't run graphs in debug mode with snapshots enabled.

  • Group multiplicity: You can't have snapshot generation on graphs with groups that have multiplicity.

  • Subgraphs: You can't create subgraphs for Gen2 pipelines.