Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to export views and tables definitions from Eclipse HANA Studio to Papyrus?(How to export views and tables definitions from Eclipse HANA Studio to Papyrus?)
How to export views and tables definitions from Eclipse HANA Studio to Papyrus? [message #1828056] Sun, 31 May 2020 04:33 Go to next message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
For development work I need to create classes in Papyrus that have the same properties as views and tables in a SAP HANA database:
- Papyrus class name = HANA table or view name
- Papyrus class attribute name = HANA table or view column name
- Papyrus class or attribute description = HANA table or view or column description

Since both HANA Studio and Papyrus are Eclipse plugins, and I can see some export functions in Studio, I wonder if there's an easy way to export XMI, XML or some Eclipse format from Studio and import it into Papyrus.

Alternative I could export to csv file and use Papyrus tables to import, but that would be slow and cumbersome... anyone please let me know if there's a better way thanks!
Re: How to export views and tables definitions from Eclipse HANA Studio to Papyrus? [message #1828060 is a reply to message #1828056] Sun, 31 May 2020 08:06 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Ri,

the approach I would choose depends on the number of tables, average number of elements within a table,...
In the case the numbers are sufficiently small, I would simply do it manually.
In the case the manual approach would take more than two or three days, I would roll on a simple program to read out the table structure on HANA side and create an XMI file acceptable by Papyrus.
Papyrus has an import feature to import models as XMI.

As an addition : SAP R3 always forced others to use SAP interfaces. Even going from their own programming language ABAP to Java, the interfaces to use always were defined by SAP. Given that, I doubt SAP HANA features any standard interfaces.

/Carsten

[Updated on: Sun, 31 May 2020 08:14]

Report message to a moderator

Re: How to export views and tables definitions from Eclipse HANA Studio to Papyrus? [message #1828066 is a reply to message #1828060] Sun, 31 May 2020 13:04 Go to previous messageGo to next message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
Thank you Carsten.
Manual import is an option, but least preferred...

The HANA Studio xml export for a dummy (test) object looks like attached file... would it be something that can be understood by Papyrus? (I tried without modifying it but failed)
  • Attachment: table.xml
    (Size: 19.68KB, Downloaded 105 times)
Re: How to export views and tables definitions from Eclipse HANA Studio to Papyrus? [message #1828068 is a reply to message #1828066] Sun, 31 May 2020 15:24 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Ri,
the XML looks highly normalized to me. All values between tags, no attributes.
Should be pretty forward to program an XSLT (https://www.w3.org/TR/xslt20/) transformation based on it to generate an XMI model file.
/Carsten
Re: How to export views and tables definitions from Eclipse HANA Studio to Papyrus? [message #1828086 is a reply to message #1828068] Mon, 01 June 2020 06:47 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

XSLT is very not-modeling. Once upon a time it was possible to use ATL to transform XML, but that facility experienced bit tot.

Using the http://www.eclipse.org/qvt/2018/XML metamodel from the org.eclipse.qvtd.xml plugin it is possible to use your favourite M2M tool for XML technology space transformation. See [1]

Regards

Ed Willink

[1] http://www.eclipse.org/mmt/qvt/docs/OCL2018TextM2M/TextM2M.pdf
Re: How to export views and tables definitions from Eclipse HANA Studio to Papyrus? [message #1828097 is a reply to message #1828086] Mon, 01 June 2020 15:53 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
XSLT is very much
{pre} operation
You match on patterns (pre-condition)
and then you perform a transformation on the structure matching.

{post} is missing, but can be substituted, by
{pre1} operation1 |{pre2 = post1} operation2

Even being 2 decades old, XSLT isn't that bad
Re: How to export views and tables definitions from Eclipse HANA Studio to Papyrus? [message #1828100 is a reply to message #1828097] Mon, 01 June 2020 17:37 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I used XSLT for many years but realized that since X in XML means really extensible it also means no type checking, whereas models are really strict making uncontrolled extensibility nearly impossible. XSD is a very inadequate retrofit.

Regards

Ed Willink
Re: How to export views and tables definitions from Eclipse HANA Studio to Papyrus? [message #1828102 is a reply to message #1828100] Mon, 01 June 2020 18:02 Go to previous message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
XML features complete type checking, with sub-typing. But you have to define the types with XML Schema Definitions (XSD). XSD is bulky, but works well. Very well. Back in 2002 I was lead architect in a project, where we generated more than 400 web forms based on extended XSDs. The transformation was done with XSLT.
The XML ecosystem is damn powerful, because the meta-model is always XML.
I personally like it and did things with it, others openly argued to be impossible.
Think it is time to publish my SQL based XML store with XPath search. I'll ask if I am allowed to do.
/Carsten
Previous Topic:python code generator
Next Topic:numeration of requirement id
Goto Forum:
  


Current Time: Wed Apr 24 18:31:31 GMT 2024

Powered by FUDForum. Page generated in 0.03355 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top