Confluent Kafka Targets for Replication Flows

If you use Confluent Kafka as the target for your replication flow, you need to consider the following additional specifics and conditions.

Prerequisites

  • Make sure you have created a confluent connection in Connection Management and that it is available in your space. For more information, see Confluent Connections

  • You must ensure that you connect to a supported Confluent/Kafka version. See the SAP Note 3806340 Information published on SAP site.

  • You can only use a non-SAP target for a replication flow if your admin has assigned capacity units to Premium Outbound Integration. For more information, see Premium Outbound Integration and Configure the Size of Your SAP Datasphere Tenant.

Additional Properties

In addition to the properties that apply to all targets (see the list in Creating a Replication Flow), there are the following properties that are only relevant for Confluent Kafka. You can review and change these properties for the replication flow itself (by choosing (Browse target settings)) or for individual replication objects (by selecting an object so that its properties get displayed in the side panel).

Property

Description

Number of Partitions

Enter the number of Confluent partitions to be used for the Confluent topic.

The default value is 1.

Replication Factor

Enter the Confluent replication factor to be used for the Confluent topic.

The default value is 3.

Serialization Format

Select the serialization format for the Confluent topic.

You can choose between AVRO [default] and JSON. If you select AVRO, the column name must consist of only alphanumeric and underscore characters, and it must start with a letter or an underscore.

Compression Type

Select the message compression type.

You can choose between No Compression [default], Gzip, Snappy, LZ4, and ZStandard.

Use Schema Registry

If this option is enabled, the schema of the sent messages is registered in the provided schema registry. If it is disabled, the messages do not contain any schema information or schema-id.

Using no schema registry is only allowed for serialization format JSON.

Record Name

[only relevant if Use Schema Registry is enabled] Enter the record name to be used in the schema that is registered in the schema registry.

If you choose serialization type AVRO, the record name must consist of only alphanumeric and underscore characters, and it must start with a letter or an underscore.

Subject Name Strategy

[only relevant if Use Schema Registry is enabled] Select the strategy for building the subject name under which the schema will be registered in the schema registry.

You can choose between Topic [default], Record, and Topic-Record.

Compatibility Mode

[only relevant if Use Schema Registry is enabled] Select the compatibility mode for the created subject in the schema registry. If the subject already exists and you choose a value other than DEFAULT, the system changes the compatibility mode of the subject to the provided value. If you leave the value as DEFAULT, the system uses the default value that has been defined for the Confluent cluster.

The following Confluent compatibility modes are available:

  • Backward

  • Backward Transitive

  • Forward

  • Forward Transitive

  • Full

  • Full Transitive

  • None

Clamp Decimal Floating Point Data Types

Clamping is enabled by default and cannot be switched off.

See also below under Further Information.

Further Information

The target container is automatically set to "/" because Confluent Kafka does not have a superordinate container layer.

Each record from the source system is transferred into a single message in the target topic. The key of the messages is the combination of all primary key values of the record concatenated by "_".

Clamping is enabled on by default and cannot be switched off. The following decimal floating point and fixed point decimal values may be clamped according to the data type used in the target serialization:
  • decfloat16 and decfloat34 are clamped to DECIMAL(28,6) and DECIMAL(38,6), respectively, for AVRO and to double range (set to +-inf) for JSON.

  • DECIMAL(p,s) is clamped to double range (set to +-inf) for JSON.

Each topic contains the source columns as defined in the mapping for the replication object in the replication flow. The system appends the following columns:

  • __operation_type: Identifies the type of target row:

    __operation_type

    Description

    From Source System Connection Types

    Comments

    L

    Written as operation type for all records during the initial load phase.

    All

     

    I

    New source row added during delta load phase.

    All except SAP S/4HANA on-prem/cloud and ABAP.

     

    U

    Update (after image) to a source row during delta load phase.

    All except SAP S/4HANA on-prem/cloud and ABAP.

     

    U or A

    New source row or update to a source row during delta load phase.

    SAP S/4HANA on-prem/cloud and ABAP and SAP Datasphere delta-enabled local table.

    SAP S/4HANA and other ABAP sources do not distinguish between Insert and Update, and both operations are identified as U (Upserts). If you apply SAP Note 3044005 Information published on SAP site the system identifies all Upserts as A (Autocorrect). The APE_KEEP_UPDATE_OPERATION parameter is described in the SAP Note.

    B

    Update (before image) of an update to a source row during delta load phase.

    SAP HANA cloud/on-prem, Azure SQL, MSSQL, Local Tables (file)

    These records are only sent by some sources and only when the after-image of the update does not pass the filters specified in the replication task.

    X

    The Source row is deleted (with primary key values only) during the delta load phase.

    All except SAP Datasphere delta-enabled local table and Confluent depending on opcode specification.

    The only target columns to contain data for this operation code are codes that reflect the source key columns. All other target columns are empty.

    D

    The Source row is deleted with before image values during the delta load phase.

    SAP Datasphere Delta-enabled local table, and Confluent - depending on opcode specification.

    Delete record contains the before image values.

    M

    Archiving operations after the initial load is complete.

    SAP S/4HANA on-prem/cloud and ABAP SAP Datasphere Delta-enabled local table.

     
  • __sequence_number: An integer value that reflects the sequential order of the delta row in relation to other deltas. This column is empty for initial load rows and is populated only for the following source systems: Microsoft Azure SQL, Microsoft SQL Server (MSSQL) and SAP HANA.

  • __timestamp: The UTC date and time the system wrote the row.

You can rename target objects (topics). The following conditions apply:

  • The new name may consist of the following characters: small latin letters (a-z), capital latin letters (A-Z), numbers (0-9), period (.), underscore (_), hyphen (-).

  • The maximum length for the new name is 249 characters.

Data Types

The following table shows how internal data types are mapped to Confluent Kafka target data types for both AVRO and JSON formats.

SAP Datasphere

AVRO Data Type

JSON Data Type

binary

bytes

String (base64-encoded)

boolean

boolean

Boolean

date

int (date)

String (YYYY-MM-DD)

decimal(p,s)

bytes (DECIMAL p,s)

Number

decfloat16

bytes (DECIMAL 28,6)

Number

decfloat34

bytes (DECIMAL 38,6)

Number

float32

float

Number

float64

double

Number

int8

int

Number

int16

int

Number

int32

int

Number

int64

long

Number

string

string

String

time

long (timestamp-micros)

String (HH:MM:SS.NNNNNNNNNN)

timestamp

long (timestamp-micros)

String (YYYY-MM-DD HH:MM:SS.NNNNNNNNNN)

uint8

int

Number

uint64

bytes (DECIMAL 20,0)

Number