loading

Smart Data Integration (SDI) – scheduling and monitoring

Scheduling 

It is very common when system-to-system data replication should occur according to a particular schedule. Scheduled jobs define recurring tasks that run in the background. We will provide a scenario where we automatically run the Flowgraph which was created in the previous blog.

As prerequisites, you always should consider the following:

  • You have access to an SAP HANA system
  • You have the privileges granted in the SAP HANA user role sap.hana.xs.admin.roles::JobAdministrator
  • You have the privileges granted in the SAP HANA user role sap.hana.xs.admin.roles::HTTPDestAdministrator

In order to define a recurring task, which will be run at a scheduled interval, we will create a .xsjob file  and define all the details of the job. The time schedule is configured using cron-like syntax. According to guidelines, job defined in an .xsjob file allows to run an XS Javascript or SQLScript at regular intervals. 

First of all we will create in Web Development Workbench a Java script file Y_JS_TEST_FG_FUN_RUN.xsjs with a function which runs our Flowgraph.JS function file

On the next step we will create a job file: Y_SCHJ_TEST_FG_RUN.xsjob. 

xsjob file creation

In the file we defined the action. In our case it is the execution of  javascript file which runs the Flowgraph. In ?schedules? section we will put a description and the timings for the actions. 

?xscron?: ?* * * mon,wed,fri 8 0 0? ? means that flowgraph will be run every Monday, Wednesday and Friday at 8 a.m.

After that we will create an empty file with extension .xsapp. This file, like the application descriptor file, is necessary for the XS Engine to present applications to users via the web interface. Whereas the .xsapp file tells the XS Engine that the package contains an application, the application access descriptor.

xsjapp file creation

 

On the next step we will maintain the XS job’s runtime configuration in the XS Job Dashboard. These are the steps:

     a) Start the SAP HANA XS Administration Tool.

The SAP HANA XS Administration Tool is available on the SAP HANA XS Web server at the following URL: http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/admin/.

     b) Maintain the details of the XS job.

xs admin tool objects

Note! To maintain details of an XS job using the Web-based XS Administration Tool you need the privileges granted in the SAP HANA user role sap.hana.xs.admin.roles::JobAdministrator.

 

After that we need to specify the following details:

    • User

The user account in which the job runs, for example, SYSTEM

    • Password

The password required for user, whose account is used to run the job.

    • Locale

The language encoding required for the locale in which the job runs, for example, en_US

    • Start/Stop time

An optional value to set the period of time during which the job runs. Enter the values using the syntax used for the SAP HANA data type LocalDate and LocalTime, for example, 2014-11-05 00:30:00 (thirty minutes past midnight on the 5th of November 2014).

    • Active

Enable or disable the job schedule

     c) Save the job.

Choose Save Job to save and activate the changes to the job schedule.

xs job creation

Monitoring capabilities

SAP HANA system with installed Data Provisioning Monitor gives us a browser based interfaces which allows to monitor agents, tasks, design time objects (flowgraphs and replication tasks), and remote subscriptions created in the system.

You can reach the Monitor whether via entering the URL address of each monitor directly into a web browser or by accessing Smart Data Integration links in the SAP HANA cockpit.

Keep in mind that most of user capabilities are role or privilege based. So the following roles should be applied to your user:

  • Role: sap.hana.im.dp.monitor.roles::Monitoring – Access the monitors
  • Role: sap.hana.im.dp.monitor.roles::Operations – Perform administration tasks from the monitors

In the current example we will use direct URL based access to the Monitors.

There are four Provisioning monitors available and we will have a brief view of them and look through their functionality.

 

     1. Data Provisioning Task Monitor

 

Accessible via URL: <host name>:80<2 digit instance number>/sap/hana/im/dp/monitor/index.html?view=IMTaskMonitor

Data Provisioning Task Monitor

The Data Provisioning Task Monitor displays information in three tables: Task Overview, Task Execution Monitor and Task Operation Execution Monitor. Selecting particular task in the first table, the other tables respectively show information for only that task.

In this monitor you can manually start and stop tasks, control their duration, progress and status. 

For instance in Task Execution Monitor table each task can have one of the following statuses:

  • STARTING
  • RUNNING
  • COMPLETED
  • FAILED
  • CANCELLED (or, CANCELLING)

Also you can see the number of operations executed and their consequences. In Task Operation Execution Monitor the status field could have the following values.

  • STARTING
  • RUNNING
  • COMPLETED
  • FAILED.

I would like to mention a very useful feature of this type of the monitor. It allows to schedule task directly selecting them in the Task Overview table. In order to switch this functionality on we should go to the following link:

http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/admin/job/#

XS Job dashbord

Then switch Schedule Enabled to Yes and confirm that we want to continue:

XS Job dashbord schedules on

After that we can see additional button ?Schedule? in the Data Provisioning Task Monitor in the Task Overview table.

Data Provisioning Task Monitor add button

By pressing this button we can create additional scheduled job for the selected task.

Schedules options for creation

 

     2. Data Provisioning Agent Monitor

 

Accessible via URL: <host name>:80<2 digit instance number>/sap/hana/im/dp/monitor/index.html?view=DPAgentMonitor

Data Provisioning Agent Monitor

You can use the Data Provisioning Agent Monitor to perform basic administration tasks such as registering, altering, or dropping Data Provisioning Agents. 

 

 

     3. Data Provisioning Subscription Monitor

 

Accessible via URL: <host name>:80<2 digit instance number>/sap/hana/im/dp/monitor/index.html?view=DPAgentMonitor

Data Provisioning Subscription Monitor

You can drop, queue, distribute, and reset remote subscriptions within the Data Provisioning Remote Subscription Monitor.

 

     4. Data Provisioning Design Time Object Monitor

 

Accessible via URL: <host name>:80<2 digit instance number>/sap/hana/im/dp/monitor/index.html?view=IMDesignTimeObjectMonitor

Data Provisioning Design Time Object Monitor

In this monitor user able to proceed the following operations:

  • Execute Flowgraphs and Replication Tasks. Note that, realtime flowgraphs and replication tasks cannot be executed from the Data Provisioning Design Time Object Monitor.

 

  • Schedule design time objects including flowgraphs and replication tasks within the Data Provisioning Design Time Object Monitor.

 

  • Stop the execution of non-realtime flowgraphs within the Data Provisioning Design Time Object Monitor.

 

You should be aware that realtime flowgraphs and replication tasks cannot be scheduled from the Data Provisioning Design Time Object Monitor.

 

Thank you for attention!

In case you?d have any questions about SDI please feel free to comment under the blog. 

 

SAP Experience:SAP ABAP technical consultant since 2012. Involved in solution implementation projects in various modules PS/SD/FI/CO/MM. Experienced in wide variety of SAP development including SAP standard, migration and integration technologies including Fiori, OOP ABAP, ABAP for HANA, HCP, SDI, OData, AIF, SLT, IDOCs, BAdIs, BAPIs, Smartforms and Data transformation.

One thought on “Smart Data Integration (SDI) – scheduling and monitoring

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact

INT4
ul. Bednarska 1
60-571 Poznan, Poland

 

office(at)int4.com

Write to us