Dayalan Punniyamoorthy Blog

Thursday, March 15, 2018

Explore DataManagement REST API - Oracle PBCS/EPBCS with Groovy flavor !!!

In continuation of other series about REST API on Planning ,Migration & User Reports in this post let’s explore the REST APIs for DataManagement to run data rules, run batches, import and export data mapping, and to execute reports. 

To begin let's explore groovy program to get the DataManagement apiVersion details and the Output below

1.DataManagement apiVersion Details

2. Running Data Rules

Executes a Data Management data load rule based on the start period and end period, and import or export options that you specify.

Data Rules: Data load rules define how Integrations load data from a file. You must have predefined data load rules to load data/export data. Here I have the rule to export data to a file.
You must have the required privileges to execute a specific data rule. 

Groovy Program to run Data Export and the Output

The process details under Data Management shows the details about the data load rule ran from Jan 17 to Jan 17 as we specified in the Groovy program. You can also download the exported data file from the Process Details or via the Groovy Program

3.Running Batch Rules
Executes a batch of jobs that have been defined in Data Management.

The batch must be defined in Data Management before it can be executed using the REST API.
And the Parameters are set to with needed info

You must have the required privileges to execute a specific batch.

Groovy Program to run Data batch and the Output

The output from the Process Details is shown below, do note there are 2 process id one for the batch and the other for the data rule which was invoked by the batch with a different process id.

4.Export Data Mapping

Member mappings are used to derive the target members for each dimension based on source value. Member mappings are referenced during the data load, enabling Data Management to determine how to dimensionalize the data that is loaded to the target application. Member mappings define relationships between source members and target dimension members within a single dimension. You must create a member mapping for each target dimension.

You can export member mappings to a selected file of format .csv, .txt, .xls, or .xlsx.

You could export the data mappings from the Data Load Mapping for a "Single Dimension" or for "All Dimensions"

Let us explore how to achieve this using Groovy Program

You can download the file for further processing and also, the same job is also displayed under the Process Details

5.Import Data Mapping

You can import member mappings from a selected Excel, .CSV or .TXT file. You can also create new mappings in a text file and import them. Import member mappings support merge or replace modes, along with validate or no validate options for target members. 

Let us see the Groovy Program to call the Import Data Mapping 

And the same job status under Process details

I will cover all the reports execution under DataManagement via Groovy will be covered in the next post.

1 comment:

  1. It was really a nice article and i was really impressed by reading this article
    clinical data management Training