Saturday, September 11, 2021

ODI - How to add Data servers and schemas in the Topology

Physical Topology:

Add Data Server:

First choose one technology for example oracle and right click and add new data server

Provide data server details like

  • Definitions: Name, User , Password
  • JDBC: JDBC driver and URL

and test connection.

Add Physical schema:

Suppose you have created data server name as Test and then right click on test and create new physical schema and add the schema name and save. 

Logical Topology:

Create a new logical schema and provide context values with the required physical schemas

4 context environments are available:

  • development
  • Global
  • Production
  • Test

Now go  to the Physical schema of Oracle technology, you will see that all the context values are mapped with the logical schemas.

With screenshots:












Designer Tab = Model:

Go to the designer tab and create new object and new  model

provide definition , reverse engineering details

selective reverse engineering etc. to import all the tables.

ODI - Overview of Oracle Data Integrator Topology

 This section contains these topics:

  • Physical Architecture
  • Contexts
  • Logical Architecture
  • Agents

Physical Architecture

The physical architecture defines the different elements of the information system, as well as their characteristics taken into account by Oracle Data Integrator. Each type of database (Oracle, DB2, etc.), Big Data source (Hive, HBase), file format (XML, Flat File), or application software is represented in Oracle Data Integrator by a technology.

A technology handles formatted data. Therefore, each technology is associated with one or more data types that allow Oracle Data Integrator to generate data handling scripts.

The physical components that store and expose structured data are defined as data servers. A data server is always linked to a single technology. A data server stores information according to a specific technical logic which is declared into physical schemas attached to this data server. Every database server, JMS message file, group of flat files, and so forth, that is used in Oracle Data Integrator, must be declared as a data server. Every schema, database, JMS Topic, etc., used in Oracle Data Integrator, must be declared as a physical schema.

Finally, the physical architecture includes the definition of the Physical Agents. These are the Java software components that run Oracle Data Integrator jobs.


Contexts:

Contexts bring together components of the physical architecture (the real Architecture) of the information system with components of the Oracle Data Integrator logical architecture (the Architecture on which the user works).

For example, contexts may correspond to different execution environments (Development, Test and Production) or different execution locations (Boston Site, New-York Site, and so forth.) where similar physical resource exist.

Note that during installation the default GLOBAL context is created.


Logical Architecture:

The logical architecture allows you to identify as a single Logical Schema a group of similar physical schemas (that contain datastores that are structurally identical) that are located in different physical locations. Logical Schemas, like their physical counterparts, are attached to a technology.

Contexts allow logical schemas to resolve to physical schemas. In a given context, a logical schema resolves to a single physical schema.

For example, the Oracle logical schema Accounting may correspond to two Oracle physical schemas:

Accounting Sample used in the Development context

Accounting Corporate used in the Production context

These two physical schemas are structurally identical (they contain accounting data), but are located in different physical locations. These locations are two different Oracle schemas (Physical Schemas), possibly located on two different Oracle instances (Data Servers).

All the components developed in Oracle Data Integrator are designed on top of the logical architecture. For example, a data model is always attached to logical schema, and data flows are defined with this model. By specifying a context at run-time (either Development or Production), the model's logical schema (Accounting) resolves to a single physical schema (either Accounting Sample or Accounting Corporate), and the data contained in this schema in the data server can be accessed by the integration processes


Agents:

Oracle Data Integrator run-time Agents orchestrate the execution of jobs. These agents are Java components.

The run-time agent functions as a listener and a scheduler agent. The agent executes jobs on demand (model reverses, packages, scenarios, mappings, and so forth), for example when the job is manually launched from a user interface or from a command line. The agent is also used to start the execution of scenarios according to a schedule defined in Oracle Data Integrator.

Tuesday, September 7, 2021

Comprehensive vs Third Party Two Wheeler Insurance

Two wheeler ins​urance​​​, as the name suggests, is an insurance plan which offers financial cover to two-wheelers like bike, scooter, etc. in case of any accidental damage, theft and third party liability. Some companies also sell two wheeler insurance under the label of motorbike insurance and scooter insurance. Motor insurance in India also offers personal accident insurance to the two-wheeler drivers. Motor insurance in India has been mandated by the Indian law, thus if someone is caught riding an uninsured bike, motorcycle, scooter, etc., he/she might have to face legal procedures.It is probably because of the mandated law that most of the people buy two wheeler insurance only for the sake of formality. Thus, in the process, they end up buying insufficient coverage for their vehicle. 

At the time of buying two wheeler insurance, you will come across two types of policies -

  • Comprehensive
  • Third Party Liability. 

Under a comprehensive two wheeler insurance​ policy, your vehicle will be covered against theft, loss, and damage. This coverage will also offer personal accidental cover for the owner or rider in event of an accident. In addition, this type of two-wheeler insurance also covers you in the case of third-party liability. 

On the other hand, a third-party liability two wheeler insurance will protect you only against damage/loss towards the third party. This types of policy will not bear the cost of loss/damage of your vehicle, neither will it provide you any personal accident cover for drive and rider. And individuals who buy two wheeler insurance for the sake of mandated law mostly buy third-party insurance only, thus stay underinsured.Be a smart buyer, get full coverage for yourself and your two-wheeler by choosing comprehensive two wheeler insurance. 



OIC - Convert JSON to String

Use Case: Sometimes we come to situation where we get a source json file from source system and may need to send  the json as string to target system.

Source Json:

{

"firstname": "srinanda",

"lastname":"das"

}

Target Json as string:

{

"data": "{\n  \"firstname\" : \"srinanda\",\n  \"lastname\" : \"das\'\n}"

}

Opaque.xsd:

<?xml version='1.0' encoding='UTF-8'?>

<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/" xmlns="http://www.w3.org/2001/XMLSchema">

<element name="opaqueElement" type="base64Binary"/>

</schema>


Implementation steps:,

Step1:  Rest trigger configure with request and response




Step2: Write a JSON file with the inputs using Stage file.




Sample.json contains:


Step3: Map the inputs to Write fields.


Step4: Read the files to opaque using Stage file.



Opaque.xsd


Map the read opaque reference to data response with decodebase64().


The flow is like below:


Test:



Wednesday, September 1, 2021

OIC - Fault Handling in OIC in details

UseCase Details: Here, we will capture the exception details from sub integration using scope default handler and sends them as response to the main integration and then from the main integration where if it finds the exception, it will throw new fault to scope handler and then it logs the exception and rethrow the fault to global scope where it will send mail notification to the customer.

Components:

Sub Integrations:

  • OIC_GetFiles_FTP : Take file name and file path as input and provide the file in base64 format and Exception details(ExceptionCode, ExceptionReason and ExceptionDetails) 
  • Generic_MailNotification: used send mails.

Main service:

  • SD_InboudErrorHandling.


Implementation steps:

Step1: OIC_GetFiles_FTP flow in bodyScope where it downloads the file from a FTP location based on file name and file path and then map the file as a response. 


Step2: In the bodysope default handler, added a map to add the bodyscope faulit details to response.



Step3: From main Integration, it calls the OIC_GetFiles and then checks if there is any exception. If exception exists, then it throws a new fault to bodyscope.


This is the exception condition used:


Switch and throw new fault block


Throw New Fault


Step4: Open the scope default handler


Step5: add the log the fault in a file or others and then rethrow the fault to Global fault.

Use Integrarion Metadata and Bodyscope fault details for enrichment

Step6: In the global fault, call the mail notification or call the incident creation service etc.

Logged fault in files:




Monday, August 30, 2021

OIC - How to create Rest ICS connection

Why to create a rest ICS/OIC connection:
This is very important when we are going to call any OIC artifacts or integrations or import or export integrations or update lookup or schedule integration etc. using rest protocol.

Connection Steps:

Step1: Go to connections and create a cknnection and REST type adapter.

Step2: provide following connection properties:
Connection type as REST API Base URL
TLS version: TLSv1.2
Connection URL: use your OIC URL(https://oic host name/)

Step3: Add security as Basic authentication and provide Username and password.

Step4: Save and Test.

OIC - Update lookup from a CSV file

UseCase: Here, we will feed a lookup name as input and then based on the lookup name we will fetch the Lookup csv file from a location using FTP protocol and then call lookup rest api to update the the respective lookup.


Rest API details to update lookup:

API : /ic/api/integration/v1/lookups/{name}

Verb : PUT

Request Json payload:

{"columns":["rightnow","soap"],"rows":[{"rowData":["RN1","SOAP1"]},{"rowData":["RN2","SOAP2"]}],"name":"myLookup"}


Prerequisites:

  • You should have a FTP connection to read the csv.
  • You should have a ICS rest connection.

Implementation steps:

Step1: We will feed lookup name.

URI: /update/{lookupName}



Step2: Read the file from a location using FTP and parse with a csv sample file schema.


In the map, concat lookup name with .csv
concat(lookupName,".csv")

Step3: Rest API URL configure to update Lookup.


Step4: Provide the sample Json request payload.


Step5: Map the lookup name and csv response to Lookup update rest request.

►Here haedcoded, "Country_Code" and "Country_Name" to each Columns.
►For each lookup row map to rows and map the code and name fields to each rowData.
►Map template lookup name to name.
►Map input template lookup name to rest request template parameter name.




The Integration flow looks below:


Before lookup update:


After update:




Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...