Assistance Required: Repository Table for Attribute Data Types and Linking with MTA_ATTRIBUTE
M
Mounkarthick T
started a topic
11 months ago
Hello Team,
I’m currently building a dashboard that lists all entities along with their respective attributes. While preparing the query to retrieve this data, I was unable to locate the repository table that stores the data type information for attributes.
I need your assistance in identifying which Semarchy xDM repository table contains attribute data type details. Specifically:
1. Which repository table contains the data type details for attributes?
2. How can this table be linked to the MTA_ATTRIBUTE table, or what is the correct join key or relationship between these tables?
Please share:
The table name(s) that hold attribute data type metadata.
The column(s) to use for joining with MTA_ATTRIBUTE.
Any relevant documentation or ER diagram references.
Thank you for your assistance.
Best Answer
A
Alexia SIMOND
said
2 days ago
Hi Mounkarthick,
MTA_FIELD isn't the right source for this, as it describes attributes as they appear in forms and collections, which is why it has no direct link to MTA_ATTRIBUTE.
The data type of an entity attribute is stored on MTA_ATTRIBUTE itself:
Built-in types (String, Integer, Date, etc.): MTA_ATTRIBUTE.R_TYPE holds a fixed UUID for the type. These types have no row in MTA_TYPE, so you need to map the UUIDs yourself. A community thread lists them: https://support.semarchy.com/support/discussions/topics/43000533962
Lists of Values: R_TYPE points to MTA_TYPE (where CLASSNAME = 'LOVType'), and the values are in MTA_LOV_VAL.
Complex types: R_CPLXTYPE points to MTA_CPLXTYPE.
When you join repository tables, match on UUID, EDITIONID and BRANCHID together, for example a.r_cplxtype = ct.uuid and a.editionid = ct.editionid and a.branchid = ct.branchid.
Otherwise you'll get one row per model edition.
Note that the repository structure isn't formally documented and can change between releases, so test your dashboard query after upgrades.
If you only need a readable list of entities and attributes, the Model Documentation generator is the supported option.
To add on, While exploring the repository, I noticed that the MTA_FIELD table (filtered with CLASSNAME = 'TableColumn') lists attributes along with their data types. However, I am unsure if this is the only way to retrieve an attribute’s data type because I do not see any direct relationship or common key between MTA_FIELD and MTA_ATTRIBUTE.
Could you please confirm:
Is MTA_FIELD the correct and only source for attribute data types?
If so, what is the recommended approach to link MTA_FIELD with MTA_ATTRIBUTE for building a consolidated query?
A
Alexia SIMOND
said
2 days ago
Answer
Hi Mounkarthick,
MTA_FIELD isn't the right source for this, as it describes attributes as they appear in forms and collections, which is why it has no direct link to MTA_ATTRIBUTE.
The data type of an entity attribute is stored on MTA_ATTRIBUTE itself:
Built-in types (String, Integer, Date, etc.): MTA_ATTRIBUTE.R_TYPE holds a fixed UUID for the type. These types have no row in MTA_TYPE, so you need to map the UUIDs yourself. A community thread lists them: https://support.semarchy.com/support/discussions/topics/43000533962
Lists of Values: R_TYPE points to MTA_TYPE (where CLASSNAME = 'LOVType'), and the values are in MTA_LOV_VAL.
Complex types: R_CPLXTYPE points to MTA_CPLXTYPE.
When you join repository tables, match on UUID, EDITIONID and BRANCHID together, for example a.r_cplxtype = ct.uuid and a.editionid = ct.editionid and a.branchid = ct.branchid.
Otherwise you'll get one row per model edition.
Note that the repository structure isn't formally documented and can change between releases, so test your dashboard query after upgrades.
If you only need a readable list of entities and attributes, the Model Documentation generator is the supported option.
Mounkarthick T
Hello Team,
I’m currently building a dashboard that lists all entities along with their respective attributes. While preparing the query to retrieve this data, I was unable to locate the repository table that stores the data type information for attributes.
I need your assistance in identifying which Semarchy xDM repository table contains attribute data type details. Specifically:
1. Which repository table contains the data type details for attributes?
2. How can this table be linked to the MTA_ATTRIBUTE table, or what is the correct join key or relationship between these tables?
Please share:
The table name(s) that hold attribute data type metadata. The column(s) to use for joining with MTA_ATTRIBUTE. Any relevant documentation or ER diagram references.
Thank you for your assistance.
Hi Mounkarthick,
MTA_FIELDisn't the right source for this, as it describes attributes as they appear in forms and collections, which is why it has no direct link toMTA_ATTRIBUTE.The data type of an entity attribute is stored on
MTA_ATTRIBUTEitself:MTA_ATTRIBUTE.R_TYPEholds a fixed UUID for the type. These types have no row inMTA_TYPE, so you need to map the UUIDs yourself. A community thread lists them: https://support.semarchy.com/support/discussions/topics/43000533962R_TYPEpoints toMTA_TYPE(whereCLASSNAME = 'LOVType'), and the values are inMTA_LOV_VAL.R_CPLXTYPEpoints toMTA_CPLXTYPE.When you join repository tables, match on
UUID,EDITIONIDandBRANCHIDtogether, for examplea.r_cplxtype = ct.uuid and a.editionid = ct.editionid and a.branchid = ct.branchid.Otherwise you'll get one row per model edition.
Note that the repository structure isn't formally documented and can change between releases, so test your dashboard query after upgrades.
If you only need a readable list of entities and attributes, the Model Documentation generator is the supported option.
Hope that helps.
Alexia
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstMounkarthick T
To add on, While exploring the repository, I noticed that the MTA_FIELD table (filtered with CLASSNAME = 'TableColumn') lists attributes along with their data types. However, I am unsure if this is the only way to retrieve an attribute’s data type because I do not see any direct relationship or common key between MTA_FIELD and MTA_ATTRIBUTE.
Could you please confirm:
Is MTA_FIELD the correct and only source for attribute data types? If so, what is the recommended approach to link MTA_FIELD with MTA_ATTRIBUTE for building a consolidated query?Alexia SIMOND
Hi Mounkarthick,
MTA_FIELDisn't the right source for this, as it describes attributes as they appear in forms and collections, which is why it has no direct link toMTA_ATTRIBUTE.The data type of an entity attribute is stored on
MTA_ATTRIBUTEitself:MTA_ATTRIBUTE.R_TYPEholds a fixed UUID for the type. These types have no row inMTA_TYPE, so you need to map the UUIDs yourself. A community thread lists them: https://support.semarchy.com/support/discussions/topics/43000533962R_TYPEpoints toMTA_TYPE(whereCLASSNAME = 'LOVType'), and the values are inMTA_LOV_VAL.R_CPLXTYPEpoints toMTA_CPLXTYPE.When you join repository tables, match on
UUID,EDITIONIDandBRANCHIDtogether, for examplea.r_cplxtype = ct.uuid and a.editionid = ct.editionid and a.branchid = ct.branchid.Otherwise you'll get one row per model edition.
Note that the repository structure isn't formally documented and can change between releases, so test your dashboard query after upgrades.
If you only need a readable list of entities and attributes, the Model Documentation generator is the supported option.
Hope that helps.
Alexia
-
4 levels treemap in Dashboard Builder
-
If the data preview can see the data, why can't the chart preview get the data?
-
How to setup multiple roles for a Dashboard?
-
Is it possible to make a master-detail relation between two charts ?
-
Dashboards disappeared during migration of Semarchy database to RDS
-
The Data Location Variable (V_DATALOCATION) Doesn't Appear to Work in Dashboard
-
Set a default width for columns in pivot tables in the dashboards
-
Migrating a Dashboard to Production
-
xDM - Dashboard Advice
-
Add links to dashboards
See all 19 topics