XBRL Abstract Model: `table_data_points` inconcistency

37 views
Skip to first unread message

Willem

unread,
Mar 10, 2025, 1:12:02 PM3/10/25
to Arelle-users
Hello,

First a big thanks for making Arelle available to the public. I've used Arelle with much satisfaction for many years now.

I'm a user of the "XBRL abstract model", the data model obtained when specifying `pgSemantic` as the technology in the `xbrlDB` module/plugin (Arelle/arelle/plugin/xbrlDB/sql/semantic/xbrlSemanticColumnComments.ddl at master · Arelle/Arelle)

Question
How does one correctly match `datapoint_id` in `data_point` entity to their respective `role_uri` in `role_type` entity ? The latter is the `xlink:role` attribute in the presentation linkbase.

Alternatively phrased: how do we determine in which table a `datapoint_id` is located?

I have always used the `table_data_points` entity for this purpose with the SQL logic below:

```
SELECT table_data_points.datapoint_id, role_type.role_uri
FROM table_data_points
LEFT JOIN role_type ON table_data_points.object_id = role_type.role_type_id
```

I perceive issues when records (unique `datapoint_id`) with the same `aspect_id` are present in foot-notes as well as main statements (e.g. consolidated balance sheet). These records yield multiple `object_id` matches for a given `datapoint_id` even though they have a different values for the `xml_id` attribute.

Real case:
concept: `PropertyPlantEquipmentNet`
fact / `xml_id`: `Fact000078`

Query:
```
SELECT data_point.xml_id, table_data_points.datapoint_id, role_type.role_uri
FROM table_data_points
LEFT JOIN data_point ON table_data_points.datapoint_id = data_point.datapoint_id
LEFT JOIN role_type ON table_data_points.object_id = role_type.role_type_id
WHERE table_data_points.datapoint_id = 6313027
```
Yields:
```
| xml_id     | datapoint_id | role_uri                                                        |
|------------|--------------|-----------------------------------------------------------------|
| Fact000078 | 6313027      | http://beyondair.net/role/BalanceSheets                         |
| Fact000078 | 6313027      | http://beyondair.net/role/ScheduleOfPropertyAndEquipmentDetails |
```

Reply all
Reply to author
Forward
0 new messages