Skip to main content

I am working on a script in PyCelonis to search assets and compile a list of the data models/Knowledge models that the assets are using, with the aim of non manually figuring out which DM/KMs are currently in use by production assets. 

 

Using PyCelonis I have been able to navigate down to the asset level and find lots of information for each asset, but have so far not found anywhere that you can identify the DM/KM an asset is built on. The “.dict()” function provides a lot of information and I thought would be the intuitive place to include this kind of information but it is nowhere to be found, except when the asset is a view and the KM gets referenced in the yaml code that is provided in “.dict()”

 

Does anyone know if this is information that we can pull from PyCelonis? And, if so, how to find this information on the asset level?

 

Thanks in advance for your help!

Hello.

As you mentioned, you can get these details by .dict() function which is correct and want to get details of all data models or knowledge models used in production. Do you want the list of them in an excel? or what exactly you’re looking for? Can you please explain the expectation in details using an example?


Hi ​@AllstateCelonis,

 

If you have selected your view, would the serialize content option help you? https://celonis.github.io/pycelonis/2.12.0/reference/pycelonis/ems/studio/content_node/view/#pycelonis.ems.studio.content_node.view.View.serialized_content

As far as I know, you get then the YAML code of the View, that shows to which Knowledge Model (or to which Data Model in case you do this for a Knowledge Model) your asset is linked currently (see example below). 

 

 

 You would need to extract the package variables however to parse the Data Model variable here. 

 

I hope this helps!


Reply