Skip to main content
Solved

Using a FDM Data model in transformations

  • 19 December 2022
  • 7 replies
  • 215 views

I am currently working on a concept for representing tag data in a simple graph (subject - predicate - object - style)

An instance of the triple could be something like this D-20VA00001 - hasDryWeight - 5000

In parallell I have instanciated another graph holding ontology data and mapping (like CFIHOS, mapping between CFIHOS class and function code and sap referance data etc.) Lets call it the meta-graph.

What I want to do is to take a “traditional” tag as input, map the function code on the tag to corresponding CFIHOS-class, and get required attributes in return from the meta-graph. Further I then want to dynamically instanciate every attribute as relation in the triple’ish graph.

 

In order to do this I need to be able to query a data model (FDM) in a transformation- is that far away?

Further, now I am faking a labeled property graph in FDM - is LPG functionality far away?

 

Best answer by Vu Hai Nguyen

Hi @Trond Saure,

You can try to query FDM in a transformation using the syntax below
 

select * from _cdf_datamodels.`$space:$modelExternalId`

Let me know if this helps!

View original
Did this topic help you find an answer to your question?

Forum|alt.badge.img

Hi @Trond Saure,

You can try to query FDM in a transformation using the syntax below
 

select * from _cdf_datamodels.`$space:$modelExternalId`

Let me know if this helps!


Forum|alt.badge.img

Hi @Trond Saure, and thanks for the question.

Also, there are some potential expansions of / changes to the query syntax for data models in the Transformations service, before we go to GA but those haven’t been decided on fully, as of yet.


Thanks for the reply. Either I am not using the correct syntax, or I am not totally grasping the concept.

 

So first I have my FDM model with externalid noakaClassLib whichI want to query. 

I guess the instance space-name is the same as the data model-name:

The data model that the data is being transformed into is “udmobjectmodel”.

So in the transformation things look something like this:

 

What am I doing wrong?

 

T


Forum|alt.badge.img

Hi,

Yes the notion is quite confused. The space is the DataModel and the modelExternalId is the Data Model Type.
So for example if you want to read from the model that you write to in the 2nd screenshot (the first screenshot doesn’t have Data Model Type so I can’t take give you an example of it)

select * from _cdf_datamodels.`Data Model:Data Model Type`

That is translated to:

select * from _cdf_datamodels.`udmobjectmodel:Subject_1`

  • Practitioner
  • December 22, 2022

Example:

SELECT
  String(`bkKey`) as externalId,
  array("cfihos-riwb-091122", lower(concat("noafulla_d_area_", string(`areacode`)))) as area_10000001,
  array("cfihos-riwb-091122", lower(concat("noafulla_procpck_", string(`eng904Enga0468`)))) as procurementPackageName_10010007
FROM _cdf_datamodels.`temp_noafulla_comos:A25h8z6sbj_centrifugalPump_11`
where isnotnull(`eng904Enga0468`)


  • Practitioner
  • December 22, 2022

Setting externalId and creating a direct relation area_10000001 (to an Area type instance) and an direct relation procurementPackageName_10010007 (to a Procurement Package type instance)


  • Seasoned Practitioner
  • January 3, 2023

Hi @Trond Saure, happy new year! Have the replies above helped you with your question?


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings