Showing posts with label UDA. Show all posts
Showing posts with label UDA. Show all posts

Thursday, October 5, 2017

Universal Data Adapter - Making it Simple for Multiple Databases

Hi folks!

Long time since I don't post but several events happened lately. Anyway, sorry about that. 

Before I dive into today's topic I'd like to summarize my life in the last weeks:
  • Kscope17 was a great event as always. It's a very good opportunity for us living on the other side of the pond. Meeting lot of people, partners, customers is always great. San Antonio was impressive. I spent one day visiting the city with my colleague Henri (The Finnish Hyperion Guy). We had sun and rain. And what do you when it's raining? Shopping! In addition, I got the "EPM Data Integration Top Speaker" award! That was awesome. I didn't expect it so I can only say thanks to all the community. 
  • Heading to large family. This is an easy one: if all goes fine, next year we will be 2 more in the family :-)
  • New apartment. I've been very busy assembling IKEA furniture. For those would would like visiting Malaga (Spain), we bought a new apartment for rental. Feel free to visit it!
OK, now that you know what I have been doing...time for some FDMEE content!

Universal Data Adapter (UDA)
If you are not familiar with the UDA yet, it may be a good a idea that you visit my previous entries about it:
The Requirement - Multiple Source Databases with same Source View Layout
One of the drawbacks of the UDA is the configuration and maintenance. That's something we cannot change. It has been designed like that. 

Why configuration
UDA requires configuration in FDMEE and Oracle Data Integrator (ODI).

In FDMEE, UDA requires typical artifacts plus some specific ones
  • Source System with an ODI context assigned
  • Source Adapter
  • Source Period Mappings
  • Import Formats
  • Location and Data Load Rule
In ODI, UDA requires new artifacts to be created in addition to the ones imported during initial configuration (Projects and Model Folders)
  • Manually in ODI
    • Data Server
    • Physical Schema
    • Context
  • Generated in ODI from FDMEE
    • Datastore for Table/View definition
    • Package and Interface
    • Scenario for the Import Format
Why maintenance? There are many events that require re-generating the ODI objects created from ODI. I'm not going to list all of them but will explain the main ones.
  • Migrating across environments. LCM doesn't migrate the ODI objects. Besides, you can't perform a native ODI export/import. FDMEE has been designed to have the same ODI repositories' ID across environments so the export/import objects will fail.
  • Apply patches. Some patches may require to re-import some default objects for ODI. This will probably delete the objects you generated from FDMEE.
  • Changes in Tables/Views. Think about adding a new column to a Table/View. You have to re-import table definition again, regenerate the package and interface, adjust the Import Format and regenerate the ODI scenario
What about multiple databases? All configuration mentioned above multiplies as well. Why? All is chained. Each Source System has assigned an ODI Context. If you have multiple sources of the same database type, you can't use the Global context as you can only assign once to the Logical Schema UDA_MSSQL. Then, as you need multiple Source Systems and Source Adapters, you will need multiple Import Formats as they are assigned to adapters, and so on...

I know what you are thinking...lot of manual work to do!

Today, I will show you the solution we implemented for an integration with Microsoft Navision. (SQL Server). Customer had 30 different source databases in the same server (including different collations)

The Solution - Moving complexity to the DB makes UDA simpler!
As part of the Analysis & Design workshop, we explained the drawbacks of having 30 source databases. They understood that we had to find another solution immediately.
For 2 databases, solution architecture would be as:
Then, I told them that the design could be significantly simplified. However, that required some additional work on the SQL side. They wanted to keep things simple in FDMEE so they were happy to go for it. Actually, they did :-)

Basically, my advice was to move the complexity to SQL. That would made the UDA configuration and maintenance simpler.

In a nutshell:
  1. Create a DB Link (Oracle)/Linked Server (SQL Server) from FDMEE database server to the source database server
  2. Create a view in FDMEE database. This view has an additional column for the source database. It queries the source views using remote queries (Ex: OPENQUERY in SQL Server) which perform quite well as they leverage the source DB engine
  3. Configure UDA in ODI
  4. Configure UDA FDMEE
  5. In addition to the required parameters, define an additional one for the column having the source database

Note that if the source databases are in different servers, the solution would be slightly different but still doable.

Also, a similar approach could be taken if you have multiple views with different layouts. You could merge them into one with a common layout.

I know you may have concerns about performance but if the views are correctly designed and network delay is not a bottleneck, everything should be fine. Indeed, ODI usually executes the SQL extract queries in the source database. Don't forget to play a bit with Data Server tuning settings to get the best performance.

As usually, I'm not telling you this is your solution but definitely a good practice. I hope you found it interesting as it may help you to simplify your design.

Have a good summer!

Wednesday, May 17, 2017

Universal Data Adapter for SAP HANA Cloud

Some time ago I covered SAP HANA integration through the Universal Data Adapter (UDA). You can see details in the 3 parts I posted:
Now that everything is heading into the Cloud, why not playing around with SAP HANA Cloud?

SAP HANA Cloud
When I first tried to get a SAP ECC training environment, I noticed that SAP was offering nothing for free. Nowadays, things have changed a little bit. Luckily, they noticed that you need to offer some trial/training sandbox if you want people get closer to you.
For those who want to be part of the game, you can visit their Cloud site.

Why the Universal Data Adapter?
SAP HANA Cloud brings something called SAP Cloud Connector. Too complicated for me :-)
Luckily for me, I googled an easier way of extracting data from Cloud. There is something called database tunnels which allows on-premise systems to connect the HANA DB in the cloud through a secure connection. It doesn't sound quite straight forward but it didn't take too long to configure.

There are different ways of opening the tunnel. I have used the SAP Cloud Console Client which you can download from SAP for free.

Once the database tunnel is opened from the FDMEE Server(s) to the SAP HANA Cloud DB, the Universal Data Adapter can be used in the same way that we used with on-premise HANA DB.
Please, note that as I'm not using a productive cloud environment I had to open the tunnel via command line. This is fair enough to complete my POC.

My data in SAP HANA Cloud
I'm keeping this simple so I have a table in HANA Cloud with some dummy data:
Let's go through the configuration steps to bring that data into my application.

Importing data through FDMEE
As any configuration of UDA we need to:
  • Configure ODI Topology for the physical connection, logical schema and context
  • Configure FDMEE (source system, source adapter, period mapping, etc.)
ODI
Data Server needs to point to the DB tunnel:
We use the same JDBC driver as for HANA on-premise:
As usually, I create a dedicated context for this new source system. That gives me more flexibility:

FDMEE
In FDMEE, nothing different. 
We first create the source system with the context we created in ODI:
Then, add the source adapter for the table we want to extract data from:
Time now to import the table definition, classify columns and generate the template package in ODI:
As you can see above, FDMEE could reverse the HANA Cloud table so I can now assign the columns to my dimensions and regenerate the ODI scenario:

I'm not going to show how to create a location and data load rule as I assume you are familiar with that process.

Final step is to run our data load rule and see how data is pulled from the SAP cloud and loaded into HFM on-premise app through FDMEE :-)
I'm going to leave it here for today. As you can see, Universal Data Adapter provides a simple and transparent way of connecting our on-premise system with heterogeneous source systems, including SAP HANA Cloud!

Cheers