Secure File Transfer Protocol (SFTP) for Replication Flows

You want to replicate data using a secure file transfer protocol (SFTP) for secure and reliable file transfers.

General Information

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

  • While replicating data to an SFTP connection, only the following load types are supported:

    • Initial Only

    • Initial and Delta

Additional Properties

The following properties are relevant for secure file transfer protocol (SFTP) targets. You can review 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

Group Delta by

[only relevant for load type Initial and Delta] Select None [default], Date, or Hour to specify whether you want to create additional folders for sorting updates based on the date or hour.

File Type

Select the file type. You can choose between CSV, JSON, JSONLines, and Parquet [default].

For JSON and JSON Lines, generated files are encoded in UTF-8 format.

Enable Apache Spark Compatibility

[only relevant for file type Parquet] Enable this option to convert and store time data type columns to int64 in the Parquet files. The int64 data type represents microseconds after midnight. This conversion allows the columns to be consumed by Apache Spark.

File Compression

[only relevant for file type Parquet] Select the file compression type. You can choose between None [default], Gzip, and Snappy.

Suppress Duplicates

Enable this option to avoid duplicate records in your target file. During initial load, if a data record already exists in the target, the default system behavior with cloud storage provider targets would be to write this record to the target once again, which results in duplicate records. However, this is not the desired behavior for many use cases of replication flows, and consequently duplicate suppression is active by default. You can deactivate it if required for your specific use case (for example to continue using existing replication flows that do not support duplicate suppression).

Delimiter

[only relevant for file type CSV] Select the character you want to use to separate the columns from each other. You can choose between Comma [default], Colon, Pipe, Semicolon, and Tab.

Header Line

[only relevant for file type CSV] Select True [default] or False to specify whether you want the file to have a header line or not.

Orient

[only relevant for file type JSON] Select the internal structure for the generated JSON files. Currently the only available option is Records: [{column -> value}, ... ,{column -> value}]

Target Columns

The system automatically adds the following columns to the schema of the target table:
  • __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.

These columns are needed to capture changes in the source so that they can be replicated to the target, and you cannot change their names or settings.

If a target column has the same name as one of the columns for change data capturing, the target column has to be renamed. Auto-Projection does this by adding the prefix AUTOPREFIX_ to the name of the target column, for example AUTOPREFIX_timestamp.