Connecting to SAP HANA Database

SAP HANA is an in-memory, relational database management system used for storing and retrieving data as requested by applications. Astera Centerprise allows you to connect to SAP HANA databases to read data from or to write data to its tables through various database objects. The SAP HANA database can be natively connected to through a database source or a database destination object in Centerprise. We can also use other objects such as lookups, SQL script task in a workflow, database write strategies and in any other object where connecting to a database is supported in Centerprise.

To learn more about SAP HANA and its installation, click here.

In this article, we will explore:

1. A use case where a SAP HANA Database is being used in Astera Centerprise

2. Connecting to a SAP HANA database in Centerprise.

Use Case

Let’s use the SAP HANA Database in an ETL process and see how it can integrate data in a dataflow.

We have Orders data in a Database Table Source. We need to get a list of all the orders to be shipped to Brazil.

To learn more about how a Database Table Source works in Astera Centerprise, click here.

../_images/01-Orders-Source-Table.png

We will use the Filter transformation to filter out records for orders to be shipped to Brazil.

To know more about how a Filter Transformation works in Astera Centerprise, click here.

img

If we preview the output, we can see all orders that are to be shipped to Brazil.

![img](connecting-to-sap-hana-database.assets/03-SAPHANA Output.png)

Now, we can write this data to a database using the Database Table Destination in Astera Centerprise. Let’s drag and drop the Database Table Destination object onto the dataflow designer.

../_images/04-Database-Destination.gif

Let’s connect to the SAP HANA Database using the Database Table Destination object.

1. To configure the Database Table Destination object, right-click on its header and select Properties from the context menu.

../_images/05-Destination-Properties.png

As soon as you’ve selected the Properties option from the context menu, a new window will open.

../_images/06-Destination-Database-Connection.png

This is where you can configure conenction with the database.

2. The first step is to select the Data Provider from the list. We’ll select SAP HANA as our data provider in this case.

../_images/07-SAPHANA-Data-Provider.png

  • Put in the required credentials for your SAP HANA data provider account.
    1. User ID
    2. Password
    3. Server Name
    4. Database
    5. Schema
    6. Port

../_images/08-SAPHANA-Credentials.png

  • Test Connection to make sure that your database connection is successful and click Next.

../_images/09-SAPHANA-Test-Connection.png

Once the connection is established, you can Pick Table or Create Table and modify Writing Options for SAP HANA Database on the Properties screen.

The Database Table Destination object has some specific data writing options for SAP HANA. On the Pick Table screen, there is an added option for Table Type.

The SAP HANA databases support two types of tables for Column and Row based storage, where the data can be stored either in a column table or a row table.

To learn more about Column and Row based data storage, click here.

In the Table Type drop-down, you have two options:

1. Column Stored Table

2. Row Stored Table

../_images/10-SAPHANA-Destination-Table-Type.png

For this use case, we will Create a new table and set the Table Type as Column Stored Table.

To read more on other different data writing options in a Database Table Destination, click here.

../_images/11-SAPHANA-Configured-Destination-Object.png

You have successfully configured SAP HANA as your database provider for your Database Table Destination object. The data will now be written to the SAP HANA Database once we run the dataflow.

../_images/12-SAPHANA-Dataflow.png

This concludes connecting to the SAP HANA Database in Astera Centerprise.