Skip to main content
This gem runs in .

Overview

The SAP HANA Source and Target gems let you connect Prophecy pipelines to SAP HANA tables for reading and writing data. This page outlines how to configure SAP HANA sources and targets using the appropriate connections, locations, and properties.

Create a SAP HANA gem

To create a SAP HANA Source or Target gem in your pipeline:
1

Add a Source or Target gem to the pipeline

  1. Open your pipeline in the Studio.
  2. Click on Source/Target in the canvas.
  3. Select Source or Target from the dropdown.
  4. Click on the gem to open the configuration.
2

Select SAP HANA format

In the Type tab, select Hana. Then, click Next.
3

Set location details

In the Location tab, set your connection details and table location. To learn more, jump to Source location and Target location.
4

Set table properties

In the Properties tab, set the table properties. To learn more, jump to Source properties and Target properties.
5

Preview data (Source only)

In the Preview tab, load a sample of the data and verify that it looks correct.

Source configuration

Use these settings to configure a SAP HANA Source gem for reading data.

Source location

Source properties

Infer or manually configure the schema of your Source gem. Optionally, add a description for your table.

Target configuration

Use these settings to configure a SAP HANA Target gem for writing data.

Target location

Target properties

Review schema of your Target gem and optionally update the metadata of columns in the schema. You can also add a description for your table.

Generated columns

Generated columns are specific to SAP HANA and auto-generate values for new rows. You can define generated columns in the Properties tab via column-level metadata. Learn more in Generated columns.

Write options

Control how data is written into the target table during each run of the pipeline. Choose whether to overwrite, append, or merge rows.

Advanced options

Configure the following for Wipe & Replace Table, Write Fresh Table; Error if exists, and Append Row modes.

Merge parameters

Configure the following for any Merge.

Example: Merge - Upsert Row

This example demonstrates how the Upsert row merge mode works when updating an SAP HANA table.

Existing table in SAP HANA

Your SAP HANA table currently contains the following product inventory data:

Merge configuration

You configure the merge using the following settings:
  • Merge Mode: Upsert Row (update if key matches, insert if not)
  • Unique Key: product_id
  • Merge Columns: stock_quantity, last_restocked (only these columns are updated/inserted)

Incoming data

New inventory updates are coming through your pipeline:

Result

The Target gem processes each incoming row by checking if the product_id already exists in the target table: After the Target gem completes, your table looks like this:
Product 2001
  • The key matches an existing row, so the system updates the record.
  • stock_quantity changes from 100 → 150, and last_restocked changes from 2025-07-15 → 2025-08-01.
  • category and price remain unchanged.
Product 2003
  • The key matches an existing row, so the system updates the record.
  • stock_quantity changes from 20 → 0, and last_restocked changes from 2025-07-20 → 2025-07-30.
  • category and price remain unchanged.
Product 2005
  • The key does not exist, so a new row is inserted.
  • Only the merge columns receive values: stock_quantity is set to 85 and last_restocked is set to 2025-08-02.
  • category and price are set to null because they are not in the specified merge columns.