SAP HANA node
Use the SAP HANA node in DataWorks to develop, schedule, and integrate SAP HANA tasks. This topic outlines the development workflow for these tasks.
Background
SAP HANA is a high-performance, in-memory platform that combines database, data processing, and application capabilities to deliver enterprise-grade in-memory computing. For more information, see SAP HANA.
Prerequisites
A workflow must be created.
In DataStudio, you perform development operations for different compute engines within a workflow. Therefore, you must create a workflow before you create a node. For more information, see Create a workflow.
-
An SAP HANA data source is created.
To access data from your SAP HANA database in DataWorks, you must first add the database as an SAP HANA data source. For information about how to create a data source, see Manage data sources. For information about how to use an SAP HANA data source in DataWorks, see SAP HANA data source.
NoteSAP HANA nodes only support SAP HANA data sources added using a JDBC connection string.
-
A network connection is required between the data source and the resource group.
You must ensure that the resource group can access the data source over the network. For more information about how to configure network connections, see Network connectivity solutions.
(Optional, for RAM users) The RAM user for task development must be a member of the workspace with the Develop or Workspace Administrator role. The Workspace Administrator role has extensive permissions and should be granted with caution. For more information about how to add members and grant roles, see Add workspace members.
Limitations
Supported regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Shenzhen), China (Chengdu), China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), Germany (Frankfurt), US (Silicon Valley), and US (Virginia).
Step 1: Create an SAP HANA node
Go to the DataStudio page.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.
-
Right-click the target workflow and choose .
-
In the Create Node dialog box, enter a Name for the node and click OK.
Step 2: Develop an SAP HANA task
(Optional) Select an SAP HANA data source
If your workspace has multiple SAP HANA data sources, you must select one on the node's configuration page. If only one exists, it is selected by default.
SAP HANA nodes only support SAP HANA data sources added using a JDBC connection string.
Develop SQL code: Simple example
In the node's code editor, write your SQL statements. For example:
SELECT * FROM usertablename;
Develop SQL code: Use scheduling parameters
DataWorks provides Scheduling Parameter to dynamically pass values into your code when tasks run periodically. You can define variables in your task code by using the ${variable_name} format. Then, assign a value to the variable in the Scheduling Parameter section on the Properties tab in the right-side navigation pane. For more information about the supported formats and how to configure scheduling parameters, see Supported formats of scheduling parameters and Configure and use scheduling parameters.
The following code provides an example.
SELECT '${var}'; -- You can use this with scheduling parameters.
Step 3: Configure task scheduling
To run the task periodically, click Properties in the right-side pane of the node editor to configure its scheduling properties. For more information, see Overview of task scheduling properties.
Before you can submit the node, you must set its Rerun property and specify its parent nodes.
Step 4: Debug the task
Debug the task to ensure it runs as expected.
(Optional) Select a resource group and assign values to custom parameters.
Click the
icon in the toolbar. In the Parameters dialog box, select the resource group that you want to use for debugging.If your code uses scheduling parameters, you can assign values to them here for debugging. For more information about the value assignment logic, see Task debugging process.
Save and run the code.
Click the
icon in the toolbar to save the code. Then, click the
icon to run the task.(Optional) Perform smoke testing.
If you want to perform smoke testing in the development environment to check whether the scheduled task runs as expected, you can do so when you submit the node or after it is submitted. For more information, see Perform smoke testing.
Step 5: Submit and deploy
After you configure the node, submit and deploy it.
Click the
icon in the toolbar to save the node.Click the
icon in the toolbar to submit the node task.In the Submit dialog box, enter a Change description and select whether to perform a code review after submission.
NoteBefore you can submit the node, you must set its Rerun property and specify its parent nodes.
Code review improves code quality and prevents errors from being deployed. If you enable code review, a reviewer must approve the code before it can be deployed. For more information, see Code review.
If you are using a workspace in standard mode, you must deploy the task to the production environment after it is submitted. To do this, click Deploy in the upper-right corner of the node editor. For more information, see Deploy a task.
What's next
After the task is published, it runs on a recurring schedule based on the node's configuration. Click O&M in the upper-right corner of the node configuration tab to go to Operation Center, where you can view the scheduling and running status of the task. For more information, see Manage recurring tasks.