Skip to Content
Author's profile photo Philip MUGGLESTONE

Going beyond! Using synonyms to access data external to your HDI container

One of the most desired features in native SAP HANA development is to achieve true isolation between applications that run (or are developed) in the same SAP HANA landscape. With SAP HANA XS Advanced Model the use of organizations, spaces and HDI containers (rather than classic” database schemas) makes this not only possible but actually very easy.

However isolation does have a price should your scenario involve accessing data that’s not stored within the HDI container of your application.

Imagine that you need to access data that’s already stored in a “classic” SAP HANA database schema – perhaps being managed by or having originated in some other application like S/4, ERP or BW?

Or you have data in an HDI container generated by your XS Advanced application but how can other “classic” applications access it via a traditional database schema?

Or how can you access data that’s stored in the HDI container of a different XS Advanced application – perhaps that of another developer during the development phase?

These are all great questions!

The answers involve creating and granting roles along with the use of database synonyms so that tables & views can appear as if they’re part of your application even if they’re physically stored elsewhere in SAP HANA.

Christoph Gilde already published an excellent series of blogs that cover how to do this.

At the SAP HANA Academy we love to produce hands-on video tutorials – so inspired by Christoph’s great work – we’ve published a series of new video tutorials that show you how to answer the above questions step by step.

Here’s an Introduction

Accessing data from a “classic” database schema:

Introducing flexibility:

Deployment:

Accessing HDI container data from a “classic” schema:

Accessing a different:

Housekeeping:

Code snippets are provided in GitHub so you can easily follow along.

As always your feedback is most welcome – below, in the YouTube comments section, or on Twitter @pmugglestone.

Have fun!

Philip

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sainath Kumar
      Sainath Kumar

      Excellent blog! Thank you for sharing. Does this process still apply for HANA 2.0 SP03?

       

      Author's profile photo Philip MUGGLESTONE
      Philip MUGGLESTONE
      Blog Post Author

      Hi, Thanks for reading and your question. Yes indeed this should work fine with HANA 2.0 SPS03.Philip

      Author's profile photo Sainath Kumar
      Sainath Kumar

      Thank you Philip.

      Since its has been 2 years you published this blog. I was wondering if there was better way to link the tables from different schema to the HDI container . I believe we will have to work continue to with Synonyms .

      Author's profile photo Philip MUGGLESTONE
      Philip MUGGLESTONE
      Blog Post Author

      Indeed, synonyms are still the way to go.

      Author's profile photo Asuji Karuda
      Asuji Karuda

      You were great and everyone received so much from your experience and knowledge
      Absolutely amazing, thank you for sharing your knowledge with me.