1
Automation Interface, Add-Ins and Tools / SQL query of connectors and usage in Python
« on: December 21, 2023, 07:53:01 pm »
Hey everyone
I am an absolute noob with SQL queries.
I want to query the connectors between classes and then use them in Python for further operations.
My problem is that the list that arrives in Python is empty.
If I do the same with an object query, I get the list as it is displayed in the EA also in Python.
I am an absolute noob with SQL queries.
I want to query the connectors between classes and then use them in Python for further operations.
My problem is that the list that arrives in Python is empty.
If I do the same with an object query, I get the list as it is displayed in the EA also in Python.
Code: [Select]
SELECT
c.Connector_Type AS CLASSTYPE,
c.ea_GUID AS CLASSGUID,
pp_p.Name as Parent_Parent_Package_Name,
c.ea_GUID as Connector_GUID,
c.connector_ID as Connector_ID,
c.connector_Type as Connector_Type,
o2.Name AS Source_Name,
c.Direction AS Direction,
o.Name AS Target_Name
FROM t_connector c
INNER JOIN t_object o ON (c.End_Object_ID = o.Object_ID)
INNER JOIN t_object o2 ON (c.Start_Object_ID = o2.Object_ID)
JOIN t_package p_p ON (o.package_ID = p_p.Package_ID)
JOIN t_package pp_p ON (pp_p.Package_ID = p_p.parent_id)
WHERE pp_p.ea_GUID = '<Search Term>' AND (o.Stereotype = 'Objektdatentyp') AND (c.Connector_Type = 'Realisation')